Stand-alone log OPEN request

A stand-alone log OPEN request initializes the stand-alone log services.

Begin program-specific programming interface information.The syntax for the stand-alone log OPEN request is:

{label} DSNJSLR   FUNC=OPEN
                  ,LRSN=YES³NO
                  ,DDNAME= address or (Reg. 2-12) optional
                  ,RANGE= address or (Reg. 2-12) optional
                  ,PMO=CI or RECORD
Keyword
Explanation
FUNC=OPEN
Requests the stand-alone log OPEN function.
LRSN
Tells Db2 how to interpret the log range:
  • NO: the log range is specified as RBA values. This is the default.
  • YES: the log range is specified as LRSN values.
DDNAME
Specifies the address of an 8-byte area which contains the ddname to be used as an alternate to a ddname of the BSDS when the BSDS is opened, or a register that contains that address.
RANGE

Specifies the address of a 32-byte area that contains the log range that is to be processed by subsequent GET requests against the request block that is generated by this request, or a register that contains that address.

The area is 32-bytes. Bytes 7-16 contain starting RBA or LRSN value. Bytes 23-32 contain the end of the range or high RBA or LRSN value. An end-of-data condition is returned when a GET request tries to access a record with a starting RBA or LRSN value greater than this value. A value of 10 bytes of X'FF' indicates that the log is to be read until either the end of the log (as specified by the BSDS) or the end of the data in the last JCL-specified log data set is encountered.

If LRSN=NO, then the range is specified as RBA values. If LRSN=YES, then the range is specified as LRSN values.

If BSDS, GROUP, or MxxBSDS DD statements are used for locating the log data sets to be read, the RANGE parameter is required. If the JCL determines the log data sets to be read, the RANGE parameter is optional.

PMO
Specifies the processing mode. You can use OPEN to retrieve either log records or control intervals in the same manner. Specify PMO=CI or RECORD, then use GET to return the data you have selected. The default is RECORD.

The rules remain the same regarding control intervals and the range specified for the OPEN function. Control intervals must fall within the range specified on the RANGE parameter.

Output
Explanation
GPR 1
General-purpose register 1 contains the address of a request block on return from this request. This address must be used for subsequent stand-alone log requests. When no more log GET operations are required by the program, this request block should be used by a FUNC=CLOSE request.
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.

Log control interval retrieval

You can use the PMO option to retrieve log control intervals from archive log data sets. DSNJSLR also retrieves log control intervals from the active log if the Db2 system is not active. During OPEN, if DSNJSLR detects that the control interval range is not within the archive log range available (for example, the range purged from BSDS), an error condition is returned.

Specify CI and use GET to retrieve the control interval you have chosen. The rules remain the same regarding control intervals and the range specified for the OPEN function. Control intervals must fall within the range specified on the RANGE parameter.

Log control interval format

Log control intervals are returned in their actual format and the caller is responsible for using the correct mapping. The format of the control interval can be determined by examining the first bit of the second to last byte (offset 4094). End program-specific programming interface information.