Stand-alone log GET request

A stand-alone log GET request returns a pointer to a buffer that contains the next log record, based on position information in the request block.

Begin program-specific programming interface information.A log record is available in the area pointed to by the request block until the next GET request is issued. At that time, the record is no longer available to the requesting program. If the program requires reference to a log record's content after requesting a GET of the next record, the program must move the record into a storage area that is allocated by the program.

The first GET request, after a FUNC=OPEN request that specified a RANGE parameter, returns a pointer in the request feedback area. This points to the first record with a log RBA value greater than or equal to the low log RBA value specified by the RANGE parameter. If the RANGE parameter was not specified on the FUNC=OPEN request, then the data to be read is determined by the JCL specification of the data sets. In this case, a pointer to the first complete log record in the data set that is specified by the ARCHIVE, or by ACTIVE1 if ARCHIVE is omitted, is returned. The next GET request returns a pointer to the next record in ascending log RBA order. Subsequent GET requests continue to move forward in log RBA sequence until the function encounters the end of RANGE RBA value, the end of the last data set specified by the JCL, or the end of the log as determined by the bootstrap data set.

The syntax for the stand-alone log GET request is:

{label} DSNJSLR   FUNC=GET
                  ,RBR=(Reg. 1-12)
Keyword
Explanation
FUNC=GET
Requests the stand-alone log GET function.
RBR
Specifies a register that contains the address of the request block this request is to use. Although you can specify any register in the range 1–12, using register 1 (RBR=(1)) avoids the generation of an unnecessary load register and is therefore more efficient. The pointer to the request block (that is passed in register n of the RBR=(n) keyword) must be used by subsequent GET and CLOSE function requests.
Output
Explanation
GPR 15
General-purpose register 15 contains a return code upon completion of a request. For nonzero return codes, a corresponding reason code is contained in register 0.
GPR 0
General-purpose register 0 contains a reason code associated with a nonzero return code in register 15.

Reason codes 00D10261–00D10268 reflect a damaged log. In each case, the RBA of the record or segment in error is returned in the stand-alone feedback block field (SLRFRBA). A damaged log can impair Db2 restart; special recovery procedures are required for these circumstances.

Information about the GET request and its results is returned in the request feedback area, starting at offset X'00'. If there is an error in the length of some record, the control interval length is returned at offset X'0C' and the address of the beginning of the control interval is returned at offset X'08'.

On return from this request, the first part of the request block contains the feedback information that this function returns. Mapping macro DSNDSLRF defines the feedback fields which are shown in the following table. The information returned is status information, a pointer to the log record, the length of the log record, and the 6-byte or 10-byte log RBA value of the record.

Table 1. Stand-alone log get feedback area contents
Field name Hex offset Length (bytes) Field contents
SLRFRC 00 2 Log request return code
SLRFINFO 02 2 Information code returned by dynamic allocation. Refer to the z/OS® SPF job management publication for information code descriptions
SLRFERCD 04 2 VSAM or dynamic allocation error code, if register 15 contains a nonzero value.
SLRFRG15 06 2 VSAM register 15 return code value.
SLRFFRAD 08 4 Address of area containing the log record or CI
SLRFRCLL 0C 4 Length of the log record or RBA
SLRFRBA16 10 16 Log RBA of the log record
SLRFDDNM 20 8 ddname of data set on which activity occurred
SLRFMBID 28 8 Member identification of the current log record

End program-specific programming interface information.