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 by the EGL debugger when running on Windows or for Java™ code generated for Windows to provide access to remote VSAM files located on z/OS®. ibmcobol is also supported by Java code generated for AIX to provide access to local files. ibmcobol is not supported by the EGL debugger when running on Linux®, nor for Java code 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, or Linux.
tempaux A CICS auxiliary temporary storage queue.
tempmain A CICS main temporary storage queue.
transient A CICS transient data queue.
vsam On iSeries, this is an emulated VSAM file accessed by an EGL-generated COBOL program.
On z/OS batch, this is a VSAM data set accessed by an EGL-generated COBOL program. This type of 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
On CICS, this is a VSAM data set accessed by an EGL-generated COBOL program. This type of data set is accessed by EXEC CICS commands. On CICS you can do the following:
  • 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.
vsamrs For z/OS batch, a VSAM data set accessed by an EGL-generated COBOL program. This type of file 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
Java generation
  • ibmcobol * (2)
  • ibmcobol * (2)
  • seqws*
  • ibmcobol * (2)
IMS/VS n/a n/a
  • smsgq*
  • mmsgq
IMS™ BMP
  • vsam
  • vsamrs*
  • vsam
  • vsamrs*
  • seq
  • seqrs*
  • vsam
  • vsamrs
  • gsam
  • smsgq
  • mmsgq
iSeries COBOL
  • vsam*
  • vsam*
  • seq*
  • vsam
z/OS batch
  • vsam
  • vsamrs*
  • vsam
  • vsamrs*
  • seq
  • seqrs*
  • vsam
  • vsamrs
z/OS CICS
  • vsam*
  • tempaux
  • tempmain
  • vsam*
  • spool
  • tempaux
  • tempmain
  • transient
  • vsam*
Debug
  • ibmcobol* (1)
  • ibmcobol* (1)
  • ibmcobol (1)
  • seqws
The following are some notes for the above table:
*
Indicates the default file type.
(1)
The ibmcobol file type is supported only by the EGL debugger when running on Windows. It is only used to provide remote access from the debugger to VSAM files on a z/OS system. The ibmcobol file type is not supported by the EGL debugger when running on Linux.
(2)
ibmcobol is supported for Java code generated for Windows to provide remote access to VSAM files on a z/OS system. ibmcobol is also supported for Java code generated for AIX to provide access to local files. The ibmcobol file type is not supported for Java code generated for any other environment.

For further details

For information on parts, records, database support and other details specific to the EGL language, see the following topics in the EGL Language Reference:
  • "Data access technologies"
  • "EGL projects, packages, and files"
  • "Naming, parts and scope"
  • "Record part"
  • "File I/O"

Feedback