Procedure Division [ Micro Focus COBOL Language Reference - Additional Topics ] MPE/iX 5.0 Documentation
Micro Focus COBOL Language Reference - Additional Topics
Procedure Division
The Position-Specification Phrase
Function.
The position-specification phrase specifies the screen position in the
ACCEPT, DISPLAY and EXHIBIT statements described in this chapter. You
must set the MS system directive when you submit your source code to your
COBOL system if it contains this phrase.
General Format.
Syntax Rule.
The comma shown in the above format is mandatory.
The ACCEPT Statement
The following format of the ACCEPTstatement is supported:
General Format.
General Rules.
1. The ACCEPT operation treats a group item as an elementary item, if
you set the MS system directive when you submit your source code
to your COBOL system: it accepts the item itself and not its
subordinate elementary items.
2. If the screen position at which the first operand is to appear is
not specified, the default is the current cursor position, if you
set the MS system directive when you submit your source code to
your COBOL system.
3. Rules 1 and 2 above also apply to Format 2 of the ACCEPT statement
in the chapter Program Definition in your Language Reference.
4. The WITH phrase optionsand their equivalents are:
AUTO/AUTO-SKIP
BACKGROUND-COLOR
BELL/ BEEP option
BLINK
REVERSE-VIDEO
RIGHT-JUSTIFY
SECURE/NO-ECHO
SIZE
SPACE-FILL
TRAILING-SIGN
UNDERLINE
UPDATE
ZERO-FILL
These options also apply to Format 2 of the ACCEPT statement in
the chapter Program Definition in your Language Reference.
The options listed below differ from standard COBOL, as follows:
a. UPDATE. If the UPDATE option is not specified, a data item
for data entry is displayed initially as spaces, if you set
the MS directive when you submit your source code to your
COBOL system. (If the MS directive is not set, the display
of initial data is a configuration option.)
If the UPDATE option is specified, initial data of the data
item for data entry is displayed.
b. PROMPT. This option need not be specified to display prompt
characters, if you set the MS directive when you submit
your source code to your COBOL system.
c. LENGTH-CHECK. If this option is specified, it causes an
implicit EMPTY-CHECKoption, so that the operator must enter
something. You set the MS directive when you submit your
source code to your COBOL system, if you have specified
this option.
d. FOREGROUND-COLORand BACKGROUND-COLOR. Integer-1 in these
clauses specifies the foreground color and background
colorof the screen item respectively, and can be defined by
a value from 0 to 15, as follows:
0 black 8 grey
1 blue 9 light blue
2 green 10 light green
3 cyan 11 light cyan
4 red 12 light red
5 magenta 13 light magenta
6 brown 14 yellow
7 white 15 high intensity
white
On a color screen, if the foreground color option specifies an
integer whose value is from 8 to 15, this is equivalent
to specifying an integer from 0 to 7 and specifying the
HIGHLIGHToption. On a monochrome screen, this is equivalent to
simply specifying the HIGHLIGHT option.
On a color screen, if the background color option specifies an
integer whose value is from 8 to 15, this is equivalent to
specifying an integer from 0 to 7 and specifying the BLINK clause.
On a monochrome screen, this is equivalent to simply specifying
the BLINKoption.
The DISPLAY Statement
General Format.
The following format of the DISPLAY statement is supported:
General Rules.
1. The DISPLAY operation treats a group item as an elementary item,
if you set the MS system directive when you submit your source
code to your COBOL system: it displays the item itself and not
its subordinate elementary items.
2. If the screen position at which the first operand is to appear is
not specified, the default is the current cursor position, if you
set the MS system directive when you submit your source code to
your COBOL system.
3. Rules 1 and 2 above also apply to Format 2 of the DISPLAY
statement in the chapter Program Definition in your Language
Reference.
4. If ERASEis specified, the screen is cleared from the current
cursor position onwards.
The following two rules are additional rules which apply to Format 2 of
the DISPLAY statement in the chapter Program Definition in your Language
Reference.
5. The WITH phrase options and their synonyms are:
BACKGROUND-COLOR
BELL/BEEP
BLANK
BLINK
FOREGROUND-COLOR
HIGHLIGHT
REVERSE-VIDEO
SIZE
UNDERLINE
6. FOREGROUND-COLOR and BACKGROUND-COLOR. Integer-1 in these clauses
specifies the foreground color and background color of the screen
item respectively, and can be defined by a value from 0 to 15, as
follows:
0 black 8 grey
1 blue 9 light blue
2 green 10 light green
3 cyan 11 light cyan
4 red 12 light red
5 magenta 13 light magenta
6 brown 14 yellow
7 white 15 high intensity
white
On a color screen, if the foreground coloroption specifies an
integer whose value is from 8 to 15, this is equivalent
to specifying an integer from 0 to 7 and specifying the
HIGHLIGHTclause. On a monochrome screen, this is equivalent to
simply specifying the HIGHLIGHToption.
On a color screen, if the background coloroption specifies an
integer whose value is from 8 to 15, this is equivalent to
specifying an integer from 0 to 7 and specifying the BLINKclause.
On a monochrome screen, this is equivalent to simply specifying
the BLINKoption.
The EXHIBIT Statement
An EXHIBITstatement with neither the CHANGEDnor the NAMEDoption behaves
as if the NAMED option were specified.
General Format.
The following format of the EXHIBIT statement is supported:
Syntax Rule.
Mnemonic-name should be associated with sysout, syslist, syslst,
syspunch, syspch, console or printer.
General Rule.
ERASE clears the screen from the current cursor position onwards.
MPE/iX 5.0 Documentation