Program parameters
The syntax diagram for a program parameter is as follows:
- dataItemName
- Name of a data item. For the rules of naming, see Naming conventions.
- primitiveType
- The primitive type of a data item or (in relation to a dynamic array) the primitive type of an array element.
- length
- The parameter's length or (in relation to a dynamic array), the length of an array element. The length is an integer that represents the number of characters or digits in the memory area referenced either by dataItemName or (in the case of a dynamic-array element), dynamicArrayName.
- decimals
- For some numeric types, you may specify decimals, which is an integer that represents the number of places after the decimal point. The maximum number of decimal positions is the smaller of two numbers: 18 or the number of digits declared as length. The decimal point is not stored with the data.
- "dateTimeMask"
- For items of type INTERVAL or TIMESTAMP, you may specify "dateTimeMask", which assigns a meaning (such as "year digit") to a given position in the item value. The mask is not stored with the data.
- dataItemPartName
- The name of a dataItem part that is visible to the program. For details on visibility, see References to parts.
The part acts as a model of format, as described in Typedef.
- formPartName
- Name of a form.
The form part must be accessible through a form group in the program's use declaration; and a form accessed as a parameter cannot be displayed to the user.
Even if a program cannot display a form (as is the case for basic program that receives a text form), the program can access the data in a form that was passed to the program.
For the rules of naming, see Naming conventions.
- recordName
- Name of a record. For the rules of naming, see Naming conventions.
- recordPartName
- Name of a record part that is visible to the program. For details on visibility, see References to parts.
The part acts as a model of format, as described in Typedef.
- dynamicArrayName
- Name of a dynamic array of records or data items. If you use this option, the other symbols to the right (dataItemPartName, primitiveType, and so on) refer to each element of the array. For the rules of naming, see Naming conventions.
The following statements apply to input or output (I/O) against record parameters:
- A record passed from another program does not include record state such as the I/O error value endOfFile. Similarly, any change in the record state is not returned to the caller, so if you perform I/O against a record parameter, any tests on that record must occur before the program ends.
- Any I/O operation performed against the record uses the record properties specified for the parameter, not the record properties specified for the argument.
- For records of type indexedRecord, mqRecord, relativeRecord, or serialRecord, the file or message queue associated with the record declaration is treated as a run-unit resource rather than a program resource. Local record declarations share the same file (or queue) whenever the record property fileName (or queueName) has the same value. Only one physical file at a time can be associated with a file or queue name no matter how many records are associated with the file or queue in the run unit, and EGL enforces this rule by closing and reopening files as appropriate.
Related concepts
Program part
References to parts
References to variables and constants
Syntax diagram
Typedef
Related reference
Arrays
Basic record part in EGL source format
DataItem part in EGL source format
EGL source format
Indexed record part in EGL source format
INTERVAL
Naming conventions
Primitive types
Relative record part in EGL source format
Serial record part in EGL source format
SQL record part in EGL source format
TIMESTAMP