ILE COBOL Programmer's Guide
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:
- Specify the line number and position number entries for each field and
constant to format the placement of the record on the display.
- Specify attention functions such as underlining and highlighting fields,
reverse image, or a blinking cursor.
- Specify validity checking for data entered at the display
workstation.
-
Control display management functions such as when fields are to be erased,
overlaid, or retained when new data is displayed.
-
Associate indicators 01 through 99 with function keys designated as type
CA or CF. If a function key is designated as
CF, both the modified data record and the response indicator are
returned to the program. If a function key is designated as
CA, the response indicator is returned to the program, but the data
record usually contains default values for input-only fields and values
written to the format for hidden output/input fields. For more
information about type CF and CA function keys, see
refer to theDatabase anf File Systems category in the iSeries
400 Information Center at this Web site -http://publib.boulder.ibm.com/pubs/html/as400/infocenter.htm.
- Assign an edit code (EDTCDE keyword) or edit word (EDTWRD keyword) to a
field to specify how the field's values are to be displayed.
- Specify subfiles.
Display format data defines or describes a display. A
display device record format contains three types of fields:
- Input Fields: Input fields pass from the device to the
program when the program reads a record. Input fields can be
initialized with a default value; if the default value is not changed,
the default value passes to the program. Un-initialized input fields
are displayed as blanks where the work station user can enter data.
- Output Fields: Output fields pass from the program to the
device when the program writes a record to a display. The program or
the record format in the device file can provide output fields.
- Output/Input (Both) Fields: An output/input field is an
output field that can be changed to become an input field. Output/input
fields pass from the program when the program writes a record to a
display and pass to the program when the program reads a record
from the display. Output/input fields are used when the user is to
change or update the data that is written to the display from the
program.
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 ]
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.