Special considerations apply to serial files that are implemented
as GSAM files or as IMS™ message
queues
For GSAM (generalized sequential access method) files in the IMS BMP or z/OS® batch environments, the following special
considerations apply:
- get next is the only form of the get statement
that you can use with GSAM.
- A single program cannot include a combination of add and get
next statements for the same GSAM file.
- A get next statement for a serial record
that is associated with a GSAM file results in a GN call to the GSAM
database.
- If you read a variable-length serial record from a file that is
associated with GSAM and the record length is longer than the physical
file, DL/I returns a blank status code. Data is truncated, but no
message is issued because the situation cannot be detected.
For serial files associated with an IMS message
queue in the IMS BMP or z/OS batch environments, the following
special considerations apply:
- get next is the only form of the get statement
that you can use with IMS message
queues.
- A single program cannot include a combination of add and get
next statements for the same IMS message queue.
- To use the get next statement for a
serial file that is associated with an IMS message
queue, you must associate the serial file with the I/O PCB.
- The get next statement is not supported
for a textUI program or for a basic program that is called from a
textUI program. Basic programs can associate only one serial input
file with the I/O PCB. EGL automatically removes the IMS message header (length, ZZ field, and transaction
code) from the message before moving the data to the serial record.
- A get next statement for a serial record
that is associated with a single-segment message queue results in
a GU call to the I/O PCB. This GU call results in an automatic commit
point.
- The first get next statement for a serial
record that is assigned to a multiple-segment message queue results
in a GU call to the I/O PCB. Subsequent get next statements
result in GN calls until a noRecordFound (status
code QD) condition is reached. The first get next after
the noRecordFound results in another GU
call and this processing continues until an endOfFile (status
code QC) is reached. Each GU call results in an automatic commit point.
- During any specific scheduling of a basic program, the program
can use a get next statement for only one
message queue. The transaction code for which IMS scheduled the program determines the message
queue that is read. The system resource that is specified during generation
is ignored.