bdfp1m2hProgramming Concepts and Reference

DBRET-Retain a Logical Record Position

Use this macro to retain the file address and displacement in a block of the current logical record (LREC). You can read this LREC later in your application program by using a DBRED macro with a PREVIOUS, STACK, or STACKREF parameter.

Format




REF=dsectvv
specifies the file or subfile that you want to access, where dsectvv is the DSECT name and an optional 2-character version.

REF=refname
specifies the file or subfile that you want to access, where refname is a label that references the DSECT name in one of the following formats:

refname
is the label of an 8-byte field that contains the 6-byte DSECT name and an optional 2-character version.

A/refname
is the label of a 4-byte field that contains the storage address of the DSECT name and an optional 2-character version.

FILE=dsect
specifies the file or subfile that you want to access, where dsect is the DSECT name.

R3=address
specifies the location of the SW00SR slot for this subfile, where address is the label of a field that contains the address of the SW00SR slot. Register 3 will be loaded with this address.
Note:
Do not use this parameter; it is provided only for migration purposes. Use the REF parameter to specify the file that you want to access.

REG=register
specifies a register in which to return the address of the current LREC (this address is contained in SW00SR field SW00REC). You must specify this parameter for T-type files.

REGD=register
specifies a register in which to return the base address of the userLREC part of an extended LREC.

STACK=stkloc
retains an LREC, where stkloc is the location of a 10-byte field that contains the details about the LREC. Specify one of the following:

The 10-byte field contains the following information:

Note:
Where possible, use the STACKREF parameter.

STACKREF=stkval
retains an LREC, where stkval is a value assigned to the LREC. Specify one of the following:

The retained information consists of the following 14-bytes:

Note:
Where possible, use the STACKREF parameter instead of the STACK parameter.

SUFFIX=char
allows you to use the same DSECT to map two different areas of storage, where char is the suffix character.

Entry Requirements

Before using this macro, you must open the subfile using the DETAC or HOLD parameter of the DBOPN macro.

Normal Return

None.

Error Return

 See Identifying Return Indicators and Errors for information about how to check the error indicators. 

Programming Considerations

Examples

Related Macros

DBRED-Read a Logical Record.