Pathway/iTS SCREEN COBOL Reference Manual (H06.10+, J06.03+)
Data Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual—426750-003
5-51
Field-Characteristic Clauses
appears on the screen followed by a set of parentheses (delimiting the field size) and
the cursor.
SCREEN SECTION .
01 ADDCUST-SCREEN BASE SIZE 24, 80 .
05 NAME1-PROMPT AT 3,2 VALUE "LAST NAME: " .
05 LAST-NAME-FIELD AT 3,13 PIC X(10) USING CUST-LAST-NAME
LENGTH MUST BE 1 THRU 10
PROMPT NAME1-PROMPT .
The next example illustrates a PROMPT clause with
screen-field
described in the
Working-Storage Section and output with a FROM clause.
WORKING-STORAGE SECTION.
O1 NEWCUST-REC.
05 NEW-LAST-NAME PIC X(10) VALUE SPACES.
:
01 WS-PROMPT-VALUE PIC X(11) VALUE "LAST NAME: ".
:
SCREEN SECTION.
01 NEWCUST-SCREEN.
05 LAST-NAME-PROMPT AT 3,2 PIC X(11) FROM WS-PROMPT-VALUE.
05 LAST-NAME-FIELD AT 3,13 PIC X(10) USING NEW-LAST-NAME
LENGTH MUST BE 1 THRU 10
PROMPT LAST-NAME-PROMPT.
The PROMPT clause displays a screen field with or without parentheses depending on
the screen-field definition.
•
If the screen field is defined with a FROM or USING phrase, the PROMPT clause
displays the value currently stored in the associated Working-Storage data item in
parentheses following the prompt. For example, if LAST NAME (Brown) appears,
Brown was the value entered during the last ACCEPT statement for this field.
•
If the screen field is defined with a TO phrase, the PROMPT clause does not
display parentheses.










