Software AG Products 2.4.1 | Reference Guide | Declaration Command | The @DCLREC Command
 
The @DCLREC Command
The @DCLREC command generates a definition of a full record of the file according to the Predict definitions. The name of the record will be the file name with a suffix of "nnnn-REC" and the name of the fields will be the full field names as documented in Predict. Adabas Pre-Compiler generates the appropriate language dependent synonym if the @OPTIONS SYNONYM is used. The field names are generated with a suffix of nnnn.
Syntax for DLCREC
You use this command when non-ADABAS files are documented in Predict and you need the definition of the record in the program. Adabas Pre-Compiler generates the definition of the record and puts cross reference data in Predict regarding the usage of this file in the program. The same is done with Adabas files.
You can also use this command when defining a new ADABAS file in Predict and there is a need to create a sequential file for the load utility. Adabas Pre-Compiler generates a definition of the record for the program and the definition is the same record definition required by the compression utility. This eliminates a lot of mistakes when creating a sequential file.
The field expressions can be used when only part of the physical file is required. It is used when writing a sub-program, that is called by a main program that accesses the database and passes the record buffer as a parameter. In the subprogram, the @DCLREC is used to generate the record which is passed as a parameter. For additional information about the field expression, see field-expressions.
You can specify some default options in the command. Some of the options can be specified with the @OPTIONS default statement or with the generation defaults for the specific language in Predict.
The following options can be specified:
NOSUFFIX
The field names will be generated without the nnnn suffix.
COMMENTS
Adabas Pre-Compiler generates comments in the record for every field that has comments in Predict. For more information about the COMMENTS option, see COMMENTS. This option is available only for COBOL.
SUFFIX88
This keyword is used by old COBOL Adabas Pre-Compiler users who have their 88 constants defined as comments in Predict. For more information about the SUFFIX88 option, see SUFFIX88.
COND-NAME
COBOL users, who have condition names defined for fields in Predict, can use this option. For more information about the COND-NAME option, see COND-NAME.
INDEXED
This option can be used by COBOL users who need the arrays to be defined with INDEXED BY clause. For more information about the INDEXED option, see INDEXED.
STATIC
This option can be used by PL/1 users who need the record to be generated with STATIC. For more information about the STATIC option, see STATIC.
START-LEVEL
You can use this option to specify the starting level of the generated record. Adabas Pre-Compiler takes the default starting level from the appropriate language DDA record. The increment is always one.