Pathway/iTS SCREEN COBOL Reference Manual (H06.10+, J06.03+)

Data Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual426750-003
5-22
Screen Description Entry
under which the 88 appears is the condition variable. A value or a range of values can
be defined within this variable for testing. Each entry under a condition variable
includes a condition-name with a VALUE clause specifying a value or a range of values
for that condition-name.
All condition-name entries for a particular condition variable must immediately follow
the entry describing that variable. A condition-name can be associated with any data
description entry, even if specified as FILLER, with the following exceptions:
A condition-name cannot be associated with a level 66 or 77 item.
A condition-name cannot be associated with a group item with a JUSTIFIED or
USAGE IS COMPUTATIONAL clause.
A single value, several values, or a range of values can be given for a condition-name
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.