Structure Expansion Tokens
Structure expansion tokens are expansion tokens that are used to insert information about the current Repository structure into the output stream. They can be used anywhere in a template file.
Structure Token |
Description |
Inserts a comma-separated list of a structures data fields (i.e. non primary key) fields. This is mainly useful for defining sets in UI Toolkit input windows, as any field marked “Excluded by Toolkit” will NOT be included in the list of fields. Array fields are listed separately with real a real array index. Example output: FIELD1,FIELD2,FIELD3[1],FIELD3[2],FIELD4 |
|
Inserts the name of the structures display field, if defined. A structures display field is defined by adding the text @CODEGEN_DISPLAY_FIELD to the fields user defined text string or long description. CodeGen will display an error if it encounters this token and the structure being processed does not have a display field defined. Example output: DEPARTMENT_NAME |
|
|
Inserts the current field prefix that was specified via the -prefix command line option. If the -prefix command line option was not used then this the token does not write anything to the output file.
|
Inserts the addressing size of the structures first assigned data file. CodeGen will display an error if it encounters this token and the structure being processed has not been assigned to a repository file definition. Possible values: 32, 40 |
|
Inserts a string indicating whether the structures first assigned file has change tracking enabled. CodeGen will display an error if it encounters this token and the structure being processed has not been assigned to a repository file definition. This option is supported by Synergy/DE V10.1 and higher. Possible values: YES, NO Alternates: <file_change_tracking> |
|
Inserts a string indicating whether the structures first assigned file has data compression enabled. CodeGen will display an error if it encounters this token and the structure being processed has not been assigned to a repository file definition. Possible values: YES, NO Alternates: <file_compression> |
|
Inserts the default key density of the structures first assigned file. CodeGen will display an error if it encounters this token and the structure being processed has not been assigned to a repository file definition. Possible values: 50, 100 |
|
Inserts the description of the first data file assigned to the structure. For example: CodeGen will display an error if it encounters this token and the structure being processed has not been assigned to a repository file definition. Example Output: Customer Master File |
|
|
Inserts an ISAMC file specification string based on the file attributes defined in the first file assigned to the structure.
CodeGen will display an error if it encounters this token and the structure being processed has not been assigned to a repository file definition. Example output: DATA:EMPLOYEE.ISM,FIXED,COMPRESS,DENSITY=50,PAGE=1024 See also: <KEY_ISAMC_SPEC> |
Inserts the name of the first data file assigned to the current structure. CodeGen will display an error if it encounters this token and the structure being processed has not been assigned to a repository file definition. Example output: DAT:customer.ism |
|
Inserts the name of the first data file assigned to the current structure, with the file extension removed. This token can be useful when constructing file specifications where the file extension is based on a variable company code or other data. CodeGen will display an error if it encounters this token and the structure being processed has not been assigned to a repository file definition. Example output: DAT:customer |
|
|
Inserts the ODBC table name of the first repository file definition that is assigned to the structure currently being processed. If no ODBC table name is specified then the name of the first assigned structure is used.
Example output: CUSTOMER Alternates: <file_odbc_name> <File_Odbc_Name> <File_odbc_name> <FileOdbcName> <fileOdbcName> |
Inserts the page size of the current structures first assigned file. CodeGen will display an error if it encounters this token and the structure being processed has not been assigned to a repository file definition. Possible values: 512, 1024, 2048, 4096, 8192,16384, 32768 Note: Page sizes 16384 and 32768 were introduced with ISAM Rev 6 in Synergy/DE 10.1 |
|
|
Inserts the portable integer positions string of the first data file assigned to the current structure.
CodeGen will display an error if it encounters this token and the structure being processed has not been assigned to a repository file definition. |
Inserts a string indicating the record type of the first data file assigned to the structure. CodeGen will display an error if it encounters this token and the structure being processed has not been assigned to a repository file definition. Possible values: FIXED, VARIABLE, MULTIPLE Alternates: <file_rectype> |
|
|
Inserts the name of the first repository file definition that is assigned to the structure currently being processed.
Example output: CUSTOMER Alternates: <file_rps_name> <File_Rps_Name> <File_rps_name> <FileRpsName> <fileRpsName> |
Inserts a string indicating whether the structures first assigned file has static RFA’s enabled. CodeGen will display an error if it encounters this token and the structure being processed has not been assigned to a repository file definition. Possible values: YES, NO Alternates: <file_static_rfa> |
|
Inserts a string indicating whether the structures first assigned file has stored GRFA’s enabled. CodeGen will display an error if it encounters this token and the structure being processed has not been assigned to a repository file definition. Supported in Synergy/DE V10.1 and higher. Possible values: YES, NO Alternates: <file_stored_grfa> |
|
Inserts a string indicating the type of the first data file assigned to the structure. CodeGen will display an error if it encounters this token and the structure being processed has not been assigned to a repository file definition. Possible values: ASCII, DBL ISAM, RELATIVE, USER DEFINED |
|
Inserts the user text string of the first data file assigned to the structure. CodeGen will display an error if it encounters this token and the structure being processed has not been assigned to a repository file definition. |
|
Inserts the file specification of the first file assigned to the mapped structure. To use this token you must be processing a structure which has been mapped to a second structure, and the second structure must have been assigned to a repository file definition. CodeGen will display an error if it encounters this token and these requirements have not been satisfied. For information on structure and field mapping, refer to Preparing Your Repository. Example output: DAT:department.ism |
|
Inserts the name of the mapped structure. To use this token you must be processing a structure which has been mapped to a second structure. CodeGen will display an error if it encounters this token and you are not processing a structure with a structure mapping. For information on structure and field mapping, refer to Preparing Your Repository. Example output: DEPARTMENT Alternates: <mapped_structure> |
|
Inserts the name of the name of the first tag field in the mapped structure. To use this token you must be processing a structure which has been mapped to a second structure, and that structure must have a tag. CodeGen will display an error if it encounters this token and you are not processing a structure with a structure mapping. For information on structure and field mapping, refer to Preparing Your Repository. Example output: DEPARTMENT_ID Alternates: <mapped_tag_field> |
|
Inserts the name of the first segment of the structures primary key. WARNING: This token does not support structures with segmented primary keys. You can achieve more flexible results by using a key segment loop within a primary key block. This technique is discussed later in this chapter. This token is present for compatibility with older template files only, and will be removed in a future version. Example output: CUSTOMER_ID Alternates: <primary_key_field> <Primary_Key_Field> <Primary_key_field> <PrimaryKeyField> <primaryKeyField> |
|
This special token switches context to a different structure, and can only be used when processing multiple structures concurrently. The n character represents the one-based index number of the structure to switch to, and must be a number between 1 and the number of structures being processed. CodeGen can process multiple structures concurrently in one of two ways: •Multiple structures can be specified on the command line, after the -s command line option, and the -ms command line option can be used to specify that all of the structures are to be processed together. •The -file command line option can be used to use a repository file definition as the starting point for code generation, and that file definition can have multiple structures assigned. This token does not cause any data to be written to the output stream. For an example of processing multiple structures in a single template file, refer to the example template named xf_net_get_master_detail.tpl. |
|
Inserts the number of the structures first level child members (fields and groups). Example output: 15 |
|
Inserts the current structures description. Example output: Customer Master Record |
|
Inserts the total number of fields in the structure. If the structure includes any array fields then the individual array field elements are counted towards the number of fields in the structure. Example output: 25 |
|
|
Inserts the number of repository file definitions that the current structure is assigned to.
Example output: 1 |
|
If the structure has one or more unique keys then this token Inserts the key number of the first unique key. If the structure does not have a unique key then this token does not insert anything. You can check whether the structure has a unique key by using the <STRUCTURE_HAS_UNIQUE_KEY> expression.
IMPORTANT: The value produced by this token relies on the "key of reference" number being set on all access key definitions in the repository. If these are not set then the token will produce a value of 0 regardless of which key is the first unique key.
|
Inserts the total number of keys defined in the structure. Example output: 3 |
|
Inserts the structures long description. |
|
Inserts the name of the structure that is currently being processed. If the -a command line option is being used then inserts the structures alias as specified on the command line. If you are using structure aliases and want to insert the name of the actual structure (not the alias) then use the <STRUCTURE_NOALIAS> token. Example output: CUSTOMER Alternates: <structure_name> <Structure_Name> <Structure_name> <StructureName> <structureName> See also: <STRUCTURE_NOALIAS>, <STRUCTURE_NOPLURAL>, <STRUCTURE_PLURAL> |
|
Inserts the name of the Repository structure that is currently being processed. This token is always replaced by the actual name of the repository structure, even if the -a command line option is being used. Example output: CUSTOMER Alternates: <structure_noalias> <Structure_Noalias> <Structure_noalias> <StructureNoalias> <structureNoalias> See also: <STRUCTURE_NAME>, <STRUCTURE_NOPLURAL>, <STRUCTURE_PLURAL> |
|
|
Inserts the name of the structure that is currently being processed. If the -a command line option is being used then inserts the structures alias as specified on the command line. If the name ends with an "S" character then it will be removed.
Example output: For a structure named CUSTOMERS the token will insert CUSTOMER Alternates: <structure_noplural> <Structure_Noplural> <Structure_noplural> <StructureNoplural> <structureNoplural> See also: <STRUCTURE_NAME>, <STRUCTURE_NOALIAS>, <STRUCTURE_PLURAL> |
|
Inserts the name of the structure that is currently being processed. If the -a command line option is being used then inserts the structures alias as specified on the command line. If the name does not end with the character "S" then one will be added.
Example output: For a structure named CUSTOMER the token will insert CUSTOMERS Alternates: <structure_plural> <Structure_Plural> <Structure_plural> <StructurePlural> <structurePlural> See also: <STRUCTURE_NAME>, <STRUCTURE_NOALIAS>, <STRUCTURE_NOPLURAL> |
Inserts the size of the current structure expressed in bytes. Example output: 495 |
|
|
If the structure has a multi-part tag expression this token inserts the number of AND connectors being used to connect the parts of the expression. Otherwise 0 is inserted.
|
|
If the structure has a multi-part tag expression this token inserts the number of OR connectors being used to connect the parts of the expression. Otherwise 0 is inserted. |
|
If the structure has a tag expression this token inserts the total number of parts of that expression. Otherwise 0 is inserted. |
|
Inserts the type of the current structure. Possible values: ASCII, DBL ISAM, RELATIVE, USER DEFINED |
Inserts the structure user text string. |
Copyright © 2021 Synergex International, Inc.