ILE COBOL Programmer's Guide


Defining Transaction Files Using Data Description Specifications

You use data description specifications (DDS) to describe an externally described TRANSACTION file.

In addition to the field descriptions (such as field names and attributes), the data description specifications (DDS) for a display device file do the following:

Display format data defines or describes a display. A display device record format contains three types of fields:

For a detailed description of a data communications file, see the ICF Programming manual. For more information on externally defined display files and a list of the valid data description specifications (DDS) keywords, refer to the Database and File Systems category in the iSeries 400 Information Center at this Web site -http://publib.boulder.ibm.com/pubs/html/as400/infocenter.htm.

Figure 130 shows an example of the DDS for a display device file:

Figure 130. Example of the Data Description Specifications for a Display Device File


 ....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
      A* CUSTOMER MASTER INQUIRY FILE ** CUSMINQ
      A*
      A                                      REF(CUSMSTP) (1)
      A          R CUSPMT                    TEXT('CUSTOMER PROMPT')
      A                                      CA01(15 'END OF PROGRAM') (2)
      A                                  1  3'CUSTOMER MASTER INQUIRY'
      A                                  3  3'CUSTOMER NUMBER'
      A            CUST      R        I  3 20
      A  99                                  ERRMSG('CUSTOMER NUMBER NOT FOUND + (3)
      A                                      PRESS RESET, THEN ENTER A VALID NU+
      A                                      MBER' 99)
      A                                  5  3'USE CF1 TO END PROGRAM, USE ENTE+
      A                                      R TO RETURN TO PROMPT SCREEN'
      A          R CUSFLDS                   TEXT('CUSTOMER DISPLAY')
      A                                      CA01(15 'END OF PROGRAM')
      A                                      OVERLAY (4)
      A                                  8  3'NAME'
      A            NAME      R           8 11
      A                                  9  3'ADDRESS'
      A            ADDR      R           9 11
      A                                 10  3'CITY' (5)
      A            CITY      R          10 11
      A                           (6)   11  3'STATE'
      A            STATE     R          11 11
      A                                 11 21'ZIP CODE'
      A            ZIP       R          11 31
      A                                 12  3'A/R BALANCE'
      A            ARBAL     R          12 17

This display device file contains two record formats: CUSPMT and CUSFLDS.

(1)
The attributes for the fields in this file are defined in the CUSMSTP field reference file. For example, EDTCDE(J) is defined in CUSMSTP for the field ARBAL.

(2)
The F1 key is associated with indicator 15, with which the user ends the program.

(3)
The ERRMSG keyword identifies the error message that is displayed if indicator 99 is set on in the program that uses this record format.

(4)
The OVERLAY keyword is used for the record format CUSFLDS so that the CUSPMT record on the display will not be erased when the CUSFLDS record is written to the display.

(5)
The constants such as 'Name', 'Address', and 'City' describe the fields that are written out by the program.

(6)
The line and position entries identify where the fields or constants are written on the display.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]