bdfp1m1y | Programming Concepts and Reference |
Use this macro to do the following:
Format
|
Notes:
|
If you specify this parameter, you must also specify the primary key (LREC ID) of the empty LREC with the PKY parameter.
Notes:
If you specify this parameter for an LREC that contains existing subLRECs, the subLREC is added immediately before the existing subLRECs. See Using Extended Logical Records for more information about how subLRECs are added to an extended LREC.
The TPFDF product uses the algorithm argument to determine the subfile (ordinal number) that is to be accessed. Specify the algorithm argument based on the type of algorithm that is defined in the DSECT or DBDEF macro for the file. If the DSECT or DBDEF macro defines the #TPFDB04 or the #TPFDB0D algorithm, do not use this parameter.
If the subfile you are accessing is contained in a detail file or intermediate index file defined with the #TPFDBFF algorithm, the TPFDF product uses the algorithm argument to locate the subfile. See TPFDF Database Administration for more information about how the TPFDF product uses the algorithm argument to locate the subfile.
Specify algarg as one of the following:
If the file is partitioned or interleaved, specify the relative ordinal number within the partition or interleave. If the file is not partitioned or interleaved, specify the file address compute program (FACE) ordinal number.
When you specify this parameter, the subfile is created and indexed by adding an index LREC in the index file referencing the subfile.
See TPFDF Database Administration for information about how bits 4 and 5 in the &SW00OP2 global set symbol in the DSECT macro, or the OP2= parameter in the DBDEF macro, affect hold processing.
If you specify this parameter, the maximum interleave number must be defined in the DSECT or DBDEF macro. See TPFDF Database Administration for more information about interleaves.
If you specify this parameter, the number of partitions and the end ordinal must be defined in the DSECT or DBDEF macro. See TPFDF Database Administration for more information about partitions.
If you use these parameters, you must also specify the file organization of the keys. See Specifying File Organization with Keyn Parameters for more information about how to do this. Use one or more of the following subparameters with the KEYn parameter:
... KEY1=(PKY=#RR00K80)
This has the same effect as:
... KEY1=(R=RR00KEY,S=#RR00K80)
... KEY1=(PKY=#GR00K80),KEY2=(R=GR00FLD,S=EBW000)
... KEY1=(PKY=#GR00K80),KEY2=(R=EBX010,S=EBW000,L==H'4')
... KEY1=(PKY=#GR00K80),KEY2=(R=D/2,S=EBW000,L=L'GR00NAM,UP)
You can also specify the absolute value implicitly; for example:
... KEY1=(PKY=#GR00K80),KEY2=(R=D/GR00NAM-GR00REC,S=EBW000,L=L'GR00NAM,UP)
... KEY1=(PKY=#GR00K80),KEY2=(R==H'2',S=EBW000,L==H'4')
... KEY1=(PKY=#GR00K80),KEY2=(R=GR00FLD+2,S=EBW000,L==H'4')
or
... KEY1=(PKY=#GR00K80),KEY2=(R=GR00FLD+L'GR00FLD,S=EBW000,L==H'4')
If you specify the S or PKY subparameter, use one of the following values:
If you specify the M or D subparameter, use one of the following values:
... KEY1=(PKY=#GR00K80),KEY2=(R=GR00FLD,D=EBW000,C=Z)
... KEY1=(PKY=#GR00K80),KEY2=(R=GR00FLD,M=X'80',C=Z)
If you specify P/searcharg or a literal in the form of =P'...', the LREC field and search argument are compared as decimal numbers in packed format. Otherwise, the LREC field and search argument are compared as character data.
The default value is the length of the field specified with the R subparameter.
See Setting Up and Using a Key List for information about how to set up a key list.
Notes:
See Messages (System Error, Online, Offline) and Master Glossary for more information about these system errors.
See TPFDF Database Administration for more information about path numbers.
You must specify this parameter if you are:
Notes:
If you do not have default keys defined or have active keys when adding a unique LREC to a file that is not organized, the TPFDF product issues a system error. Symbol &DB013E in the DBLCL macro controls whether the TPFDF product returns control to the application program or exits the entry control block (ECB) after issuing the error. If you set &DB013E to 0, which is the default setting, the ECB exits. If you set &DB013E to 1, control is returned to the application program. See TPFDF Installation and Customization for more information about the DBLCL macro.
Entry Requirements
Normal Return
The address of the new LREC is placed in the SW00REC field of the SW00SR slot. If you specify the REG parameter, the address of the new LREC is placed in the specified register and SW00REC.
Error Return
Programming Considerations
If you need this type of key definition, you must use a key list.
See TPFDF Database Administration for more information about add current files.
Examples
Each LREC contains 115 bytes made up of:
The files are set up by coding:
DBADD REF=RTEWSR,REG=R4,NULLREC==AL2(115) MVC 11(104,R4),EBW000 DBADD REF=RTEXSR,REG=R4,NULLREC==AL2(115) MVC 11(104,R4),EBX000
DBADD REF=GR45DF,ALG=EBW001,NEWLREC=EBX000
DBADD REF=GR23DF,NULLREC==AL2(L'GR23L80),PKY=#GR23K80
DBADD REF=GR39DF,USRLREC=GR39REC,SUBLREC=A/EBW000,PKY=#GR39K80
GR25DF REG=R6,SUFFIX=X DBOPN REF=GR25DF,REG=R6,SUFFIX=X DBADD REF=GR25DF,SUFFIX=X, * KEY1=(PKY=#GR25K80,UP), * KEY2=(R=GR25ALCX,S=GR25ALC,DOWN)
DBADD REF=GR23DF,INDEX,ALG=EBW044
This has the same effect as the following sequence of macros:
DBCRE REF=GR23DF DBIDX REF=GR23DF,ALG=EBW0044 DBADD REF=GR23DF
Related Macros