Resource associations part

The resource associations part is a set of association elements, each of which has these characteristics:
You can think of an association element as a set of properties and values in a hierarchical relationship, as in the following example:
  // an association element
  property:  fileName
  value:     myFile01

    // an entry, with multiple properties
    property:  system
    value:     aix
    property:  fileType
    value:     spool
    property:  systemName
    value:     employee

    // a second entry
    property:  system
    value:     win
    property:  fileType
    value:     seqws
    property:  systemName
    value:     c:\myProduct\myFile.txt
In this example, the logical file name myFile01 is related to these physical files:

The file name must be a valid name, an asterisk, or the beginning of a valid name followed by an asterisk. The asterisk is the wildcard equivalent of one or more characters and provides a way to identify a set of names. For example, an association element that includes the following value for a file name pertains to any file name that begins with the letters myFile:

  myFile*

If multiple elements are valid for a file name used in your program, EGL uses the first element that applies. For example, a series of association elements might be characterized by the following values for a file name, in order:

  myFile
  myFile*
  *

Consider the element associated with the last value, where the value of the file name is only an asterisk. Such an element could apply to any file; but in relation to a particular file, the last element applies only if the previous elements do not. For example, if your program references myFile01, the linkage specified in the second element supersedes the third element to define how the reference is handled.

At generation time, EGL selects a particular association element, along with the first entry that is appropriate. An entry is appropriate in either of two cases:

For example, if you are generating for AIX, EGL uses the first entry that refers to aix or to any.

File types

A file type determines what properties are necessary for a given entry in an association element. The next table describes the EGL file types.

File type Description
gsam A serial or print file that is associated with a GSAM database.
ibmcobol A serial, indexed, or relative file. ibmcobol is supported for the following kinds of code:
  • The EGL debugger on a Windows platform.
  • EGL-generated Java™ code that runs on a Windows or AIX platform to provide access to remote VSAM files located on z/OS®.
  • EGL-generated Java code that provides access to VSAM files that are local on AIX.

ibmcobol is not supported by the EGL debugger on Linux, nor for EGL-generated Java code that is generated for any runtime environment other than Windows or AIX.

mmsgq A serial file associated with a multi-segment message queue.
mq An WebSphere® MQ message queue; for details on how to work with such a queue, see your WebSphere MQ documentation.
seq A serial file accessed by a COBOL program that runs on z/OS under the control of JCL (not under CICS®) or runs on iSeries®. This type of file is accessed by COBOL READ/WRITE statements. On z/OS, access of the data set is faster than if you specify seqrs as the file type. When seq is specified, however, these restrictions are in effect:
  • The system name must be a DD name that matches a DD name in the JCL
  • Your code cannot change the system name at run time
seqrs A serial file accessed by a COBOL program that runs on z/OS under the control of JCL (not under CICS). This type of file is accessed by the EGL runtime. File access is slower than if you specify seq as the file type, but you have greater flexibility:
  • When you specify the system name, you can specify either a DD name or a data set name; for details, see the topic "Association elements"
  • You can override the system name at runtime by changing the value in the record-specific variable resourceAssociation (for files) or in the system variable converseVar.printerAssociation (for print output).
seqws A serial file accessed by an EGL-generated Java program.
smsgq A serial or print file associated with a single-segment message queue.
spool A spool file on AIX, CICS, iSeries COBOL, or Linux.
tempaux A CICS auxiliary temporary storage queue.
tempmain A CICS main temporary storage queue.
transient A CICS transient data queue.
vsam On IBM® i, a file of type vsam is an emulated VSAM file accessed by an EGL-generated COBOL program.
On z/OS batch, the file is a VSAM data set accessed by an EGL-generated COBOL program. The data set is accessed by COBOL READ/WRITE statements, and access of the data set is faster than if you specify vsamrs as the file type. When vsam is specified, however, these restrictions are in effect:
  • The system name must be a DD name that matches a DD name in the JCL
  • Your code cannot change the system name at run time
  • A indexed record associated with the file name cannot be used in a get previous statement
vsam is not supported for IMS/VS.
On CICS, a file of type vsam is a VSAM data set accessed by an EGL-generated COBOL program. The data set is accessed by EXEC CICS commands. On CICS you can do as follows:
  • When you specify the system name, you specify the CICS FCT name.
  • You can override the system name at run time by changing the value in the record-specific variable resourceAssociation.
  • An indexed record associated with the file name can be used in a get previous statement.

vsam is also supported for the following kinds of code:

  • Remote VSAM access from the EGL debugger on the Windows or Linux platform.
  • Remote VSAM access from any EGL-generated Java program.
vsamrs For z/OS batch and IMS™ BMP, a file of type vsam is a VSAM data set accessed by an EGL-generated COBOL program. The data set is accessed by the EGL runtime. File access is slower than if you specify vsam as the file type, but you have greater flexibility:
  • When you specify the system name, you can specify either a DD name or a data set name; for details, see the topic "Association elements".
  • You can override the system name at run time by changing the value in the record-specific variable resourceAssociation (for files).
  • An indexed record associated with the file name can be used in a get previous statement.

Valid file types of target runtime environment

The following table describes the valid file types available based on your target runtime environment. It also shows the default file types according to target runtime environment and record type.
Target runtime environment IndexedRecord RelativeRecord SerialRecord PrintForm
Java generation
  • ibmcobol *
  • vsam
  • ibmcobol *
  • vsam
  • seqws*
  • ibmcobol *
  • vsam
  • seqws (1)
IMS/VS n/a n/a
  • smsgq*
  • mmsgq
  • smsgq*
IMS BMP
  • vsam
  • vsamrs*
  • vsam
  • vsamrs*
  • seq
  • seqrs*
  • vsam
  • vsamrs
  • gsam
  • smsgq
  • mmsgq
  • seq
  • seqrs*
  • smsgq
  • gsam
iSeries COBOL
  • vsam*
  • vsam*
  • seq*
  • vsam
  • seq*
  • spool
z/OS batch
  • vsam
  • vsamrs*
  • vsam
  • vsamrs*
  • seq
  • seqrs*
  • vsam
  • vsamrs
  • seq
  • seqrs*
  • gsam
z/OS CICS
  • vsam*
  • tempaux
  • tempmain
  • vsam*
  • spool
  • tempaux
  • tempmain
  • transient
  • vsam*
  • spool
  • transient*
Debug
  • ibmcobol*
  • vsam
  • ibmcobol*
  • vsam
  • ibmcobol
  • seqws
  • vsam
  • seqws (1)
The following notes apply to the previous table:
*
Indicates the default file type.
(1)
By default, print forms in Java and Debug send their output to a printer rather than a file, and a resource association is not used.