Modgen : Actions - Substitution

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 - Substitution

Genereration occurs through the setup and iterations of environements, while substituting Template-pieces.

ActionsDescription
PROC_SKEL {PAR1} {PAR2} {PAR3}This is the core action, that executes the actual production. The action substitues a Template-Piece. , and are sub-strings, that are concatenated. In this way the name of the Template-Piece can be varied.

The substitution of a Template-Piece is done in the following way:

There can be several groups of Substitution variables, that can be used in Action Scripts as well as in Template-files.

ActionsDescription
&*system*& variablesVariables, that are used in Action Scripts as well as in Template files. They are given their default value at the start of hte Action-script.
&*Template*& variablesVariables, that are mainly used in Template-files although they can be used in Action Scripts, for instance for the control of condition-dependent PROC_SKEL actions. Most of these variables get their value by reading in the datadictionary. SeeAction Scripts – Datadictionary actions.
&*paramete*&r variablesVariables, that are used in Action Scripts as well as in Temaplte files. They are defined by the contents of parameter-files. They are used in a set global and local variables.
&*context*& variablesVariables, that are used in Action Scripts as well as in Temaplte files. They are defined in the contexts as defined in the setup and iteration using FOR … NEXT iterations.

System variables.

System variables are variables, that recieve a waarde at the start of an Action Script.

With system variables general parameter actions are applicable. See Action Scripts - Parameter Actions.

ActionsDefault ValueDescription
SYSTEM11Often used as counting or flag variable
SYSTEM21Often used as counting or flag variable
SYSTEM31Often used as counting or flag variable
SYSTEM41Often used as counting or flag variable
SYSTEM51Often used as counting or flag variable
INDENTINDENTUsed in INDENT / UNINDENT actions. See Action Scripts Format Actions
UN_INDENTUN_INDENTUsed in INDENT / UNINDENT actions. See Action Scripts Format Actions
MESSMESSTo be used as a Mnemonic String or Constant in Action Scripts
BEFOREBEFORETo be used as a Mnemonic String or Constant in Action Scripts
AFTERAFTERTo be used as a Mnemonic String or Constant in Action Scripts
KOMMA,To be used as a Mnemonic String or Constant in Action Scripts
HAAKJE_OPENEN(To be used as a Mnemonic String or Constant in Action Scripts
HAAKJE_SLUITEN)To be used as a Mnemonic String or Constant in Action Scripts
TYPE_CCTo be used as a Mnemonic String or Constant in Action Scripts
TYPE_DDTo be used as a Mnemonic String or Constant in Action Scripts
TYPE_NNTo be used as a Mnemonic String or Constant in Action Scripts
TYPE_FFTo be used as a Mnemonic String or Constant in Action Scripts
GWORD0Used in text processing Action Scripts. Contains the last word fetched after a WORD_GET action, if BWORD equals TRUE.
GCHAR0Used in text processing Action Scripts. Contains the last character fetched after a CHAR_GET action, if BCHAR equals TRUE.
BLINE0Used in text processing Action Scripts. Is TRUE as a result of a LINE_GET actie, when a line was actually fetched.
BWORD0Used in text processing Action Scripts. Is TRUE as a result of a WORD_GET actie, when a line was actually fetched
BCHAR0Used in text processing Action Scripts. Is TRUE as a result of a CHAR_GET actie, when a line was actually fetched
TRUETRUETo be used as a Mnemonic String or Constant in Action Scripts
FALSEFALSETo be used as a Mnemonic String or Constant in Action Scripts
SEARCH&*Used in text processing Action Scripts as default search string in a LINE_SRCH action. The default value can be changed, before a LINE_SRCH is executed.
LOCATION0Used in text processing Action Scripts as the result of a LINE_SRCH action. Contains the column, where the search string was found.
BTREEFALSENA (deprecated)
TSTACK0NA (deprecated)
OSTACK0NA (deprecated)
SUBRMAINNA (deprecated)
SUBR_SKL_PART0NA (deprecated)

Template variables.

Template variables are mostly variables, getting a value when iterations of the following form in an Action Script are executed: BEGIN_RELATIONS … END_RELATIONS. and ATR_BEGIN … ATR_END. For owner and member variables other iterations are used (See Action scripts – Datadictionary actions).

ActionsDescription
E_nameThe active table_name is substituted. It is assumed, that the substitution (via a PROC_SKEL statement) is executed in an iteration of a BEGIN_RELATIONS … END_RELATIONS loop. See Action Scripts – Datadictionary actions.
E_numberThe rank number og the active table is substituted. It is assumed, that the substitution (via a PROC_SKEL statement) is executed in an iteration of a BEGIN_RELATIONS … END_RELATIONS loop. See Action Scripts – Datadictionary actions.
E_descrThe description of the active table is substituted. It is assumed, that the substitution (via a PROC_SKEL statement) is executed in an iteration of a BEGIN_RELATIONS … END_RELATIONS loop. See Action Scripts – Datadictionary actions.
E_shortThe shortname of the active table is substituted. It is assumed, that the substitution (via a PROC_SKEL statement) is executed in an iteration of a BEGIN_RELATIONS … END_RELATIONS loop. See Action Scripts – Datadictionary actions.
E_ownThe active owner table-name of a nested owner loop is substituted. It is assumed, that the substitution (via a PROC_SKEL statement) is executed in an iteration of a OWN_BEGIN … OWN_END loop. See Action Scripts – Datadictionary actions.
E_memThe active member table-name of a nested member loop is substituted. It is assumed, that the substitution (via a PROC_SKEL statement) is executed in an iteration of a MEM_BEGIN … MEM-END loop. See Action Scripts – Datadictionary actions.
A_nameThe name of the active attribute of the active table is substituted. It is assumed, that the substitution (via a PROC_SKEL statement) is executed in an iteration of a ATR_BEGIN …ATR_END loop, nested within a BEGIN_RELATIONS … END_RELATIONS loop. See Action Scripts – Datadictionary actions.
A_numberThe rank number of the active attribute of the active table is substituted. It is assumed, that the substitution (via a PROC_SKEL statement) is executed in an iteration of a ATR_BEGIN …ATR_END loop, nested within a BEGIN_RELATIONS … END_RELATIONS loop. See Action Scripts – Datadictionary actions.
A_typThe type of the active attribute of the active table is substituted. It is assumed, that the substitution (via a PROC_SKEL statement) is executed in an iteration of a ATR_BEGIN …ATR_END loop, nested within a BEGIN_RELATIONS … END_RELATIONS loop. See Action Scripts – Datadictionary actions..
A_lenThe length of the active attribute of the active table is substituted. It is assumed, that the substitution (via a PROC_SKEL statement) is executed in an iteration of a ATR_BEGIN …ATR_END loop, nested within a BEGIN_RELATIONS … END_RELATIONS loop. See Action Scripts – Datadictionary actions..
A_unThe unicity-indication (‘U’=unique, i.e., key-attribute, ‘-‘=not unique i.e., normal attribute) of the active attribute of the active table is substituted. It is assumed, that the substitution (via a PROC_SKEL statement) is executed in an iteration of a ATR_BEGIN …ATR_END loop, nested within a BEGIN_RELATIONS … END_RELATIONS loop. See Action Scripts – Datadictionary actions.
A_ownThe attribut-name of the active owner table-name of the owner loop is substituted. It is assumed, that the substitution (via a PROC_SKEL statement) is executed in an iteration of a ATR_OWN_BEGIN …ATR_OWN_END loop, nested within a OWN_BEGIN … OWN_END loop. See Action Scripts – Datadictionary actions.
Sys_dateSystem date, to be used as a documentation-field in a header to be generated to denote when the generation has been executed.
Sys_timeSystem time, , to be used as a documentation-field in a header to be generated to denote when the generation has been executed.
Skl_nameName of the active Template-file, tio be as a documentation-field in a header to denote which template-file has been used for the generation.
Db_nameDatabase name. Is filled via a FILNAM_DBN action in preparation of a GET_DATADIC action. See Action Scripts – Datadictionary actions.
Db_versionDatabase version. Is filled via a FILNAM_DBN action in preparation of a GET_DATADIC action. See Action Scripts – Datadictionary actions.
Rdb_rootDatabase root. Is filled via a FILNAM_DBN action in preparation of a GET_DATADIC action. See Action Scripts – Datadictionary actions.

In general the database_name and the database_version can be used as documentation-fields in a header to be generated to denote, which version of the datamodel has been used for generation.


Parameter variables.

Parameter variables are defined through parameter files. See Parameters – Composition and Parameters – Actions. They can be used in substitution actions like other variables. See Action Scripts – Parameter actions.


Context variables.

Context variables are defined through context files. See Contexts – Composition and Contexts – Actions. They can be used in substitution actions like other variables. See Action – Context actions.


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.