z/OS JES Application Programming
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Using RPL-based macros

z/OS JES Application Programming
SA32-0987-00

All I/O requests are specified using an RPL. The RPL contains the address of an open ACB. You build the RPL using the GENCB service, or map it with the IFGRPL macro. You can then use SHOWCB and MODCB for some functions. The storage for the RPL must be resident below the 16 megabyte line.

The processing options are specified in the RPLOPTCD parameter. Only a subset of those defined by VSAM are recognized by JES. In particular, spool data set browse supports only "move mode" (OPTCD=MVE) processing. OPTCD=SYN can be specified for synchronous requests (the default), or OPTCD=ASY can be used for asynchronous processing.

Your application must obtain a buffer area where JES places the record it reads. The address of the area is placed in RPLAREA and its length in RPLBUFL. If the area is not large enough to contain the record, JES sets an error code in the RPL. The storage for the buffer may be resident above the 16 megabyte line.

Your application reads each record using a GET macro which points to the RPL. When synchronous processing is used, control returns to the application when the GET is complete and the record has been moved to the application provided area. JES sets the length of the returned record in field RPLRLEN.

When asynchronous processing is used, your application must issue a CHECK macro specifying the RPL that is to be waited on. Control then returns to your application when the function specified by the RPL is complete.

After each GET request, JES returns a token your application can use to position directly to the record if it needs to be reread. JES returns the 8 byte token in field RPLRBAR after each GET. Your application should treat RPLRBAR strictly as a token, and not depend on it to be in a specific format.

Start of changeYour application can use the POINT macro to locate a previously read record. POINT specifies an RPL that contains an RPLRBAR that was returned on the GET request for the record you want. POINT positions JES to the record to be read; it does not read the record. A GET macro must be issued after the POINT to retrieve the record. Input to POINT is an 8 byte RBA value pointed to by RPLARG. This RBA value can be either a RPLRBAR value that was saved from a previous GET request, or a record number that is relative to the start of the data set (0-16,777,215). If the record that is requested is not found due to an I/O error, the result depends upon whether it is being processed by a JES2 or JES3 subsystem, as follows:Start of change
JES2:
For JES2, if the record that is requested for POINT is not found due to an I/O error, POINT processing positions to the last record of the previous buffer that it can read. A GET request after this POINT will return records starting from the positioned record. If the record requested by GET is not found due to an I/O error, GET processing positions to a buffer that it can successfully read and continues returning the records. If records are skipped on a GET request due to I/O error and IAZDSINF is provided, the indicator DSIN1RSK(X'40') is set in DSINFLG1 to indicate the skipped records. If the I/O error is at the end of the data set (no buffers found after the I/O error), the EOF and DSIN1RSK indicators are set.
JES3:
For JES3, if the record requested for POINT is not found, POINT processing fails, leaving the data set in an undefined state. A GET request after a failed POINT results in unpredictable data being returned. If the record requested by GET is not found due to an I/O error, the remainder of the current data set is skipped.
End of changeEnd of change

Each GET request returns a logical record in the file. The application is isolated from the internal format of the record. JES places the complete record in the RPLAREA buffer and its length in the RPLRLEN field. JES performs the necessary unwritten buffer support for active jobs; however, no indication of the source of the record is placed in the RPL. JES places feedback information in the RPL after each request. RPLRTNCD and RPLCNDCD should be checked for satisfactory completion after each operation.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014