Software AG Products 2.4.1 | Reference Guide | Declaration Command | search-criteria | Special Descriptors
 
Special Descriptors
The use of Adabas special descriptors such as sub-descriptor, phonetic-descriptor and super-descriptor is similar to that of ordinary descriptors with some variations:
*The value buffer definition of a sub-descriptor is defined in Predict.
*A super-descriptor is like a regular descriptor but Adabas Pre-Compiler splits it into its components and uses the full field name and definition of those components. If a part of a field is used in the defining of the super-descriptor, the value buffer definition of that component has the same format of the field unless it is a packed format with starting position not equal to one.
You may want the name of the component to be synonymous and not the full name. The name may be specified with the @OPTIONS SYNONYM statement. The appropriate suffixes are added to the super-descriptor’s components. For example:
@ADADCL15, EMPLOYEES DEPT-PERSON THRU
DEPT-PERSON OR DEPT-PERSON THRU
DEPT-PERSON AND CITY.
The value buffer definition is:
01 VALUE-BUF15.
02 V-DEPT-PERSON15-01F.
03 V-DEPT15-01F PIC X(6) VALUE ’ ’.
03 V-NAME15-01F PIC X(20) VALUE ’ ’.
02 V-DEPT-PERSON15-01T.
03 V-DEPT15-01T PIC X(6) VALUE ’ ’.
03 V-NAME15-01T PIC X(20) VALUE ’ ’.
02 V-DEPT-PERSON15-02F.
03 V-DEPT15-02F PIC X(6) VALUE ’ ’.
03 V-NAME15-02F PIC X(20) VALUE ’ ’.
02 V-DEPT-PERSON15-02T.
03 V-DEPT15-02T PIC X(6) VALUE ’ ’.
03 V-NAME15-02T PIC X(20) VALUE ’ ’.
02 V-CITY15 PIC X(20) VALUE ’ ’.
In the case of a super-descriptor that includes different components of the same field, the field name for each component is followed by a hyphen -, followed by the starting position, another hyphen and ending position. For example, the field DATE consists of 6 characters, MMDDYY and a descriptor is required in the form YYMMDD. This can be achieved by defining a super-descriptor like STD-DATE in Predict.

SOURCE FIELD FROM TO
DATE 5 6
DATE 1 2
DATE 3 4
@ADADCL16, FILE1 STD-DATE.
The value buffer definition is:
01 VALUE-BUF16.
02 V-STD-DATE16.
03 V-DATE16-5-6 PIC XX VALUE ’ ’.
03 V-DATE16-1-2 PIC XX VALUE ’ ’.
03 V-DATE16-3-4 PIC XX VALUE ’ ’.