Program part properties vary by whether the program is called or main and, if main, by whether the program is of type basic or text UI. The properties are as follows:
The alias property is available in any program.
The allowUnqualifiedItemReferences property is available in any program.
Consider the following record part, for example:
Record aRecordPart type basicRecord 10 myItem01 CHAR(5); 10 myItem02 CHAR(5); end
The following variable is based on that part:
myRecord aRecordPart;
If you accept the default value of allowUnqualifiedItemReferences (no), you must specify the record name when referring to myItem01, as in this assignment:
myValue = myRecord.myItem01;
If you set the property allowUnqualifiedItemReferences to yes, however, you can avoid specifying the record name:
myValue = myItem01;
It is recommended that you accept the default value, which promotes a best practice. By specifying the container name, you reduces ambiguity for people who read your code and for EGL.
EGL uses a set of rules to determine the area of memory to which a variable name or item name refers. For details, see References to variables and constants.
The includeReferencedFunctions property is available in any program.
The default value is no, which means that you can ignore this property if you are fulfilling the following practices at development time, as is recommended:
If you are using shared functions that are not in a library, generation is possible only if you set the property includeReferencedFunctions to yes.
The inputForm property is available only in main text UI programs.
The inputRecord property is available in any main program.
The msgTablePrefix property is available in any basic or text UI program.
Programs that run in Web applications do not use a message table, but use a JavaServer Faces message resource. For details on that resource, see the description of the msgResource property in:
Related concepts
Program part
References to variables and constants
Segmentation in text applications
Related reference
DataTable part in EGL source format
forward
Input form
Input record
Naming conventions
PageHandler part in EGL source format
Syntax diagram
When you declare a main program that runs in a text application, you have the option to specify an input form, which is a form that is presented to the user before the program logic runs.
Two scenarios are possible:
The input form must be in the form group that you specified in the program-part declaration.
Related reference
Data initialization
Any main program part can have an input record, which is a global record that the EGL-generated program automatically initializes. The record must be of type basicRecord.
If the program starts as a result of a transfer with a record, the program initializes the input record (which is internal to that program), then assigns the transferred data to the record.
If the input record is longer than the received data, the extra area in the input record retains the values assigned during record initialization. If the input record is shorter than the received data, the extra data is truncated.
If primitive types in the transferred data are incompatible with the primitive types in the equivalent positions in the input record, the receiving program may end abnormally.
Related concepts
Overview of EGL properties and overrides
Parts
Compatibility with VisualAge Generator
Related reference
Data initialization
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.