EGL Reference Guide for iSeries

Program part properties

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:

alias = alias
A string that is incorporated into the names of generated output. If you do not set the alias property, the program-part name (or a truncated version)is used instead.

The alias property is available in any program.

allowUnqualifiedItemReferences = no, allowUnqualifiedItemReferences = yes
Specifies whether to allow your code to omit container and substructure qualifiers when referencing items in structures.

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.

includeReferencedFunctions = no, includeReferencedFunctions = yes
Indicates whether the program contains a copy of each function that is neither inside the program nor in a library accessed by the program.

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.

inputForm = formName
Identifies a form that is presented to the user before the program logic runs, as described in Input form.

The inputForm property is available only in main text UI programs.

inputRecord = inputRecord
Identifies a global, basic record that a program automatically initializes and that may receive data from a program that uses a transfer statement to transfer control. For additional details, see Input record.

The inputRecord property is available in any main program.

msgTablePrefix = prefix
Specifies the first one to the four characters in the name of the data table that is used as the message table for the program. The other characters in the name correspond to one of the national language codes listed inDataTable part in EGL source format.

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:

segmented = no, segmented = yes
Indicates whether the program is segmented, as explained in Segmentation. The default is no in main text UI programs. The property is not valid in other types of programs.


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

Input form

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

Input record

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


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]