Software AG Products 2.4.1 | Reference Guide | Declaration Command | Overview
 
Overview
The declaration command is @ADADCL.
Every @ADADCL command creates a set of six buffers required for the direct call and few additional fields for internal use of Adabas Pre-Compiler.
The general syntax of the command is as follows:
syntax of declaration command
@ADADCL consists of the following clause elements:
*nnnn
Up to four characters that identify the set of buffers created. This identification is suffixed to each buffer name and field name created. The nnnn combination must be unique within an application. Unless a dynamic command ID is used (@OPTIONS DYNAMCID), the nnnn is used to generate the Adabas command ID created and inserted into the control block.
For modules used in several programs, the nnnn combination must be unique to any nnnn used in the host programs.
In the execution commands, the nnnn combination serves as a reference to the set of buffers used by that command. The suffix nnnn is referred to as the Adabas Pre-Compiler command ID or A-CID. A comma must always follow nnnn.
*file name
The file name (defined in Predict) to which the logical record (defined by the field expressions) refers. Software AG recommends that you use the file name and not the file number, because Predict identifies files by names.
*search-criteria
A list of descriptor names and logical operators to be used for the selection of records. The descriptor names must be the full field names as defined in Predict. The logical operators may be AND, OR, THRU and BUTNOT.
If non-descriptor search is enabled, the field does not have to be a descriptor. You may also specify coupling conditions if descriptors from more than one file are used.
This clause may be omitted, but it must be replaced by a comma.
*field-expressions
A list of field names to be included in the logical record. The field names are the full field names, as defined in Predict.
This clause may be omitted, but it must be replaced by a comma.
*isn-buffer-size
The number of occurrences to be defined in the ISN buffer for storing the ISNs that satisfy the specified selection criteria for the @FIND command. Occurrences in excess of this number are stored on the WORK date set. Those occurrences are automatically retrieved when required and are transparent to the programmer.
isn-buffer-size is used with the @FIND, @COMPARE, and @SORT execution commands.
The default value is 1. Thr default may be changed with the @OPTIONS statement.
This clause may be omitted, but it must be replaced by a comma.
*options
A set of options to change the default generation of the buffers.
@ADADCL generates the following buffers and field names. These names are reserved words and must not be declared.
The first @ADADCL command in the running sequence of the program will automatically create additional fields and buffers.
Buffers
Buffer Name
Description
FORMAT-BUFnnnn
Contains the Adabas field names of the fields given in the field expression clause. This buffer is not relevant to the Adabas Pre-Compiler programmer.
RECORD-BUFnnnn
The logical record to be used by for accepting the contents of the fields read from the database and for accepting contents of the fields supplied by the programmer before updating the database.
SEARCH-BUFnnnn
Contains the Adabas field names of the descriptors specified in the search-criteria clause. This buffer is not relevant to the Adabas Pre-Compiler programmer.
VALUE-BUFnnnn
The area to be used for accepting values for the descriptors which are specified in the search-criteria clause.
ISN-BUFnnnn
Contains the resulting ISNs from a @FIND command. Adabas Pre-Compiler uses this buffer internally with the @READNEXT execution command.
CONTROL-BLOCKnnnn
Contains the COMMANDCODE, current ISN, and ISN-QUANTITY control fields.
Field Names
Field Name
Description
ISNSIZEnnnn
Contains the size of the ISN-BUF. This field is not relevant to the Adabas Pre-Compiler programmer.
ISNMOREnnnn
Contains the ISN-QUANTITY or the remaining ISNs to read. This field is not relevant to the Adabas Pre-Compiler programmer.
ISNINDnnnn
An index for the ISN-BUF. This field is not relevant to the Adabas Pre-Compiler programmer.
SAVE-DBIDnnnn
A field to save the database ID if changed for @ADADCL. This field is not relevant to the Adabas Pre-Compiler programmer.
EOFnnnn
One-bit field to define the end of file in sequential reads and end of list in random reads.
(FIND-READNEXT) - PL/1 programs only.
EOF-COBnnnn
88EOFnnnn VALUE 1.
88NOT-EOFnnnn VALUE 0.
One-byte field to define the end of file in sequential reads and end of list in random reads.
(FIND-READNEXT ) - COBOL programs only.
This field is not relevant to the Adabas Pre-Compiler programmer.
Fields not Relevant to the Adabas Pre-Compiler Programmer
Field Name
Description
CONTROL-BLOCKOPN
For special-purpose commands such as OPEN, CLOSE, etc.
FORMAT-BUFOPN PIC X.
Dummy Format-buffer.
SEARCH-BUFOPN PIC X.
Dummy Search-buffer.
VALUE-BUFOPN PIC X.
Dummy Value-buffer.
ISN-BUFOPN PIC X.
Dummy Isn-buffer.
RECORD-BUFOPN.
For OPEN and ET-DATA. The default length is 500 bytes and it may be modified with the @OPTIONS statement.
OPENTYPE PIC X(10).
A special identifier for an EXCLUSIVE mode program that is intended to run in ET mode while debugging on a test database.
DDFILE PIC 9(5).
The number of the system file to be used by the response code analysis routine.
DDDBID PIC 9(5).
The database ID of the system file to be used by the response code analysis routine.
CSEQ PIC X (8).
An identifier containing the line number of ADAPREP commands, used by the response code analysis routine.
CLN1 PIC X (40) OCCURS 20.
CLN2 PIC X (40) OCCURS 20.
Two fields containing the ADAPREP command data for the FLOW and TRACE options.
TRCE PIC X (7)
For use of the TRACE option.
CLNNUM PIC 9 (4) COMP.
Number of lines in the ADAPREP command filled in CLN1 CLN2.
SAVE-DBIDOPN
A field to save the database ID if changed with the @FILEOPN command.