DataTable properties
You define each DataTable part in its own EGL source file, where you can specify any of the following properties. The contents property is the only one that is required.
- alias
- A string (enclosed in quotation marks) that is incorporated into the names of generated output. If you do not specify an alias, the DataTable name is used instead.
- contents
- An array of values for the DataTable cells. Each row in the array
represents one row in the table. Each row is formatted as specified
in the column definitions. Each value is one of the following literal
types:
- A numeric literal
- A string literal or a concatenation of string literals
- A Boolean literal (YES or NO, TRUE or FALSE)
- resident
- A Boolean value that indicates whether the DataTable is kept in
memory after all the programs that accessed the DataTable have ended.
Valid values are YES and NO (the default). If you set the resident property
to YES, the DataTable is shared regardless of the value of the shared property.
Making a DataTable resident has the following benefits:
- Retention of any values written to it by programs that ran previously.
- Availability for immediate access without additional load processing.
- shared
- A Boolean value that indicates whether the same instance of a DataTable is used by every program in the same run unit. If shared is set to YES, all the programs in the run unit share the same copy of the DataTable. If shared is set to NO (the default), each program in the run unit has a unique copy of the DataTable.
Compatibility
| Platform | Issue |
|---|---|
| COBOL generation | The maximum length for the generated name is 7 characters. |
| CICS® | If you set the resident property to YES for a DataTable, do not set the RESIDENT keyword to YES on the CICS® RDO PROGRAM definition for the DataTable program. A resident DataTable remains loaded
until one of the following occurs:
The shared property indicates whether the same instance of a DataTable is used by every program in the CICS® region and by every program in a given run unit. If you modify a shared table, the modifications are effective for all users of the table in the same CICS® region until the table is reloaded. If your program updates a shared table, make the entire update between I/O statements or between program, library, or service calls. Do not obtain a value from the DataTable before the I/O statement or call and then modify the DataTable based on the value you obtained after the I/O or call statement. Another user's transaction might have gotten control at the I/O or call statement and updated the same DataTable in the middle of your update operation. If synchronization is required across an I/O or call statement, use an external serialization method. |
IMS BMP |
A resident DataTable remains loaded until
one of the following situations occurs:
If the resident property is set to NO, the shared property is ignored. Each job step has a separate copy of the table. |
| IMS/VS | A resident DataTable remains loaded until
one of the following situations occurs:
Modification of shared DataTables is not supported. |
| iSeries® COBOL | A resident DataTable remains loaded until
one of the following situations occurs:
|
| Java™ generation | A resident DataTable remains loaded until the run unit ends. However, a non-resident DataTable is unloaded when the program that uses it ends. |
| JavaScript™ generation | DataTable is not supported. |