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

Data Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual426750-003
5-50
Field-Characteristic Clauses
Item Size
The size of a data item is determined by the symbols of its PICTURE string. The
character-string symbols DB and CR each count as two character positions. Symbols
V and P do not count as character positions. All others count as one character
position.
PROMPT Clause
The PROMPT clause associates a named screen item for output with a screen field for
input. During the processing of an ACCEPT statement, the contents of a named
screen item can be displayed (to assist the terminal operator) before the screen input
is read. The PROMPT clause is valid only for terminals operating in conversational
mode.
screen-field
is the name of a previously defined screen field. The contents of
screen-field
can be described in the Screen Section with a VALUE clause or in a Working-
Storage data item and output with a FROM clause. The contents of
screen-field
are used as a prompt for the screen field described with the
PROMPT clause.
For terminals operating in conversational mode,
screen-field
is used as a signal
for input. In the Screen Section, a screen field description must precede the
associated PROMPT clause in the same screen description.
During execution of the ACCEPT statement, the value specified in the prompt screen
field is displayed before the terminal is able to receive input. The prompt value is
always displayed in the first column of a screen line.
The following example illustrates a PROMPT clause with
screen-field
described in
the Screen Section. When the associated ACCEPT statement runs, LAST NAME
DB Represents two positions that must contain the characters DB or spaces. These
symbols are replaced by spaces during editing if the value is not negative.
* Represents a position that must be a digit or an asterisk. If the position is a digit,
the digit must be to the left of all asterisks.
$ Represents a position where a currency symbol must appear. Multiple currency
symbols represent positions that must contain some number of digits preceded
by a currency symbol, preceded by spaces. The symbol is replaced by a space
during editing only when it is one of a set of multiple currency symbols.
PROMPT
screen-field
Table 5-5. Screen Description Entry PICTURE Character-String
Symbols (page3of3)
Symbol Meaning