The purpose of the DATAMACS-WORK-AREA is to define a working storage area which certain CA-Datamacs/II commands can access.
The COBOL syntax rules should be followed to define individual fields within the DATAMACS-WORK-AREA. CA-DATAMACS/II only supports the COBOL DISPLAY, COMP, and COMP-3 fields. Also, level 88's are not allowed within the DATAMACS-WORK-AREA. VALUE clauses are allowed, but not used.
The first line should be coded:
*DM 01 DATAMACS-WORK-AREA.
This statement would be the equivalent of a COBOL 01 level and should be placed somewhere within the COBOL WORKING-STORAGE SECTION.
The level numbers of the fields should start with 02 and higher and contain an *DM in columns 7 - 9.
The following examples illustrate how to define the fields:
*DM 01 DATAMACS-WORK-AREA.
*DM 02 DATE-FIELD PIC 9(6).
*DM 02 LABEL PIC X(10).
*DM 02 AMT PIC 999V99 COMP-3.
*DM 02 DATE.
*DM 05 MONTH PIC 99.
*DM 05 DAY PIC 99.
*DM 05 YEAR PIC 99.
*DM END-DATAMACS-WORK.
No field name can duplicate any other field defined in the run, whether in working storage or in the records.
The DATAMACS-WORK-AREA must be terminated with an END-DATAMACS-WORK statement. The maximum size of the DATAMACS-WORK-AREA is 1K.
Redefined fields and repeating fields are supported. However, only one-dimensional tables are supported in Release 1.2. OCCURS DEPENDING ON is not supported. Only PIC X, A, decimal, packed decimal, and binary fields are supported.
No field generators can be used.
| Copyright © 2009 CA. All rights reserved. | Tell Technical Publications how we can improve this information |