z/OS JES3 Customization
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


ADEBLOCK (Retrieve a Record from a Multirecord File)

z/OS JES3 Customization
SA32-1006-00

The ADEBLOCK macro retrieves a logical record or a record section of a spanned record from a multirecord file (MRF). (A spanned record is a record that is larger than the spool buffer.) When a logical record spans a buffer boundary, the ADEBLOCK routine combines the record into a contiguous area.

When the ADEBLOCK macro retrieves a spanned logical record, the data is retrieved in “record sections.” The length of the first and last record sections varies from 1 byte to the buffer size minus 44 bytes. The length of the middle record sections is always the buffer size minus 44 bytes.

To determine what type of data is being retrieved, check flag byte FCTSPFLG in the FCT.
  • If FCTSPFLG=FCTNOSPN, the data is a normal logical record.
  • If flag FCTSPAN is on, the data is part of a spanned record.
  • If FCTSPFLG=FCTSPFIR, the data is the first record section of a spanned record. In this case, field FCTSPLRL in the FCT contains the logical record length.
  • If FCTSPFLG=FCTSPNTH, the data is a record section between the first and last record sections of a spanned record.
  • If FCTSPFLG=FCTSPLST, the data is the last record section of a spanned record.

To determine the carriage control information, check flag byte FCTCCFLG in the FCT.

On return, register 1 contains the address of the record, register 0 contains the length of the record, and register 15 contains the original logical record length of the record. Original logical record length is also available in FCTLRECL while return from the macro.
TRUNC=NO
If TRUNC=NO is specified in the BUFFER or SYSOUT initialization statements, then the length of the record and original logical record length will be the same for non-spanned records. That is, register 0 and register 15 will have the same value on return.
TRUNC=YES
If TRUNC=YES is specified, then the length of the record will be different from the original logical record length, when trailing blanks existed in the record. That is, register 0 will have truncated length whereas register 15 will have the non-truncated length (original logical record length).

For spanned records, register 0 contains the 'record section' length whereas register 15 contains the original logical record length. FCTSPLRL and FCTLRECL will contain the same value, if TRUNC=NO. However, they will be different, if TRUNC=YES and trailing blanks exist in the spanned record. For pre=HJSS7708, DATCC extension does not exist in the record. Original logical record length is not available. In such cases, register R15 and FCTLRECL will be zero.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2013