Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)
Data Division
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual—426750-001
5-22
Screen Description Entry
The following example illustrates single values for condition-names:
05 return-code PIC 99.
88 end-of-file VALUE 01. }
88 error-on-read VALUE 02. }
88 permanent-error VALUE 03. }
88 error-on-write VALUE 04. }
where return-code is is the condition variable and end-of-file, error-on-read,
permanent-error, and error-on-write are condition-names.
A statement using one of these condition-names might look like this:
IF end-of-file,
PERFORM end-up-routine.
The following example illustrates a range of values for a condition-name:
05 tax-code PIC 99.
88 tax-range VALUES ARE 00, 03, 07 THROUGH 11.
A statement testing whether tax-code has the value 00, 03, 07, 08, 09, 10, or 11 might
look like this:
IF NOT tax-range
PERFORM tax-error-routine.
Screen Description Entry
A screen description entry declares the characteristics of a screen format. The entry is
used in the Screen Section of the SCREEN COBOL program.
A screen can be composed of any combination of literal fields, input fields, output
fields, input-output fields, and overlay areas. Each of these items can be combined into
logically related groups. A group declaration simplifies referring to related fields, but a
group declaration is not required.
The two types of screens are: base and overlay.
•
A base screen can be displayed independently. This type of screen can contain areas
upon which overlay screens can be displayed.
•
An overlay screen is displayed in an overlay area of a base screen. This allows a
base screen (with, for example, a constant header section) to be used with various
overlay screens.
The structure of the screen description entry is similar to a data description entry. The
screen description entry is a series of declarative sentences, each beginning with a level
number to indicate the hierarchy. A higher number indicates that the entry is
subordinate to the previous entry. The 01 level is the highest statement in the paragraph.
Subordinate entry levels can be any number from 02 through 49.