bdfp1m33Programming Concepts and Reference

DFSSU-Handling DBDEF Subtables

Use this macro to create a copy of the TPFDF and common subtables in a working storage block. The TPFDF subtable is the portion of the database definition (DBDEF) table that contains TPFDF-specific information such as item length and next available byte (NAB). The common subtable is the portion of the DBDEF table that contains information common to all entry control blocks (ECBs) accessing the file.

The DFSSU macro takes the multiple database function (MDBF) environment into consideration. Any values with subsystem user (SSU) overrides for the specified SSU are modified as appropriate. See TPFDF Database Administration for more information about SSU overrides.

Note:
The MDBF environment is available only in a TPF system.

Figure 23 shows how the parameters for the DFSSU macro allow access to the copy. The DBDEF parameter points to the base of the DBDEF table to be copied. The BASE parameter specifies which register points to the base of the working storage. The SW02SR DSECT has a set of labels suffixed by the character M to identify fields in the copy area.

Note:
SUFFIX=M in SW02SR is reserved for TPFDF product use.

Figure 23. DFSSU Macro: Create a Copy of the TPFDF and COMMON Subtables




Format




label
is a symbolic name assigned to the macro statement.

SETUP
allocates working storage (using a GETCC macro) on the data level specified by the LEVEL parameter.

REUSE
uses previously allocated working storage on the data level specified by the LEVEL parameter.

LEVEL=level
specifies the entry control block (ECB) data level, where level is the TPF or ALCS ECB data level to which the DBDEF subtables will be copied.

BASE=reg
specifies the register that will contain the address of the area to which the DBDEF subtables were copied, where reg is R0-R7, R14, or R15.

DBDEF=reg
specifies the location of the DBDEF to be copied, where reg is a register that points to the base of the DBDEF. Use register 0-7 (R0-R7), R14, or R15 for the value of reg.

ERROR=spmlbl
specifies where control is returned if the subsystem user of the ECB is excluded from the file whose DBDEF is being copied, where spmlbl is a symbolic name defined with the #LOCA structured programming macro (SPM). See TPFDF and TPF Structured Programming Macros for more information about SPMs.

ERRORA=asmlbl
specifies where control is returned if the subsystem user of the ECB is excluded from the file whose DBDEF is being copied, where asmlbl is an assembler label.

Entry Requirements

Normal Return

Error Return

If the subsystem user of the ECB is excluded from the file whose DBDEF is being copied, control is passed to the label specified by the ERROR or ERRORA parameter. If you did not specify the ERROR or ERRORA parameter, control is returned to the next sequential instruction.

Programming Considerations

You can specify the same register for the BASE and DBDEF parameters.

Examples

The following example will make a copy of the DBDEF subtables in the block already attached to data level F (DF). The copy will also be updated with information that is specific to the subsystem user of the ECB. R15 contains the address of the original DBDEF table on entry to the macro and it will contain the address of the DBDEF copy on return from the macro.

DFSSU REUSE,LEVEL=DF,DBDEF=R15,BASE=R15

Related Macros

None.