bdfp1m2v | Programming Concepts and Reference |
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:
- Commit or stop DETAC mode updates to B+Tree index nodes.
- Close an entire B+Tree index for a subfile following a DBCLS
macro.
- 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
- The contents of R0-R7 are preserved across this macro call.
- The contents of R14 and R15 cannot be predicted.
- You must code a DFCLIB macro with the IBT_BUILD parameter for every
data block in a subfile when rebuilding a B+Tree index. In
addition, the data blocks must be passed to the DFCLIB macro in a specific
order. Overflow blocks must be passed first, in order, according to
their forward chain fields. The prime block must then be passed as the
last data block to the DFCLIB macro.
Examples
- The following example deletes a key from the B+Tree
index. R5 contains the core address of the first LREC in the block
being deleted.
DFCLIB FUNCTION=IBT_DELETE,PARAM1=R5
- The following example inserts a key in the B+Tree index.
R5 contains the core address of the first LREC in the new data block.
Field EBW000 contains the file address of the new data block.
DFCLIB FUNCTION=IBT_INSERT,PARAM1=R5,PARAM2=EBW000
- The following example commits any DETAC mode updates to the
B+Tree index nodes.
DFCLIB FUNCTION=IBT_CLOSE,PARAM1=I/IBT_CLOSE_FINAL
Related Macros
None.