| Data Division - Data Description |
| Procedure Division | |
The Screen Section provides
screen handling facilities for use with ACCEPT and DISPLAY
statements. It allows the following:
- The display of
non-scrolling forms consisting of areas of the screen as defined
in the Screen
Section. A screen section entry is called a screen description. It
is similar in appearance to a data description but defines a
screen item or area of the screen rather than an area in memory.
-
The display of data items
which constitute non-scrolling forms. The details of the areas of the
screen to be used are provided in the associated ACCEPT and DISPLAY
operations.
The
Screen Section contains a description of each field on the screen
which is accessed in a Format 4 ACCEPT or Format 2 DISPLAY operation. Such
a field is called a screen item. Many screen items describe only the
layout of fields within a field on the screen and are never referenced
explicitly.
The Screen Section contains syntax which enables the operator to:
- Specify the exact location of fields
- Accept data typed at specified positions
- Display literal text at specified positions
- Define screen attributes
- Control console features.
Table 4-6 summarizes the
screen description clauses, screen options and data description
clauses available in the
Screen Section
and for use with ACCEPT and
DISPLAY
statements. It also specifies options or clauses which can be used with
each of the types of fields defined below:
- An
input field is a
screen item whose description contains a TO phrase.
- An
output field is a screen item whose description contains a FROM
phrase.
- An
update field is a screen item whose description contains a USING
phrase.
- A
literal field is an elementary
screen item whose description contains no PICTURE clause.
Data entry is made to numeric and numeric edited screen fields in two
ways;
fixed format mode and
free format mode. Refer to your COBOL system documentation about
user interfaces for further details.
Fixed format mode is the default manner in which data entry is made to
numeric and numeric edited screen fields. This mode formats and echoes the
entered data and also moves the cursor in accordance with the requirements
of the field's picture specification, as each keystroke is received.
Characters other than digits, "+", "" , and the
decimal point character, are rejected; insertion characters in edited
fields are skipped over as the cursor moves backwards and forwards; any
sign indicator is modified in accordance with its normal specification;
floating symbols move left and right in the field, and insertion symbols
appear and disappear as digits are inserted or deleted. When the cursor
reaches the last character position in a field, any further character
entered replaces the last character.
Free format mode is an alternative manner in which data entry can be
made to numeric and numeric edited screen fields. The default mode is
fixed format mode (see above entry). Free format mode allows data to be
keyed into a PIC X field of appropriate length, and only when the operator
leaves the field is the data reformatted to comply with the picture
specification. Once the operator moves the cursor from the field, your
COBOL system disregards all characters other than digits and the sign and
decimal point symbols. It then extracts, stores, or reformats the numeric
value in accordance with the normal COBOL rules for a MOVE to an item with
the same picture as the screen item or working-storage item. The numeric
value is then usually echoed to the screen. See your COBOL system
documentation about user interfaces for details on configuration options
available to you.
Table 4-6: Permitted Use of Options
Screen Clauses/
Screen Options/
Data Description
Clauses |
SCREEN SECTION |
WITH PHRASE |
Input Field |
Output Field |
Update Field |
Literal Field |
ACCEPT |
DISPLAY |
AUTO |
X |
|
X |
|
X |
|
BACKGROUND-COLOR |
X |
X |
X |
X |
X |
X |
BELL |
X |
X |
X |
X |
X |
X |
BLANK |
X |
X |
X |
X |
|
X |
BLANK WHEN ZERO |
X |
X |
X |
|
|
|
BLINK |
X |
X |
X |
X |
X |
X |
COLUMN |
X |
X |
X |
X |
|
|
ERASE |
X |
X |
X |
X |
X |
|
FOREGROUND-COLOR |
X |
X |
X |
X |
X |
X |
FULL |
X |
|
X |
|
X |
|
GRID |
X |
X |
X |
X |
X |
X |
HIGHLIGHT |
X |
X |
X |
X |
X |
X |
JUSTIFIED |
X |
X |
X |
|
|
|
LEFT-JUSTIFY |
|
|
|
|
X |
|
LEFTLINE |
X |
X |
X |
X |
X |
X |
LINE |
X |
X |
X |
X |
|
|
LOWLIGHT |
X |
X |
X |
X |
X |
X |
OCCURS |
X |
X |
X |
|
|
|
OVERLINE |
X |
X |
X |
X |
X |
X |
PROMPT |
X |
|
X |
|
X |
|
REQUIRED |
X |
|
X |
|
X |
|
REVERSE-VIDEO |
X |
X |
X |
X |
X |
X |
RIGHT-JUSTIFY |
|
|
|
|
X |
|
SECURE |
X |
|
X |
|
X |
|
SIGN |
X |
X |
X |
|
|
|
SIZE |
X |
X |
X |
X |
X |
X |
SPACE-FILL |
|
|
|
|
X |
|
TRAILING-SIGN |
|
|
|
|
X |
|
UNDERLINE |
X |
X |
X |
X |
X |
X |
UPDATE |
|
|
|
|
X |
|
X = clause/option allowed
These clauses and options are described in the following sections.
Function
The Screen Section provides screen handling facilities for use with
Format 4 ACCEPT and Format 2 DISPLAY statements.
General Format
Syntax Rules
- The Screen Section must be the last section in the Data Division.
- Screen-description-entries contain screen description clauses. Data
description clauses allowed in the Screen Section are restricted to
those shown in the General Format.
General Rule
The Screen Section contains a description of each field on the screen
which is accessed in a Format 4 ACCEPT or Format 2 DISPLAY operation. Such
a field is called a screen item. Many screen items describe only the
layout of fields within a field on the screen and are never referenced
explicitly.
Function
A
Screen Description entry specifies the attributes, behavior, size
and location for a referenced screen item which is accepted or displayed
at run time.
The availability of screen attributes is dependent on your terminal
hardware and operating system and COBOL run-time support.
The following are not
a part of X/Open screen handling:
ACCEPT (Formats 3 and 5)
AUTO-SKIP (synonym for AUTO)
BEEP (synonym for BELL)
COL (synonym for COLUMN)
CONTROL
DISPLAY (Format 3)
EMPTY-CHECK (synonym for REQUIRED)
GRID
LEFTLINE
LENGTH-CHECK (synonym for FULL)
NO-ECHO (synonym for SECURE)
OCCURS
OVERLINE
PROMPT
SIZE
ZERO-FILL
General Format
Syntax Rules
- Each Screen Description entry must start with a level number from 01
through 49.
- Each level 01 item must have a screen-name.
- Screen-name must immediately follow level number and conform to the
rules for user-defined names.
- A screen item can be referenced only in a Format 4 ACCEPT or Format 2
DISPLAY statement.
- Each elementary screen item must contain at least one of the
following clauses: BELL, BLANK LINE, BLANK SCREEN, COLUMN, LINE,
PICTURE, VALUE.
- The data items in the FROM, TO and USING phrases are "associated"
with the screen item. The USING phrase is equivalent to the combination
of a FROM and TO phrase, each specifying the same field.
- An ACCEPT can be executed on a
group screen item containing screen items with FROM or VALUE
phrases only if that group also contains screen items with TO or USING
phrases.
- The clauses following screen-name can be specified in any order.
- A clause that appears in the description of a group screen item
applies to all the elementary subordinate items in that group in whose
descriptions it would be allowed.
- Any non-01 level screen item can have a data name, FILLER, or no
name. If no name is used, then FILLER is assumed (and the item can never
be explicitly referenced).
- If the same clause is specified more than once for the same screen
item, the clause which appears at the lowest level within the hierarchy
is the one which takes effect.
General Rules
- Screen-name assigns a name to the screen item described in the screen
description.
- Screen descriptions define areas on the screen. Each entry consists
of a level number, an optional screen-name, and various optional clauses
relating to the positioning of fields as well as to console functions.
- When the screen item is displayed, data is taken from the literal or
data item named in the associated FROM or USING phrase. Items with the
TO phrase only are treated as though FROM SPACE or FROM ZERO were
specified, depending on the type of screen item.
- When the screen item is accepted, the data entered is moved from the
screen to the data item named in the TO or USING phrase. Depending on
the category of the item, conversion and de-editing are done if
necessary.
- An
input field is a screen item whose description contains a TO
phrase.
- An
output field is a screen item whose description contains a FROM
phrase.
- An
update field is a screen item whose description contains a USING
phrase.
- A
literal field is an elementary screen item whose description
contains no PICTURE clause.
- An ACCEPT of a group screen item consists of accepting those
elementary subordinate items that are input or update fields. They are
accepted in the order their descriptions appear in the Screen Section at
the screen positions indicated by the screen descriptions. Unless
otherwise specified in the CURSOR IS clause (see the section The
CURSOR IS Clause earlier in this chapter), the cursor is initially
positioned at the start of the first item. As the ACCEPT operation into
each item is terminated, the cursor moves to the start of the next item.
- A DISPLAY of a group screen item consists of displaying those
elementary subordinate items that are output, update or literal fields.
They are displayed simultaneously at the screen positions indicated by
the screen descriptions.
- If the length of an ACCEPT or DISPLAY screen item exceeds the length
of the current line, wraparound is to the next line.
- If a screen item is too large to fit within the physical screen,
truncation occurs at the first character that is off-screen for output
fields and alphanumeric input and update fields, and at the first field
that is off-screen for numeric and numeric edited input and update
fields.
Function
The AUTO clause automatically terminates an ACCEPT operation of the
screen item when the last character position is keyed. No explicit
terminator key is necessary.
General Format
Syntax Rules
- The AUTO clause is allowed only with input and update fields.
- If this clause is specified at group level, it applies to all
elementary subordinate items.
-
AUTO and AUTO-SKIP are
equivalent.
General Rules
- Provided any REQUIRED or FULL clause is satisfied, the cursor is
positioned to the next screen item. Alternatively, if the screen item is
the last one in the ACCEPT operation, the entire ACCEPT is terminated.
- This clause overrides any existing configuration options for
automatic skipping and for the automatic termination of an ACCEPT
statement. (See your COBOL system documentation about user interfaces
for details of configuration options.)
- In a fixed format numeric edited screen item, the AUTO clause causes
the decimal point position to be skipped automatically once all of the
integer places have been filled. Selection of fixed format mode is a
configuration option. (See your COBOL system documentation about user
interfaces for details of configuration options.)
Function
The BACKGROUND-COLOR clause specifies the background color of the screen
item.
General Format
Syntax Rules
-
BACKGROUND-COLOR and
BACKGROUND-COLOUR are equivalent.
- This clause is allowed with any screen item.
- If this clause is specified at group level, it applies to all
elementary subordinate items.
- Integer-1 must be a value from 0 to 7.
General Rules
- This clause is available for use only with a color screen.
- Integer-1 or identifier-1 specifies the background color of the
screen item. The colors and their corresponding values are:
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 or yellow |
14 |
yellow |
7 |
white |
15 |
high intensity white |
On a color screen, if the 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 BLINK
clause.
- If this clause is not specified, the background color defaults to
black.
- If a screen description contains a BLANK SCREEN clause, and either
contains a BACKGROUND-COLOR clause or is subordinate to one that does,
when the screen item is displayed by a DISPLAY statement the specified
color becomes the default background color. It remains the default
background color until either another screen item with this combination
of options is displayed (whether in the same DISPLAY statement or
another), or a Format 3 DISPLAY statement with both options is executed.
- Identifier-1 must be an unsigned numeric integer and should contain a
value between 0 and 7. Any value higher than 7 will be divided by 8 and
the remainder used as the color value.
- Identifier-1 must not be subject to OCCURS clauses.
- Whether a value of 6 in integer-1 or identifier-1 produces brown or
yellow color depends on the terminal hardware.
Function
The BELL clause causes an audible alarm to occur each time the item
containing the clause is displayed.
General Format
Syntax Rules
- This clause is allowed only with elementary items.
-
BELL and BEEP are
equivalent.
General Rules
- The BELL clause causes an alarm to occur each time the item
containing the clause is accepted or displayed.
- In order to cause the audible alarm to sound when the subject of this
entry is accepted, you must specify the BELL clause in General Format 5
of the ACCEPT statement: the alarm will not sound if you specify the
BELL clause in the Screen Description Entry and then use General Format
4 of the ACCEPT statement.
Function
The BLANK clause clears a line of a screen or the whole screen before a
screen item is displayed.
General Format
Directives
- In addition to Compiler directives which provide flagging and modify
the reserved word list, the following directive may impact either the
syntax or semantics described in this section.
- OLDBLANKLINE - specifies that the BLANK LINE clause has the same
effect as ERASE EOL; that is, all characters to the right of the
cursor are deleted.
Syntax Rules
- The BLANK SCREEN clause can be specified in any screen description
entry.
- The BLANK LINE clause can be specified only for elementary items.
General Rules
- The BLANK SCREEN clause is executed before DISPLAY of a screen data
item, no matter where it appears. If the clause is specified, all the
screen is cleared and the cursor is placed at line 1, column 1.
- When BLANK LINE is specified, blanking begins at column 1 of the line
specified for the screen data element in whose description it is
included and continues through the end of the line. The cursor remains
in the same position as before the BLANK LINE was actioned.
- If neither the BLANK nor the ERASE clause is specified, only the
particular character positions corresponding to the screen data element
are modified when the element is displayed. The rest of the screen
content remains the same.
- The BLANK SCREEN clause causes the screen to return to its default
foreground and background colors. For additional effects, if the screen
item is subject to a FOREGROUND-COLOR or BACKGROUND-COLOR clause, see
the sections on those clauses.
- The BLANK clause is ignored in an ACCEPT statement.
- The erasing is done before the item is displayed.
- When the BLANK SCREEN clause is used, only color options
(foreground-color and background-color) should be used on the same
screen. Other attributes will be accepted but ignored.
Function
The BLANK WHEN ZERO clause causes the blanking of a screen item when its
value is zero.
General Format
Syntax Rules
- This clause is allowed only with input, output and update fields that
are numeric or numeric edited.
General Rules
- The BLANK WHEN ZERO clause causes the blanking of a screen item when
its value is zero.
- This clause has no effect when the cursor is in the field. That is,
the contents of the field are always displayed, even if zero, if this is
the current input field.
Function
The BLINK clause causes the screen item to blink when it appears on
the screen.
General Format
Syntax Rules
- The BLINK clause is allowed with any screen item.
- If the BLINK clause is specified at group level, it applies to all
suitable subordinate elementary items.
General Rules
- The BLINK clause causes the screen item to blink when it appears on
the screen.
Function
The COLUMN clause specifies the column at which the screen item starts
on the screen.
General Format
Syntax Rules
- Identifier-1 must be an unsigned numeric integer and must contain a
value greater than zero and less than 256.
- Integer-1 must be unsigned, greater than zero and less than 256.
-
PLUS and "+" are
equivalent.
- Omitting the NUMBER phrase results in a default value of +1.
- COLUMN 1 is assumed for screen descriptions which specify the LINE
clause but omit the COLUMN clause.
- The COLUMN clause can be specified with any elementary item.
-
COL is an abbreviation for
COLUMN.
-
When the COLUMN clause is
specified anywhere within the hierarchy of a SCREEN SECTION group item,
then at least one of the following clauses must also be specified within
the same group definition:
BEEP, BELL, BLANK LINE, BLANK SCREEN, ERASE EOL, ERASE EOS, FROM,
TO, USING, or VALUE.
General Rules
- The COLUMN clause specifies the column in which the screen item is to
appear on the screen in an ACCEPT or DISPLAY operation.
- If the COLUMN clause has an identifier or an integer but does not
specify PLUS,
"+" or "",
the clause gives an absolute column number within the screen record.
Each 01 level represents a screen record. The AT phrase of the ACCEPT
and DISPLAY statements specifies the positioning of the screen record
relative to the start of the display screen. If the AT phrase is not
specified, then column 1 is the first column on the screen.
- If PLUS,
"+" or ""
is specified in the COLUMN clause, then the column number within the
screen record is relative to that at which the preceding screen item
ends, regardless of whether or not the statement displays the
preceding item on the screen. This depends on the current effective
length of that item at run time, derived from its PICTURE, VALUE and
SIZE clauses. The counting of column numbers restarts at a level 01
item at column 1.
- If a screen description contains neither a LINE or COLUMN clause, and
the item is not a level 01 item, COLUMN+1 is assumed. The item then
starts immediately following the preceding item in the Screen Section.
- If a COLUMN position that is specified is off the screen, wraparound
is to the next (or previous) line.
Function
The CONTROL clause allows attributes associated with a Screen Section
item to be defined at run time.
General Format
Syntax Rules
- This clause is allowed with any screen item.
- If this clause is specified at group level, it applies to all
elementary subordinate items.
- Identifier-1 must be an alphanumeric data item. The maximum permitted
size of the item is PIC X(65535).
- Attributes specified in identifier-1 override any statically defined
attributes.
- CONTROL statements must not be nested.
- The PROTECT attribute may be specified only for an elementary screen
description entry.
General Rules
- When an ACCEPT or DISPLAY statement is executed that implicitly or
explicitly references the subject of this entry, the contents of the
data item referenced by identifier-1 must conform to the following
subset of the screen attributes which can be specified elsewhere:
- If identifier-1 contains spaces, the statically defined attributes
are used for any accept or display of the item.
- The meaning of each of the attributes that can be specified within
the CONTROL identifier-1 is defined in the following parts of this
reference:
- Within the DATA DIVISION as an individual SCREEN SECTION CLAUSE
- AUTO-SKIP/AUTO
- BACKGROUND-COLOR/BACKGROUND-COLOUR
- BELL/BEEP
- BLANK LINE/SCREEN
- BLINK
- FOREGROUND-COLOR/FOREGROUND-COLOUR
- FULL/LENGTH-CHECK
- GRID
- HIGHLIGHT
- JUSTIFY/JUST
- LEFTLINE
- LOWLIGHT
- OVERLINE
- PROMPT
- REQUIRED/EMPTY-CHECK
- REVERSE-VIDEO
- SECURE/NO-ECH0
- UNDERLINE
- ZERO-FILL
- Within the PROCEDURE DIVISION in the ACCEPT statement General
Rules:
- RIGHT-JUSTIFY
- TRAILING-SIGN
- TRAILING
- Within this CONTROL clause discussion:
- The PROTECT attribute specifies that input to an ACCEPT item is to be
prevented.
Function
The ERASE clause clears part of the line or the screen starting at the
cursor position.
General Format
Syntax Rules
- The ERASE clause can be specified only for elementary items.
General Rules
- When ERASE EOL is specified, blanking begins at the line and column
coordinates specified for the screen data element in whose description
it is included and continues through the end of the line.
- When ERASE EOS is specified, blanking begins at the line and column
coordinates specified for the screen data element in whose description
it is included and continues through the end of the screen.
- If neither the BLANK nor the ERASE clause is specified, only the
particular character positions corresponding to the screen data element
are modified when the element is displayed.
- The clause is ignored in an ACCEPT operation.
Function
The FOREGROUND-COLOR clause specifies the foreground color of the screen
item.
General Format
Syntax Rules
- FOREGROUND-COLOR and FOREGROUND-COLOUR are equivalent.
- This clause is allowed with any screen item.
- If this clause is specified at group level, it applies to all
elementary subordinate items.
- Integer-1 must be a value from 0 to 7.
General Rules
- This clause is available for use only with a color screen.
- Integer-1 or identifier-1 specifies the foreground color of the
screen item. The colors and their corresponding values are:
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 or yellow |
14 |
yellow |
7 |
white |
15 |
high intensity white |
On a color screen, if the value is from 8 to 15, this is equivalent
to specifying an integer from 0 to 7 and specifying the HIGHLIGHT
clause. On a monochrome screen, this is equivalent to simply
specifying the HIGHLIGHT clause.
- If this clause is not specified, the foreground color defaults to
white.
- If a screen description contains a BLANK SCREEN clause, and either
contains a FOREGROUND-COLOR clause or is subordinate to one that does,
then when the screen item is displayed by a DISPLAY statement the
specified color becomes the default foreground color. It remains the
default foreground color until either another screen item with this
combination of options is displayed (whether in the same DISPLAY
statement or another), or a Format 3 DISPLAY statement with both options
is executed.
- If the HIGHLIGHT clause is also specified, foreground colors are
brightened and lightened; for example on some hardware, black can become
grey and brown can become yellow. However, this does not apply to the
BLANK SCREEN clause.
- Identifier-1 must be an unsigned numeric integer and should contain a
value between 0 and 7. Any value higher than 7 will be divided by 8 and
the remainder used as the color value.
- Identifier-1 must not be subject to OCCURS clauses.
- Whether a value of 6 in integer-1 or identifier-1 produces brown or
yellow depends on the terminal hardware.
Function
The FROM clause identifies the source of data for display.
General Format
Syntax Rules
- The FROM clause, when used with the TO clause, is equivalent to the
USING clause, both specifying the same identifier. It must not be used
with the USING clause.
- The identifier in the FROM clause can be qualified. If no OCCURS
clause applies to the screen item, this identifier can be subscripted or
indexed. It must be defined in the File, Working-Storage,
Local-Storage,
or Linkage Section of the program.
General Rules
- Executing a DISPLAY statement on a screen item whose description
includes a FROM clause moves data from the associated data item to the
screen item, and then displays the screen item on the screen.
Function
The FULL clause specifies that the operator must either leave the screen
item completely empty or fill it entirely with data.
General Format
Syntax Rules
- The FULL clause is valid only in input and update fields and group
items.
- If this clause is specified at group level, it applies to all
suitable subordinate elementary items.
-
FULL and
LENGTH-CHECK are equivalent.
General Rules
- The FULL clause is effective during the execution of any ACCEPT
statement that causes the screen item to be accepted provided the cursor
enters the screen item at some time during the ACCEPT operation. Until
this clause is satisfied, terminator keystrokes are rejected. If the
item is fixed format numeric edited, the cursor is repositioned to the
decimal point position.
- If the screen item is alphanumeric, in order to satisfy this clause
either the entire item must contain only spaces or prompt characters, or
both the first and last character positions must contain non-space,
non-prompt characters.
- If the screen item is free format numeric or free format numeric
edited, then to satisfy the clause, either the resultant value must be
zero, or both the first and last character positions must contain
non-space, non-prompt characters.
- If the screen item is fixed format numeric edited, then to satisfy
the clause either the value must be zero or there must be no digit
positions in which zero-suppression has taken effect.
- The FULL clause has no effect on fixed format numeric or on numeric
edited screen items that have no zero-suppression positions.
- For update fields, the FULL clause can be satisfied by initial data
as well as operator-keyed data.
- The FULL clause cannot be effective if a function key is used to
terminate the ACCEPT operation. (See your COBOL system documentation
about user interfaces for details of configuration options.)
- An error message can be configured for display on the screen if the
FULL clause is not satisfied. (See your COBOL system documentation about
user interfaces for details of configuration options.)
Function
The GRID clause causes each character of the screen item to have a
vertical line on its left-hand side when the item appears on the screen.
Each line is within the character-position.
General Format
Syntax Rules
- The GRID clause can be used with any screen item.
- If the GRID clause is specified at group level, it applies to all
suitable subordinate elementary items.
- If this clause is used on a system that does not support characters
with vertical left-hand lines it has no effect.
General Rules
- The GRID clause causes each character of the screen item to have a
vertical line on its left-hand side when the item appears on the screen.
Each line is within the character-position.
Function
The HIGHLIGHT clause causes the screen item to appear in high intensity
mode when it appears on the screen.
General Format
Syntax Rules
- This clause is valid for input, output, update or literal fields.
- If the HIGHLIGHT clause is specified at group level, it applies to
all suitable subordinate elementary items.
General Rules
- If the FOREGROUND-COLOR clause is also specified, the HIGHLIGHT
clause causes the foreground colors to become brighter and lighter; for
example on some hardware, black can become grey and brown can become
yellow. However, this does not apply to the BLANK SCREEN clauses.
Function
The JUSTIFIED clause specifies non-standard positioning of data within a
screen item when data is either moved to it or entered into it.
General Format
Syntax Rules
- JUST is an abbreviation for JUSTIFIED.
- The JUSTIFIED clause is allowed only with input, output and update
fields.
General Rules
- If the screen item is an output or update field, when data is moved
to it from the sending item, the JUSTIFIED clause is applied according
to the normal rules for MOVE.
- If the screen item is an input or update field, when the accepting of
data into it has terminated, the JUSTIFIED clause causes the data
entered to be moved right by the number of character positions occupied
by prompt characters, and the left of the field to be padded with
spaces. This is done before the data is moved to the receiving item.
This does not occur if data is not entered.
- If the screen item has a SECURE clause, the effect on the data is the
same as it would be without the SECURE clause, but this effect does not
appear on the screen.
Function
The LEFTLINE clause causes the leftmost character of the screen item to
have a vertical line on its left-hand side when the item appears on the
screen. The line is within the character- position.
General Format
Syntax Rules
- The LEFTLINE clause can be used with any screen item.
- If the LEFTLINE clause is specified at group level, it applies to all
suitable subordinate elementary items.
- If this clause is used on a system that does not support characters
with vertical left-hand lines it has no effect.
General Rules
- The LEFTLINE clause causes the leftmost character of the screen item
to have a vertical line on its left-hand side when the item appears on
the screen. The line is within the character-position.
Function
The LINE clause specifies the line at which the screen item starts on
the screen.
General Format
Syntax Rules
- Identifier-1 must be an unsigned numeric integer and must contain a
value greater than zero and less than 256.
- Integer-1 must be unsigned, greater than zero and less than 256.
-
PLUS and "+" are
equivalent.
- Omitting the NUMBER phrase results in a default value of PLUS 1.
- The current line is assumed for screen descriptions which omit the
LINE clause.
- The LINE clause can be specified with any elementary item.
-
When the LINE clause is
specified anywhere within the hierarchy of a SCREEN SECTION group item,
then at least one of the following clauses must also be specified within
the same group definition:
BEEP, BELL, BLANK LINE,
BLANK SCREEN, ERASE EOL, ERASE EOS, FROM, TO, USING, or VALUE.
General Rules
- The LINE clause specifies the line on which the screen item is to
appear on the screen in an ACCEPT or DISPLAY operation.
- If the LINE clause has identifier-1 or integer-1 but does not specify
PLUS,
"+" or "",
the clause gives an absolute line number within the screen record.
Each 01 level represents a screen record. The AT phrase of the ACCEPT
and DISPLAY statements specifies the positioning of the start of the
screen record relative to the start of the display screen. If the AT
phrase is not specified, then line 1 is the first line on the screen.
- If PLUS,
"+" or "",
is specified in the LINE clause, then the line number is relative to
that at which the preceding screen item ends, regardless of whether or
not the statement displays the preceding item on the screen. This
depends on the current effective length of that item at run time,
derived from its PICTURE, VALUE and SIZE clauses. The counting of line
numbers restarts at a level 01 item at line 1.
- If a Screen Description contains neither a LINE or COLUMN clause, and
the item is not a level 01 item, COLUMN PLUS 1 is assumed. The item then
starts immediately following the preceding item in the screen section.
- If a LINE position that is specified is off the screen, the ACCEPT or
DISPLAY is truncated.
- If PLUS
"+" or "",
is specified in the LINE clause, and an ACCEPT or DISPLAY statement
referencing the Screen Section item includes the AT LINE NUMBER
phrase, the line number at which this item is presented is the sum or
difference of the two numbers.
Function
The LOWLIGHT clause specifies that the field is to appear on the screen
with the lowest intensity.
General Format
Syntax Rules
- If the LOWLIGHT clause is specified at group level, it applies to all
suitable subordinate elementary items.
General Rules
- The LOWLIGHT clause specifies that the field is to appear on the
screen with the lowest intensity.
Function
The OCCURS clause eliminates the need for separate entries for repeated
screen items and supplies information required for the application of
subscripts or indices.
General Format
Syntax Rules
- The OCCURS clause is not allowed at 01 level.
- If USING or TO clauses apply to the item, or to any item subsidiary
to the item, then the same number of OCCURS clauses, specifying the same
number of occurrences, must apply to the receiving item. These OCCURS
clauses must not include the DEPENDING phrase.
- If a FROM clause applies to the item, or to any item subsidiary to
the item, either the same number of OCCURS clauses, specifying the same
number of occurrences, or no OCCURS clauses at all, must apply to the
sending item. These OCCURS clauses must not include the DEPENDING
phrase.
General Rules
- In a screen description which is subject to an OCCURS clause, the
LINE and COLUMN clauses apply to each individual table entry. Thus
either the LINE or the COLUMN clause should specify relative
positioning, because if they both specify an absolute position every
entry will appear in the same place.
- If the screen item is an output field, and no OCCURS clauses apply to
the sending item, in a DISPLAY operation the contents of the sending
item are moved to every occurrence of the screen item. An elementary
item that is fully subscripted is deemed to have no OCCURS clauses
applying to it.
- If the screen item is an update field, or it is an output field with
OCCURS clauses applying to the sending item, then in a DISPLAY operation
the contents of each occurrence of the sending item are moved to the
corresponding occurrence of the screen item.
- If the screen item is an update or input field, then in an ACCEPT
operation the data entered into each occurrence of the screen item is
moved to the corresponding occurrence of the receiving item.
Function
The OVERLINE clause causes every character of the screen item to have a
horizontal line above it when the item appears on the screen. The line is
within the character-position.
General Format
Syntax Rules
- The OVERLINE clause can be used with a screen item.
- If the OVERLINE clause is specified at group level, it applies to all
suitable subordinate elementary items.
- If this clause is used on a system that does not support overlining
it has no effect.
General Rules
- The OVERLINE clause causes every character of the screen item to have
a horizontal line above it when the item appears on the screen.
Function
The PICTURE clause describes the length, general characteristics and
editing requirements of a screen item.
General Format
Syntax Rules
- The PICTURE clause can include any standard editing characters.
- The PICTURE clause must be used in conjunction with one or more of
the
FROM,
TO or
USING clauses. The USING clause must not be used with either the
FROM or TO clause.
- PIC is an abbreviation for PICTURE.
- The PICTURE clause is allowed only with elementary items.
- The PICTURE clause need not be the same as the PICTURE clause of the
data item referenced in the FROM, TO or USING clause but it must be such
that the implied MOVE is legal.
General Rules
- The character-string describes the length and category of the screen
item. It is used in the same way as the character-string in the PICTURE
clause for a data item.
- We recommend that every numeric screen item either be a numeric
edited item or contain only 9's in its PICTURE clause. Editing and
de-editing are applied as necessary when data is moved to or from the
associated data item.
Function
The PROMPT clause causes the empty character positions in the screen
item to be marked on the screen during an ACCEPT operation while the
system is ready to accept operator-keyed data into that item.
General Format
Syntax Rules
- This clause is allowed only with input and update fields and with
group items.
- If this clause is specified at group level, it applies to all
subordinate elementary items.
- Identifier-1 must be a single-character alphabetic or alphanumeric
data item.
- Identifier-1 must not be subject to an OCCURS clause.
- Literal-1 must be a one-character nonnumeric literal or a figurative
constant.
General Rules
- For items in the Screen Section
:
- PROMPT is always on.
- If the PROMPT clause is not specified, or is specified without
the CHARACTER phrase, the default prompt character is used.
- For other data items referenced in an ACCEPT statement,
- PROMPT is on if and only if the PROMPT clause is specified on the
ACCEPT statement.
- If the PROMPT clause is specified without the CHARACTER phrase,
the default prompt character is used.
- The CHARACTER phrase specifies a prompt character to be used for
marking empty character positions. The prompt character overrides the
configured option. (See your COBOL system documentation about user
interfaces for details on configuration options.)
- The PROMPT clause causes the prompt character to replace trailing
spaces in alphanumeric or free format numeric screen items. It also
causes the prompt character to replace leading suppressed digit
positions in fixed format numeric edited screen items.
- The PROMPT clause has no effect on fixed format, nonedited numeric
screen items or numeric edited screen items that have no
zero-suppression positions.
- If PROMPT is on for a field, you cannot move the cursor past the end
of the field, which is marked by prompt characters. An attempt to do so
will move the cursor to the next field
.
- If PROMPT is not on for a field, the cursor can be moved to the
spaces following the end of the field.
- This clause has no effect if the SECURE clause is specified.
- The prompt characters appearing in the screen item are changed to
spaces upon termination of the ACCEPT operation.
Function
The REQUIRED clause specifies that the operator must not leave the
screen item empty.
General Format
Syntax Rules
- The REQUIRED clause is allowed only with input and update fields and
with group items.
- This clause can be specified on a group screen item, in which case it
applies to all suitable elementary items which are subordinate to that
item.
-
REQUIRED and
EMPTY-CHECK are equivalent.
General Rules
- The REQUIRED clause takes effect during the execution of any ACCEPT
statement that causes the screen item to be accepted provided the cursor
enters the screen item at some time during the ACCEPT. Unless this
clause is satisfied, terminator keystrokes are rejected and the cursor
is repositioned to the beginning of the item.
- To satisfy this clause, alphanumeric screen items must contain at
least one non-space, non-prompt character; numeric screen items must
have a non-zero value.
- For update fields, the REQUIRED clause can be satisfied by initial
data as well as by operator-keyed data.
- The REQUIRED clause cannot be effective if a function key is used to
terminate an ACCEPT operation. (See your COBOL system documentation
about user interfaces for details on configuration options.)
- An error message can be configured for display on the screen if the
REQUIRED clause is not satisfied. (See your COBOL system documentation
about user interfaces for details on configuration options.)
Function
The REVERSE-VIDEO clause causes the screen item to be displayed in
reverse-video.
General Format
Syntax Rules
- The REVERSE-VIDEO clause is allowed with any screen item.
- If the REVERSE-VIDEO clause is specified at group level, it applies
to all suitable subordinate elementary items.
General Rules
- The REVERSE-VIDEO clause causes the screen item to be displayed in
reverse-video.
Function
The SECURE clause prevents operator-keyed data from appearing on the
screen.
General Format
Syntax Rules
- The SECURE clause is allowed only with input and update fields.
- This clause can be specified on a group screen item, in which case it
applies to all suitable elementary items which are subordinate to that
item.
SECURE and
NO-ECHO are equivalent.
General Rules
- When the SECURE clause is specified for input fields, only spaces and
the cursor appear in the screen item. For update fields, the original
contents of the field will be displayed, but cannot be altered.
Function
The SIGN clause specifies the position and representation of the
operational sign.
General Format
Syntax Rules
- The
SIGN clause is allowed only with input, output and update fields
whose pictures contain the character "S".
- This clause is allowed only with elementary items.
General Rules
- It is recommended that the SEPARATE option be used when the SIGN
clause is specified in a screen description. If the SEPARATE option is
not specified, a sign denoted by "S" in a PICTURE clause
appears as an overpunch.
Function
The SIZE clause specifies the current size of the screen item.
General Format
Syntax Rules
- The SIZE clause is allowed only with elementary screen items.
- Identifier-1 must be an unsigned numeric integer and must not be
subject to an OCCURS clause.
- Integer-1 must be unsigned.
General Rules
- The SIZE clause has no effect if the size specified is zero.
- If the SIZE clause is specified for a numeric or numeric edited
screen item and the size specified is not zero, the screen item is
treated as though it were free format. This overrides the setting of the
configuration option.
- If the size specified in the SIZE clause is less than that implied by
the associated PICTURE or VALUE clause, only the left-hand portion of
the screen item appears on the screen. If the JUSTIFIED clause is
present in an ACCEPT statement, only the right-hand portion of the
screen item appears. The remainder of the screen item can be considered
to contain spaces or zeros, as appropriate.
- If the size specified in the SIZE clause is greater than that implied
by the PICTURE or VALUE clause for output or literal fields, the screen
item is padded on the right with spaces.
- Changing the value in identifier-1 alters the effective size of the
screen item at run-time. This can alter the screen positions of items
whose descriptions follow it in the Screen Section. (See the sections
The LINE Clause and The COLUMN Clause earlier in this
chapter.)
Function
The TO clause identifies the destination of data accepted.
General Format
Syntax Rules
- The TO clause, when used with the FROM clause, is equivalent to the
USING clause, both specifying the same identifier. It must not be used
with the USING clause.
- The identifier in the TO clause can be qualified. If no OCCURS clause
applies to the screen item, this identifier can be subscripted or
indexed. It must be defined in the File, Working-Storage,
Local-Storage,
or Linkage Section of the program.
General Rules
- Executing an ACCEPT statement on a screen item whose description
includes a TO clause accepts operator-keyed data into the screen item,
and then moves that data to the associated data item.
Function
The UNDERLINE clause causes the screen item to be underlined when
it appears on the screen.
General Format
Syntax Rules
- The UNDERLINE clause is allowed with any screen item.
- If the UNDERLINE clause is specified at group level, it applies to
all suitable subordinate elementary items.
General Rules
- The UNDERLINE clause causes the screen item to be underlined when it
appears on the screen.
- This clause has no effect if your screen hardware does not support
underline.
Function
The USAGE clause specifies the format of a data item in the computer
storage.
General Format
Syntax Rules
- The USAGE of a Screen Section data item must be either explicitly or
implicitly defined as USAGE DISPLAY or USAGE DISPLAY-1.
Function
The USING clause identifies the source of data for display.
General Format
Syntax Rules
- The USING clause is equivalent to the TO and FROM clauses, both
specifying the same identifier. It must not be used with either the TO
or FROM clause.
- The identifier in the USING clause can be qualified. If no OCCURS
clause applies to the screen item, this identifier can be subscripted or
indexed. It must be defined in the File, Working-Storage, Local-Storage,
or Linkage Section of the program.
General Rules
- Executing a DISPLAY statement on a screen item whose description
includes a USING clause moves data from the associated data item to the
screen item, and then displays the screen item on the screen.
- Executing an ACCEPT statement on a screen item whose description
includes a USING clause accepts operator-keyed data into the screen
item, and then moves that data to the associated data item.
Function
The VALUE clause specifies literal information for display on the
screen.
General Format
Syntax Rules
- The literal associated with the VALUE clause must be nonnumeric. It
cannot be a figurative constant.
- The VALUE clause is allowed only with elementary items that have no
PICTURE clauses.
General Rules
- The VALUE clause specifies literal information for display on the
screen.
Function
The ZERO-FILL clause causes trailing prompt characters to be replaced by
zeros instead of spaces.
General Format
Syntax Rules
- This clause is allowed only with input and update fields that are
alphabetic or alphanumeric.
General Rules
- The ZERO-FILL clause causes trailing prompt characters to be replaced
by zeros instead of spaces when data is moved from the screen item to
the receiving item. This occurs only if the operator enters data into
the screen item.
- If the receiving item has a JUSTIFIED clause, the ZERO-FILL clause
causes leading positions left vacant by justification to be zero-filled.
Copyright © 1998 Micro Focus Limited. All rights reserved.
This document and the proprietary marks and names
used herein are protected by international law.
| Data Division - Data Description |
| Procedure Division | |