Previous Topic: ADDIT

Next Topic: COPY TABLE (Format II)

COPY TABLE (Format I)

*DM  COPY TABLE ALL [SUPPRESS].

The Format I COPY TABLE statement will copy all the COBOL fields defined in each table related to the DATABASE NAME IS and VERSION specified on the DATACOM statement, if the following restrictions are complied with:

  1. All the fields must be related to a single element occurrence name.
  2. The total length of all the elements related to the table must equal the actual table width.

The format I COPY TABLE statement also copies all the key names specified for each table, which can then be used on the READ or EQUI-JOIN statements.

The optional SUPPRESS keyword will prevent the field descriptions from printing.

Field generators are supported on the format I COPY TABLE statement. If coding field generator statements for more than one table, they must be coded in ascending order to table-ID. To determine this, do a CA-Datamacs/II syntax run and remove the SUPPRESS option. The resultant listing will show the proper sequence and the line sequence numbers, which must be included in columns 73 to 80 of each field generator statement. Specifying field generators for the UNLOAD is not allowed.

Users of the ISPF front-end do not need to do the above syntax listing, as it is handled automatically by the product.

The field generator statements should be placed after the COPY TABLE statement.

Place an *DM END-COPY statement after each group of field generators for a specific table.

To successfully use the format I COPY TABLE, each table must have a unique DATACOM-ID.

A period must end the COPY TABLE statement.

Format I COPY can cause a lot of overhead. We do not recommend it under normal situations.