EGL initializes the variable in accordance with the ResourceAssociation part that is used at generation time; for more information, see the Resource associations part. You can change the object of your I/O operations at run time by placing a different value in the recordName.resourceAssociation variable.
In most cases, you must use the syntax recordName.resourceAssociation. If EGL can determine the record that you intended, you do not need to specify the recordName portion, as in each of the following cases:
The value that you move into recordName.resourceAssociation must be a valid system resource name for the system and file type that you specified when the program was generated. If more than one record specifies the same file name and you modify resourceAssociation for any record with that file name, the value of resourceAssociation changes for all the records in the program that have the same file name.
To close the file that is associated with the current setting of resourceAssociation, use a close statement. EGL automatically closes all open files when a run unit ends or a segmented converse occurs.
For COBOL environments, EGL folds the contents of resourceAssociation to uppercase before it uses those contents to access a file. However, the value that you place in resourceAssociation remains unchanged for comparison purposes.
If multiple programs share a system resource, each program must set resourceAssociation to refer to the same resource. If two programs in the same run unit access the same logical file, each program must set resourceAssociation to the same system resource name at generation time to ensure that both programs access the same system resource at run time.
If two programs use the same EGL file name, each of the record-specific resourceAssociation variables must contain the same value. Otherwise the previously opened system resource is closed when a new one is opened.
The system resource name for WebSphere® MQ records defines the queue manager name and queue name. Specify the name in the following format:
queueManagerName:queueName
As shown, the names are separated with a colon. However, you can omit queueManagerName and the colon. The system resource name is the initial value for the record-specific resourceAssociation field and identifies the default queue that is associated with the record. For more information, see WebSphere MQ message queue access.
Platform | Issue |
---|---|
CICS® for z/OS® |
|
IMS™ BMP | IMS BMP supports the same file types that are supported for IMS/VS in addition to those that are supported for z/OS batch. |
IMS/VS |
|
iSeries® COBOL | The fileType must
be seq (sequential) or vsam.
You can move the value to resourceAssociation in
one of the following ways:
When you modify the value in resourceAssociation,
the iSeries OVRDBF command
functions in the following manner:
The value set in resourceAssociation is propagated from the call level and is changed to all its subordinate call levels. The value is not propagated if the file was previously opened by the program. |
MQSeries | The system resource name for WebSphere MQ records defines the queue manager name and queue name. Use the following format to specify the name: queueManagerName:queueName
As shown, the names are separated with a colon. However, queueManagerName and the colon can be omitted. The system resource name is used as the initial value for the record-specific resourceAssociation field and identifies the default queue associated with the record. |
z/OS batch |
|