Modgen : Actions - Structuring

Info

Modeling and Generation

Custom designs

Custom designs are a main service.

About the initiator

My name is James Wayne. I live in ... the Netherlands

User Guide Modgen




Actions - Structuring

In the next table the actions starting with FILNAM may contain maximally 3 parameters indicated by , and .
These parameters represent sub-strings, that, after substitution, are concatenated to form the filename.

ActionsDescription
IF...ELSE_IF...ELSE...END_IFIf structure.
DO_WHILE...END_WHILEWhile structure.
BEGIN_RELATIONSStart with the first datamodel table.
END_RELATIONSContinue with the next datamodel table, until no table is found anymore.
ATR_BEGINStart with the first field for the active datamodel table.
ATR_ENDContinue with the next field of the active datamodel table, until no field is found anymore.
FOR ALL [ ]Start with the first record of Table . Optionally the condition “ Where the value of equals the current value of <%><%>.
NEXT_FORContinue with the next record of the curent Table.
BEGIN_GLOBALSStart with the first block of global parameters
END_GLOBALSContinue with the next block of global parameters
BEGIN_LOCALSStart with the first block of local parameters
END_LOCALSContinue with the next block of local parameters
BEGIN_PARAMETERS Fetch the parameters of block
END_PARAMETERSContinue with the next block of parameters
BEGIN_PARAMETER Assign parameter to , where and are substitution –variables
INC_PARAMETER Increment parameter with 1
REWIND_PARAMETERSRestart with the first block of parameters

The IF structure.

IF {condition}

{block}

ELSE_IF {condition}

{block}

ELSE

{block}

END_IF



The IF-structuur enables the optional execution of block of actions.

A condition has the following form:

The DO_WHILE structuur.

DO_WHILE {condition}

{block}

END_WHILE

The DO_WHILE structure enables the execution of a block of actions, while the condition is true. One of the actions in the block of actions must change the condition to prevent an endless loop.

Other loop-structures.

To understand the other loop-structures, the kind of objects involved will be described.

The following objects have corresponding loop-structures:

Datamodel loop-structures: Tables.

BEGIN_RELATIONS

{block}

END_RELATIONS

Table data dictionary loop-structures are used to process tables of relational data models. The loops will iterate over Tables.

To iterate over Tables the following commands are available.

The BEGIN_RELATIONS … END_RELATIONS structure enables the execution of a block of actions, for all tables in the data model. A number of substitution-variables (concerning table meta-attributes) can be used within the block of actions (See Substitution-variables – Template variables)

Datamodel loop-structures: Fields.

ATR_BEGIN

{block}

ATR_END

Within a BEGIN_RELATIONS … END_RELATIONS structure the Attribute data dictionary loop-structures are used to process attributes of relational data models. The loops will iterate over Attributes of Tables.

To iterate over Attributes of Tables the following commands are available.

The ATR_BEGIN … ATR_END structure enables the execution of a block of actions, for all attributes in the current data model table. A number of substitution-variables (concerning attribute meta-attributes) can be used within the block of actions (See Substitution-variables – Template variables)

Context-Repository loop-structuren.

FOR ALL {Context Object} [{attribute name} {%attribute value%}]

{block}

NEXT_FOR

The FOR ALL … NEXT_FOR loop-structures are used to process records of tables containing actual data. The loops will iterate over Records of a Table of an Context Object.

An Context Object is stored in a pair of plain text files:

The optional filter {attribute name} {%attribute value%} enables the joined nesting of FOR … NEXT loops, where {attribute name} is de name of an attribute of the inner loop tables and {%attribute value%} is a value of the name of an attribute of the outer loop table.

Of course, it is easier to skip the optional part and use an extra IF statement to create the join-filter.

Parameter loop-structuren.

BEGIN_GLOBALS

{block}

END_GLOBALS

The BEGIN_GLOBALS … BEGIN_GLOBALS loop-structure is used to process blocks of global associations. The loops will iterate over blocks of records with name and value. The parameters can be used as general system variables.

To iterate over blocks of global environment variables the following commands are available.

BEGIN_LOCALS

{block}

END_LOCALS

Within the BEGIN_GLOBALS … BEGIN_GLOBALS structure the BEGIN_LOCALS … BEGIN_LOCALS loop-structure is used to process blocks of local associations. The loops will iterate over blocks of records with name and value. The parameters can be used as general system variables.

To iterate over blocks of local environment variables the following commands are available.

Next to the structures described a number of extra actions on parameters are defined for the manipulation of blocks of parameters.

Picture fetch

If you like the header, it can be found here.


Images

firefox

If you are using firefox, put your cursor over the logo. But for some reason IE does not like image rollover effects. Its not that big of a deal.