Customizing the TPFDF code for your installation
Some TPFDF macros and a TPFDF header file require adjustments for individual installations. The following sections outline the changes required for TPFDF macros, programs, utilities, or the header file, including:
- Setting symbols in the DBLCL macro.
- Setting symbols in the ACPDBE macro.
- Setting parameters in the C$ACPDBE header file.
- Setting parameters in the C$CRUUSR header file.
- Setting symbols in the BLKSZ macro.
These macros are found in the data set with the trailing qualifier, BDFMAC1. The header file is found in the data set with the trailing qualifier, BDFHDR1. If they need to be changed, use a user modification (SMP/E USERMOD).
Setting symbols in the DBLCL macro
The DBLCL macro contains SETB and SETC instructions, which define installation options for the TPFDF product. The following table describes the symbols defined in the DBLCL macro and provides information about the recommended settings.
| DBLCL Symbol | Description and Setting |
|---|---|
| &ACPDBAA | Specify whether ECBs processing ZUDFM commands will use an Agent Assembly Area (AAA).
|
| &ACPDBCB |
|
| &ACPDBFS | Enables TPFDF to create a block trailer and to stamp each block with the time, the command,
and so on when a block is filed on DASD. You can display the stamped information using the ZUDFM OAF
and ZUFDM OA*/D/HDR commands.
|
| &ACPDBID | Used to specify the ID range formula.
|
| &ACPDBIN | Determines if a TRAPC START should be
generated at the beginning of each macro expansion, and TRAPC
COMPLETE at the end. Note:
You must provide the TRAPC macro.
|
| &ACPDBOF | Offline operating environment.
|
| &ACPDBST |
|
| &ACPDBSY | Specify online operating environment.
|
| &ACPDB4K |
|
| &DB0138 | Specifies when message DB0138 is issued to inform you that an application program attempted
to access a pool file address that was previously released by another application program. The
initial setting is 0.
|
| &DB013A | Specifies if a DB013A system error is issued to inform you that a file was read backward
without having full backward chaining defined. The initial and recommended setting is 0.
Note:
See TPFDF Database Administration for information about backward chaining. See TPFDF Programming Concepts and Reference for more information about reading backward. |
| &DB013E | Specifies whether system error DB013E returns to the application program or exits the entry
control block (ECB). The initial setting is 0.
|
| &DFMDBF | Indicates if TPFDF is enabled for an MDBF environment.
|
| &DFPAGE | Does not apply to ALCS systems. |
| &DFRECAB | Does not apply to ALCS systems. |
| &DFREP | Does not apply to ALCS systems. |
| &DF31BIT | Indicates if all customer-written TPFDF application programs are allocated in 31-bit
addressing mode.
|
| &INHIDEF | Does not apply to ALCS systems. |
| &KMNVAL | Specifies the severity value for the following key organization MNOTEs:
The initial setting is 8. You can set a lower value but this may cause MNOTE errors to be overlooked when you assemble TPFDF programs. |
| &L3DBIFB | Specifies whether L3 blocks are being used for the database interface block (DBIFB) as
defined by the #TPFDBSW value in the ACPDBE macro. The initial setting is NO. Do not change this
value. A corresponding value must be set for variable _L3DBIFB in the C/C++ C$ACPDBE header file.
|
| &L3ORL4 | Set to the 4-K block size equate to be used by the TPFDF product for system databases and working storage. Allowed values are L3 or L4. The same value must be used for variable _L3ORL4 in the C/C++ C$ACPDBE header file. Additionally _L3ORL4S in the C/C++ C$ACPDBE header file should be set to 4000 when using L3 and 4095 when using L4.The initial setting is L4. |
| &MISTYPE | An array that allows you to declare as many as 20 record-type prefixes for miscellaneous record-type files. This array is used to identify miscellaneous record-type files for additional validation of the EO# value in a DBDEF macro statement and the &SW00EO# value in a DSECT macro statement. The initial setting is #MISC. Other miscellaneous record-type files can be added to the array as needed. |
| &MODCHECK | Performs additional checks with the DBMOD command and the dfmod
function to check the LREC size for all LRECs in the current block. The initial setting is 0.
Note: Segment UWAM must be reassembled and loaded whenever this symbol is changed. If this
additional check is activated, you must consider the increased path length. Activate this check in
test environment only.
|
| &NOTMC | Specifies whether the TPF Transaction Manager (TM) functions are enabled. The initial setting
is 0.
|
| &READCHECK | Performs additional checks with the DBRED command and the dfred
function to check the LREC size for each LREC that the DBRED command or
dfred function needs to step over internally.
The initial setting is 0. Note:
|
| &RECERR | Does not apply to ALCS systems. |
| &TPFDBDV |
When processing in detac mode, this value indicates if a LODIC CONDITIONALDEFER macro is issued when a block is added or reomved from the detac list. The LODIC CONDITIONALDEFER macro will defer the ECB if it is approaching an application timeout (system error 000010).
The initial setting is 0. Note: Set this symbol to a nonzero value only if you are receiving TPF system error 000010 while
processing in detac mode. Use this symbol with caution because it can affect ECB and system
performance.
|
| &TPFDBMP |
|
| &TPFOWN | The initial setting is IBM (do not change). |
Setting symbols in the ACPDBE macro
The ACPDBE macro contains instructions (EQU) that define symbols. Some of the symbols are installation options for the TPFDF product. Many of the equates used in ACPDBE have synonyms (for example, #ACPDBTS is a synonym for #TPFDBTS). Ensure that the same value is coded for both symbols. The following table describes the symbols defined in ACPDBE and provides information about the recommended settings.
| Symbol | Description and settings |
|---|---|
| #DBCOLL | Used to calculate the space required for data collection. The initial setting is the sum of #DBCOL1 and #DBCOL2, rounded up to a 4-KB boundary; that is, (((#DBCOL1 + #DBCOL2 + 4095) ÷ 4096) × 4096). Do not change this value. |
| #DBCOL1 | Size of the record ID index for data collection. The initial setting is ((X'10000' - #TPFDBID) × 4). Do not change this value. |
| #DBCOL2 | Size of the data area for data collection. The initial setting is (#DBDCNBR × 236). Do not change this value. |
| #DBDCNBR | Maximum IDs for data collection. The initial setting is 1300. |
| #DBENUFB | The initial setting is the character on your keyboard that is equivalent to X'4F'. |
| #DBUIOC8 | If your system versions of UIO and UIS do not support scrolling, set this symbol to X'C8'. |
|
#DBUIO80 to #DBUIO85 |
Used to support special scrolling. If your UIO and UIS programs support special scrolling, TPFDF programs use these symbols to set the UI2MG2 field in the UIO parameter block to UI2PF. |
| #DFDET_MAX | Maximum number of detached core blocks for all open TPFDF files in the range 20-240 for an ECB. Blocks exceeding this number use short-term pool files. This number can be increased or decreased depending on system resources. This setting does not limit the total number of storage blocks available to the ECB. The initial setting is 200. |
| #DF_MAX_DSP | Maximum number of lines that are displayed by the DBDSP macro or dfdsp function. The initial setting is 0, indicating that there is no limit. |
| #DFOALOD | Number of lines to be displayed by the ZUDFM OA* command before a LODIC macro is issued, forcing the entry control block (ECB) to relinquish control and potentially avoiding a timeout (system error 000010). The default is 1000. |
| #DFOATOV | Specifies the frequency value for displaying the UDFM0191I message during ZUDFM entry processing. The default frequency value is 5 seconds. See TPFDF Commands for information about the ZUDFM commands. |
| #DFUTI01 | Creating ECBs in the TPFDF capture/restore utility, information and statistics environment (CRUISE) recalculates the distribution of ECBs over the different levels for every so many ordinals as specified. The #DFUTI01 equate determines how often this is done. The initial setting is 500. |
| #DFUTI02 | Creating ECBs in TPFDF CRUISE recalculates the distribution of ECBs over the different levels depending on the ratio of overflows to prime blocks. The #DFUTI02 equate defines this ratio. The initial setting is 50. |
| #LLRMLR | Specifies the maximum length allowed a large logical record (LLR). The default value is X'1FFFFF' (2 MB). If this value is changed, program segments UWAQ and UWBM must be assembled. |
| #L3ORL4 | Set to the 4-K block size equate to be used by the TPFDF product for system databases and working storage. Allowed values are L3 or L4. The same value must be used for variable _L3ORL4 in the C/C++ C$ACPDBE header file and for symbol &L3ORL4 in the DBLCL macro. This value also corresponds to the value set for variable #L3ORL4S. The initial setting is L4. |
| #L3ORL4S | Set to the number of bytes corresponding to the 4-K block size equate specified by the #L3ORL4 equate. Allowed values are 4000 or 4095. The same value must be used for variable _L3ORL4S in the C/C++ C$ACPDBE header file. The initial setting is 4095. |
| #TO_RELEASE | Percentage of unmodified detached core blocks in the range 1-100 that are released by the system maintenance routine before a pending buffered block in detac mode is moved to a short-term pool file. The default is 10%. The number of unmodified detached blocks is specified by the #DFDET_MAX set symbol. |
| #TPFCRUQ | Does not apply to ALCS systems. |
| #TPFDBAC | GF ACP control block. The initial setting is 1 (do not change). This setting is used by third party software packages for general data set support. |
|
#TPFDBD0 to #TPFDBDF |
Specifies the data levels used by TPFDF. Even though an application cannot specify a data
level when opening a file and most internal operations use data event control blocks (DECBs), some
internal TPFDF operations do require the use of data levles. Note: There is no reason to change the
default values. Because the application data levels are unchanged across TPFDF calls, the equates
will only affect internal processing in the TPFDF product.
|
| #TPFDBFL | Size (in bytes) of the fast-link table. The initial setting is 4096 (do not change). |
| #TPFDBID | Specifies the lowest record ID that can be used for TPFDF files. For example, if #TPFDBID is
set to X'8000', record IDs X'8000'-X'FFFF' can be used. The initial setting is X'0000' for ALCS environments. Note: The lower the value of #TPFDBID, the higher the amount of memory
required.
|
| #TPFDBMO | Specifies the maximum number of files that an application program can have open at the same time. A value between 5 and 25 will suit most systems. The initial setting is 25. |
| #TPFDBOC | GF OS control block. The initial setting is 0 (do not change). This setting is used by third party software packages for general data set support. |
| #TPFDBSB | Maximum number of blocks to be detached by a DBSRT macro or
dfsrt function in sort batch. The initial setting is 10. |
| #TPFDBSW | The size of the SW00SR block. The initial setting is L4 (4095 bytes). The smallest SW00SR block size allowed is L3 (4000 bytes). A 4000-byte block or a 4095-byte block allows as many as three files to be opened without the TPFDF product having to get another block. If you change the #TPFDBSW value, make sure that the size is defined in the RECSIZE and CISIZE parameters of the ALCS macro (see Modifying the ALCS Generation Macro), the BLKSZ macro as described in Updating the BLKS Macro, and the SCTGEN macro SUSIZE and NBRSU parameter values. The default setting of SUSIZE (12 KB) allows the application to use 8 KB and the SW00SR to use 4 KB. Increasing the SW00SR block value decreases the bytes that are available for the application. |
| #TPFDBTB | Maximum number of blocks to be detached by a DBTRD macro or
dftrd function. The initial setting is 10. |
| #TPFDBTS | Specifies the DBDEF table size. The initial setting is ((X'10000' - #TPFDBID) × 4) + 460 + 4 (do not change). |
|
#TPFDB01 to #TPFDBFF |
Used to define the TPFDF addressing algorithms (do not change). |
| #TPFNODE | The number of B+Tree nodes buffered in memory. For best performance, set this
value equal to (2 * B+Tree_level_max) + 1. Note:
|
Setting parameters in the C$ACPDBE header file
The C$ACPDBE header file defines the value for the _TPFDBID symbol.
| Symbol | Description and settings |
|---|---|
| _L3DBIFB | Specifies whether L3 blocks are being used for the database interface block (DBIFB) as
defined by the #TPFDBSW value in the ACPDBE macro. The initial setting is 0. A corresponding value
must be set for variable &L3DBIFB in the DBLCL macro.
|
| _L3ORL4 | Set to the 4-K block size equate to be used by the TPFDF product for system databases and working storage. Allowed values are L3 or L4. The same value must be used for variable #L3ORL4 in assembler macro ACPDBE. The initial setting is L4. |
| _L3ORL4S | Set to the number of bytes corresponding to the 4-K block size equate specified by the _L3ORL4 equate. Allowed values are 4000 or 4095. The same value must be used for variable #L3ORL4S in assembler macro ACPDBE. The initial setting is 4095. |
| _TPFDBID | Specifies the lowest record ID that can be used for TPFDF files. For example, if _TPFDBID is
set to X'8000', record IDs X'8000'-X'FFFF' can be used. The initial setting is X'0000' for ALCS environments. Note: The lower the value of _TPFDBID, the higher the amount of memory required.
|
Setting parameters in the C$CRUUSR header file
The C$CRUUSR header file contains user-specific settings that you must set before you compile the capture/restore utility, information and statistics environment (CRUISE). The C$CRUUSR header file also defines parameter table default values. These default values are a primary set of values that you can modify when CRUISE is installed. After you have set these values, see Creating a Parameter Table Index for more information.
| Parameter | Description and settings |
|---|---|
| CRU_DEF_ECB | The entry control block (ECB) start value as specified by a percent in the range 1-100. The initial setting is 10%. |
| CRU_DEF_IMB | Indicates if combinations used with parameters WID and ADR select embedded references. The
initial setting is Y.
|
| CRU_DEF_MSG_INIT | Indicates if start and complete messages are issued when cross reference files are
initialized at the beginning of a CRUISE RESTORE function. The initial setting is 1.
|
| CRU_DEF_NLM | Specifies the number of messages to log. The initial setting is -1.
|
| CRU_DEF_NPM | Specifies the number of messages to print. The initial setting is -1.
|
| CRU_DEF_RST | Specifies the restore option. The initial setting is R.
|
| CRU_DEF_SET | Indicates if all pool addresses found are set in use in the pool directory. The initial
setting is N.
|
| CRU_DEF_STA | Specifies if statistics are generated. The initial setting is N.
|
| CRU_DEF_TAP | Specifies the default tape name. The initial setting is BFA. |
| CRU_DEF_TAR | Specifies the target system for a capture. The initial setting is T.
|
| CRU_LOD_VAL | Specifies the amount of entries that must be available in the ALCS environment to run CRUISE. The initial and minimum setting is 5. |
| CRU_PFA_X_REF | Indicates if all CRUISE functions create an IRCFDF cross-reference prime file while chain
chasing. The initial setting is 0.
|
Updating the BLKS macro
The block size (BLKSZ) macro contains information about storage block and record sizes. It is shipped with L0-L4 predefined. Do not change this information. Update the macro to provide additional block types (L5-L8) that your ALCS environment supports. For example, The following code shows the BLKSZ macro with a user-defined block type of L5.
&BT(1) SETC 'L0' ONLY VALID FOR MODE 0
&BS(1) SETA 128
&BN(1) SETA 0 NAB NOT VALID FOR L0 BLOCK
&BC(1) SETA 0
&BT(2) SETC 'L1'
&BS(2) SETA 381
&BN(2) SETA &BS(2)-36
&BC(2) SETA 0*16
&BT(3) SETC 'L2'
&BS(3) SETA 1055
&BN(3) SETA &BS(3)-36
&BC(3) SETA 1*16
&BT(4) SETC 'L3'
&BS(4) SETA 4000
&BN(4) SETA &BS(4)-36
&BC(4) SETA 2*16
&BT(5) SETC 'L4'
&BS(5) SETA 4095
&BN(5) SETA &BS(5)-36
&BC(5) SETA 3*16
&BT(6) SETC 'L5' BLOCK TYPE CODE
&BS(6) SETA 8192 BLOCK SIZE &BN(6) SETA &BS(6)-36 MAXIMUM NAB &BC(6) SETA 4*16 CTL BITS · · ·
For each additional block that is defined, specify the following:
- Block type code (L5-L8)
- Block size (in bytes)
- Maximum next available byte (NAB). The maximum NAB is 36 bytes less than the block size.
-
CTL bits, as follows:
- L5
- Set to 4*16
- L6
- Set to 5*16
- L7
- Set to 6*16
- L8
- Set to 7*16