bdfp1m20Programming Concepts and Reference

DBCKP-Checkpoint a Subfile

Use this macro to checkpoint a subfile; that is, all blocks in main storage that have been changed are copied to DASD.

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.

DETAC
places the subfile in detac mode after checkpointing the subfile. When the subfile is in detac mode, all modified blocks are saved in main storage. Any changes that you make to the LRECs in that subfile are not written to DASD until the subfile is checkpointed or closed. You can discard modified LRECs (prevent them from being written to DASD) by using the ABORT parameter of the DBCLS macro.
Note:
The TPF system and the ALCS environment issues a 000010 system error if an application program does not give up control in the time allotted by the application time-out counter. When processing in detac mode, a TPFDF application program can require more than the allotted time on a database with a large data structure. To prevent the 000010 system error, you can change the setting of the &TPFDBDV symbol in the DBLCL macro.

See TPFDF Installation and Customization for more information about the &TPFDBDV symbol and the DBLCL macro.

NODET
specifies that you do not want the subfile in detac mode after it has been checkpointed.

ERROR=spmlbl
branches to the specified location if a serious error is detected when processing the macro, where spmlbl is a TPFDF structured program macro (SPM) label defined with the #LOCA macro. See TPFDF and TPF Structured Programming Macros for more information about the #LOCA macro. See Identifying Return Indicators and Errors for more information about serious errors.

ERRORA=asmlbl
branches to the specified location if a serious error is detected when processing the macro, where asmlbl is an assembler label. See Identifying Return Indicators and Errors for more information about serious errors.

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.

TM
specifies one of the following:

NO
specifies that commit scopes are not used during checkpoint processing, regardless of what the database definition (DBDEF) macro has set as the default.

YES
specifies that commit scopes are used during checkpoint processing, regardless of what the DBDEF macro has set as the default. This option is valuable when many files are to be filed out during checkpoint processing (for example, detac mode, extensive B+Tree indexing updates, and requests that result in packing).

Entry Requirements

None.

Normal Return

The subfile remains open and the current logical record (LREC) remains the same.

Error Return

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

Programming Considerations

Examples

The following example saves any updates made to the current subfile.

DBCKP REF=GR30SR,ERROR=BFAQER6

Related Macros