bdfp1m2vProgramming Concepts and Reference

DFCLIB-C Language Interface

This macro provides an interface from TPFDF assembler programs to TPFDF C language programs. Use this macro in TPFDF assembler programs to make a single line call to TPFDF C language code. This macro simplifies coding and provides one central point that can be updated if the interface changes.

Format




label
is a symbolic name assigned to the macro statement.

reg
is a register that contains the appropriate value based on the specified parameter.

label1
is a label that contains the appropriate value based on the specified parameter.

I/value
specifies an immediate value based on the specified parameter.

IBT_DELETE
deletes a key from the B+Tree index when the last logical record (LREC) in the block is deleted, where:

PARAM1
specifies the core address of the first LREC in the block that is being deleted.

IBT_INSERT
inserts a key into the B+Tree index when a data block is split or when a new data block is added, where:

PARAM1
specifies the core address of the first LREC in the new data block.

PARAM2
specifies the file address of the new data block.

The default keys contained in the first LREC of the new data block are inserted into the B+Tree index.

IBT_REPLACE
replaces a key in the B+Tree index when the first LREC in a data block is deleted and there are more LRECs in the same data block, or when a new LREC becomes the first LREC in the data block, where:

PARAM1
specifies the core address of the old first LREC in the data block; that is, the LREC that is to be replaced.

PARAM2
specifies the file address of the data block.

PARAM3
specifies the core address of the new first LREC in the data block; that is, the LREC that is to replace the LREC specified by the PARAM1 parameter.

IBT_SEARCH
locates a data block using the B+Tree index, where:

PARAM1
specifies the core address of the LREC that is being added or deleted during an add or delete operation. If this is not an add or delete operation, the parameter is ignored.

RETURN
specifies the location of the data block file address or zero.

IBT_CLOSE
specifies one of the following:

PARAM1
specifies one of the following values:

IBT_CLOSE_FINAL
commits DETAC mode updates.

IBT_CLOSE_ABORT
stops DETAC mode updates and prevents any updates made in DETAC mode from being written to DASD.

IBT_CLOSE_SUBFILE
closes a B+Tree index.

IBT_BUILD
inserts one data block into a B+Tree index when rebuilding the entire B+Tree index, where:

PARAM1
specifies the core address of the first LREC in the data block.

PARAM2
specifies the file address of the data block.

ICD_KEYCHK
Verifies that global modification does not attempt to change the default keys of a logical record (LREC).

Entry Requirements

SW00SR REG=R3 must be declared before the macro call with register 3 (R3) set to be the base of the SW00SR DSECT.

Normal Return

SW00RET bit 0 and SW00RT2 bit 4 return zero.

Error Return

SW00RET bit 0 and SW00RT2 bit 4 return an error indicator.

Programming Considerations

Examples

Related Macros

None.