Operation [ COBOL/HP-UX Operating Guide for the Series 700 and 800 ] MPE/iX 5.0 Documentation
COBOL/HP-UX Operating Guide for the Series 700 and 800
Operation
This section describes how Enhanced ACCEPT and DISPLAY statements are
handled at run time when used with:
* Elementary data items
* Group items
* Screen Section items
The term field used in relation to screen handling refers to an area on
the screen that corresponds to a single data-item during accept and
display operations.
Single Field ACCEPT and DISPLAY Statements
This section describes how ACCEPT and DISPLAY statements in the following
format are handled at run-time:
display data-item at xxyy ...
accept data-item at xxyy ...
where:
data-item is an elementary item defined in the Data Division
of your program
xxyy specifies the position on the screen (xx=line,
yy=column) where the DISPLAY or ACCEPT field
starts. The length of the field is governed by the
length and type of data-item, and the SIZE clause.
ADIS will not display a character at the last position on the screen (for
example, line 25 column 80 on a 25 line screen). This is because some
terminals scroll automatically when a character appears in this position,
giving different results on different hardware. If a character is
displayed at a position off the screen, ADIS scrolls the display such
that it is visible.
DISPLAY Statements.
The following sections describe the way that the DISPLAY statement
functions.
Format of Displayed Data
When a data item is displayed on the screen, it occupies the same number
of characters on the screen as it does bytes in memory.
Examples
Data Item Size on Screen Comment
Description
X(5) 5 characters
N(5) 10 characters Each PIC N character
occupies 2 bytes in memory
(used with DBCS directive)
9(5) 5 characters
99.99 5 characters
Z(4)9 5 characters
99V99 4 characters V is an implied decimal point
and so is not displayed on
the screen
S9(4) 4 characters The sign is implied and so is
not displayed on the screen
S9(4) SIGN 5 characters
LEADING
SEPARATE
9(4) COMP 2 characters COMP fields are stored in
binary; a 9(4) COMP field
occupies 2 bytes in memory
As can be seen from the above examples, it is only really sensible to
display fields defined as USAGE DISPLAY
which do not contain implied signs or decimal points. When the field is
displayed, it is copied byte-for-byte from the data item onto the screen
at the required position.
Note: ANSI DISPLAY operations do convert non-USAGE DISPLAY numeric
items to USAGE DISPLAY before displaying.
Control Sequences in Displayed Data
Control sequences cannot normally be embedded in the data that is
displayed. All highlighting, cursor control, etc, should be done through
the syntax provided. If you do embed control codes (that is, ASCII codes
less than decimal 32, x"20") into the data, the result on the screen is
undefined.
The COBCTRLCHAR
environment variable is provided for backwards compatibility. When set
to Y or y, control codes are passed transparently to the terminal. This
has the following consequences:
* The display is terminal-dependent
* If, for example, a code is sent which moves the cursor, the screen
handling routines have an incorrect record of the screen status,
and a corrupted display is likely
* Extra facilities, such as Generic Line Drawing, wide terminal
support and direct printing to an attached printer, are not
available
* Programs with escape sequences cannot be animated
* Automatic new line handling is not supported and all output goes
directly to the terminal, so making it your responsibility either
to use explicit cursor
addressing, or ensure that the correct control codes are output
for that particular terminal in your particualr configuration.
To avoid this, leave COBCTRLCHAR unset, or set it to N or n.
Displaying Highlighted Text
If you use the
CRT-UNDER phrase in a DISPLAY statement, the data item is displayed
highlighted. Depending on your CRT, use of the CRT-UNDER phrase may
cause data items to be displayed underlined or in reverse-video. This
can be changed using ADISCF. See Chapter 21 , ADIS Configuration
Utility.
ACCEPT Statements.
The following sections describe how the ACCEPT statement is executed on
different types of fields.
Alphanumeric Fields
The term
Alphanumeric Field is used here to cover all alphanumeric, alphabetic and
alphanumeric-edited fields. For the purposes of an ACCEPT, an
alphanumeric-edited field is treated as an alphanumeric field of the same
length. Any insertion symbols such as "/" or "0" are ignored and treated
as an X. Therefore, a field defined as PIC XX0XX0XX is treated as if it
was specified as PIC X(8).
If the field is defined as alphabetic, only the characters "A" to "Z",
"a" to "z" and space are allowed into the field.
The cursor is initially placed at the start of the field.
As data is entered into the field, the cursor is advanced to the next
character. The cursor can be moved back over the data in the field using
the cursor keys, and editing functions such as backspace and delete are
provided.
Numeric and Numeric-edited Fields
The form of data entry Numeric and Numeric-edited fields can be one of
the following:
* Fixed format or formatted
* Free-format
* RM style
Use ADISCF to select the style you want. The default form of data entry
is fixed format. You should experiment with free-format to see which
method you prefer, especially when accepting into simple numeric fields.
The three styles are described below. If you have compiled your program
with the MS(2) compiler directive, you should also read the section on
Microsoft COBOL V2.2 compatibility later in this chapter.
Fixed Format Data Entry
Fixed format data entry is also known as formatted mode.
It can best be described as "What you see is what you get". As each key
is pressed, the field is automatically reformatted to conform to the
picture string.
Therefore, ADIS tries to ensure that the field always looks on the screen
as it is stored in the Data Division, and its size is the same as the
size of the data item.
Therefore, as with the DISPLAY statement, it is only really sensible to
accept fields that are defined as USAGE DISPLAY
with no implied sign or decimal point.
In COBOL simple numeric fields are stored as integers, that is, a PIC
9(5) field is stored in exactly the same way as a PIC 9(3)v99 field. It
is therefore always advisable to move computational data fields
to USAGE DISPLAY fields
before an I/O operation. For example, to display a computational field
of PIC s9(3)v99 SIGN IS TRAILING SEPARATE correctly, you should move the
data to a PIC 9(3).99- USAGE DISPLAY field.
During data entry, characters other than numeric digits, plus signs (+),
minus signs (-) and the decimal point character are rejected. Insertion
characters in edited fields
are automatically skipped over as the cursor is moved backwards and
forwards. Any sign indicator is automatically modified if a "+" or "-"
is pressed, regardless of where the cursor is in the field.
Zeros are allowed as insertion characters
only as a leading symbol before a decimal point, or as a trailing symbol
following a decimal point. For example, PIC 0.9999 and PIC 999.90 are
valid, but PIC 0.0009 and PIC 999,000 are not.
Data entry of simple numerics and numeric-edited fields with no zero
suppression
is similar to that for alphanumeric fields, except that insert mode is
not supported in numeric and numeric-edited fields. If the decimal point
character is pressed in a simple numeric field, the digits are right
justified. For example, a field defined as PIC 9(5) which initially
contains zeros is accepted as follows (underlined characters indicate
cursor position):
Initial display 00000
Pressing 1 will give 10000
Pressing 2 will give 12000
Pressing 4 will give 12400
Pressing backspace will 12000
give
Pressing "." will give 00012
Data entry into zero-suppressed fields is handled differently. The
cursor is initially placed on the first character position that is not
zero-suppressed. If all the digits before the decimal point are
suppressed, the cursor is positioned on the decimal point itself.
While the cursor is to the left of the decimal point (that is, in the
integer part of the field), the cursor moves to the right as digits are
entered until the decimal point is reached. Any further digits are
inserted immediately before the decimal point until all the integer
places are filled. The cursor is then automatically moved to the first
decimal digit and advances as the decimal digits are entered.
If you wish to enter digits after the decimal point when there are
integer places still unfilled, the decimal point (.) must be entered.
For example, assume that a numeric-edited data field is defined as PIC
ZZZ99.99 and initially contains zeros, the field will be displayed as
follows during the ACCEPT:
Initial display 00.00
Pressing 1 gives 10.00
Pressing 2 gives 12.00
Pressing 3 gives 123.00
Pressing 4 gives 1234.00
Pressing backspace gives 123.00
Pressing 5 gives 1235.00
Pressing 6 gives 12356.00
Pressing 7 gives 12356.70
Pressing 8 gives 12356.78
If you want to enter 123.45 into the same field, the field appears as
follows:
Initial display 00.00
Pressing 1 gives 10.00
Pressing 2 gives 12.00
Pressing 3 gives 123.00
Pressing "." gives 123.00
Pressing 4 gives 123.40
Pressing 5 gives 123.45
Fixed
format mode is only allowed on numeric-edited data items of length up to
32 characters. If they are longer than 32 characters, they are
automatically handled in free-format mode
as described below.
Fields are also automatically treated as free-format if a SIZE clause
is specified in the
ACCEPT statement.
Free-format Data Entry
Free-format mode can be selected for either numeric fields or
numeric-edited fields or both. This can be done using ADISCF (See
Altering Accept/Display Options in Chapter 21 , ADIS Configuration
Utility).
During data entry into a free-format field, the field is treated as an
alphanumeric field of the appropriate length. It is only when the user
leaves the field that it is reformatted to comply with the picture
string. Any characters other than the digits, the sign character and the
decimal point character are discarded.
Fields occupy the same number of characters on the screen as they do
bytes in memory, with the exception that an additional character is
allocated for implied signs and decimal points. Therefore, a data item
defined as PIC S99V99 occupies six characters on the screen in
free-format mode as opposed to four characters in fixed-format mode.
It is advisable to compile the program with the DE-EDIT"1" compiler
directive, since free format allows data that does not conform to the
screen item's PICTURE clause; with DE-EDIT"2" this is interpreted as
zeros when moved to the USING or TO data item (see Appendix G ,
Directives for Compiler/Generator for details of the DE-EDIT directive
).
Data entry is the same as for alphanumeric fields.
If an enhanced ACCEPT statement is being used, the clauses SPACE-FILL,
ZERO-FILL, LEFT-JUSTIFY, RIGHT-JUSTIFY and TRAILING-SIGN are applicable
only to free-format non-edited fields (and are ignored with fixed-format
fields). See the description of the ACCEPT statement in your Language
Reference for further details of these clauses.
RM Style Data Entry
RM style data entry is selected using the appropriate Accept/Display
option in ADISCF. It is provided for emulation of numeric and
numeric-edited ACCEPT operations in
RM/COBOL V2.0. If this mode is selected, all other Accept/Display option
numeric and numeric-edited data entry are ignored. Data entry is the
same as for alphanumeric fields. All ACCEPT and DISPLAY statements
behave as if the phrase MODE IS BLOCK has been specified. (See the
section "The MODE IS BLOCK Clause" later in this chapter.)
This style of numeric input is not intended for use with the screen
handling syntax in this COBOL system, only with programs originally
written for RM/COBOL.
General Notes
These notes concern the accepting of data into fields:
* If a field is too long to fit on one line on the screen, it is
split into separate subfields at run time.
Each subfield fits entirely onto one line. The cursor
automatically auto-skips into the next subfield at the end of one
subfield, regardless of the setting of any auto-skip
controls.
For example, if you accept a data item that is PIC X(190) at line
1, column 1 and the screen is only 80 characters wide, the field
is broken into three subfields, two with 80 characters and one
with 30 characters.
* If a field extends beyond the end of the screen, the action taken
depends on the type of field:
* Alphanumeric fields are truncated to a size that fits on
the screen.
* Numeric and numeric-edited fields are treated as if they
were defined as FILLER (that is, not a field) and are
ignored.
* As most terminals scroll upwards as a result of a character
appearing in the final character position of the screen (bottom
right) it is not possible to use this character position as part
of an
ACCEPT.
Microsoft COBOL V2.2 Emulation
The style of data entry into numeric and numeric-edited fields in
Microsoft's COBOL Version 2.2 is quite different from the style used in
this product. The main difference is that decimal points and implied
signs are treated as if they were specified as "." and "-". Therefore, a
PIC S99V99 field is treated as if it was specified as a -99.99 field
during execution of an ACCEPT or DISPLAY statement under Microsoft COBOL
V2.2. All ACCEPT and DISPLAY statements behave as if the phrase
MODE IS BLOCK has been specified.
To support this action in this product, if the MS(2) directive
is specified when your program is compiled, the compiler creates
additional temporary data items for the ACCEPT and DISPLAY. For a field
defined as PIC S99V99, the compiler creates an additional numeric-edited
field of picture -99.99 and makes the necessary moves into and out of the
edited field before and after a DISPLAY or ACCEPT. This action is
transparent to you, but you should be aware of the differences in
ACCEPT/DISPLAY behavior if MS(2) is specified.
The other major difference between the behavior of this COBOL system and
Microsoft COBOL V2.2 during execution of a numeric ACCEPT is that
Microsoft COBOL V2.2 accepts data from right-to-left and this COBOL
accepts data from left-to-right. This feature of Microsoft COBOL V2.2 is
not supported in this product.
Displaying or Accepting Group Items
When displaying or accepting group items, each elementary item within the
group is treated as a separate field. If an elementary item is defined
as FILLER, it is simply used as a positioning item of the appropriate
size (that is, you cannot accept into FILLER items or display FILLER
items).
Displaying Group Items.
Consider the following group item:
01 display-item.
03 display-item-1 pic x(20).
03 filler pic x(35).
03 display-item-2 pic 9(10).
03 filler pic x(105).
03 display-item-3 pic z(4)9.
If the following statement is executed on a screen 80 characters wide:
display display-item at 0101
display-item-1 is displayed at row 1, column 1, display-item-2 is
displayed at row 1, column 56, and display-item-3 is displayed at row 3,
column 11
All other areas of the screen are unaffected by the DISPLAY. FILLER items
do not cause any data to be displayed on the screen. Consequently, data
already on the screen in the positions defined by each FILLER is not
altered in any way by the DISPLAY.
If a data item is defined as follows :
01 data-item.
03 data-char pic x occurs 2000.
and the following statement is executed:
display data-item at 0101
then this is treated as a display of 2000 fields, each defined as PIC X,
which is unlikely to be what you require. To avoid this, either redefine
data-item as a PIC X(2000) and display that or use the MODE IS BLOCK
clause described below.
Accepting into Group Items.
When accepting into a group item, each field is accepted into as
described for single-field ACCEPT statements earlier in this chapter.
Unless you explicitly position the cursor (see "The CURSOR IS Clause"
at the end of this chapter), the cursor is initially placed at the start
of the first field.
When the end of a field is reached, the cursor is normally advanced to
the beginning of the next field automatically. This action can be
prevented by turning off auto-skip (Accept/Display option 7 in ADISCF,
see Chapter 21 , ADIS Configuration Utility). The keys set up for
next and previous field operations (usually tab and back-tab) moves the
cursor between the individual fields. In addition, the cursor keys move
the cursor around the fields.
The MODE IS BLOCK Clause.
If the MODE IS BLOCK clause is added to an ACCEPT or DISPLAY of a group
item, the group item is treated as if it was an elementary item of the
total size of the group item.
For example, if the following statement is executed:
display display-item at 0101 mode is block.
where display-item is as defined in the section "Displaying Group Items"
, display-item is treated as if it was an elementary item defined as:
01 display-item pic x(175).
Consequently, the contents of the FILLER items are also displayed.
Note: If a program is compiled with the IBM-MS, MS(1), MS(2) or RM
directives, the compiler treats all DISPLAY and ACCEPT
operations of group-items as if MODE IS BLOCK had been
specified.
Screen Section ACCEPT and DISPLAY Statements
ACCEPT and DISPLAY operations involving Screen Section items are treated
like any other ACCEPT or DISPLAY operation, but with one important
difference. Consider the following code:
working-storage section.
01 item-a pic 9(5).
01 item-b pic 9(10).
01 item-c pic x(10).
screen section.
01 demo-screen.
03 blank screen.
03 line 1 column 1 pic z(4)9 from item-a.
03 line 3 column 1 pic 9(10) to item-b.
03 line 5 column 1 pic x(10) using item-c.
When this code is compiled, the compiler sets up a work area for each
Screen Section 01 level item (record). Therefore, in this example, a
work area is set up for demo-screen large enough to hold the data for the
three fields.
When the statement
display demo-screen
is executed, the contents of item-a and item-c are moved from
Working-Storage into the work area, and then the data in the work area
for these two fields is displayed on the screen.
When the statement
accept demo-screen
is executed, data is accepted into the work area for item-b and item-c
and then the data for these two fields is moved from the work area into
the Working-Storage.
It is important to note that moves from the Data Division to the work
area
occur only on execution of a DISPLAY statement, and moves from the work
area to the Data Division
occur only during execution of an ACCEPT statement. Therefore, if two
ACCEPT statements are executed one after another with no intervening
DISPLAY statement, the initial contents of the fields at the start of the
second accept are those which were put into the work area during the
previous accept, not the current contents of the Data Division items.
Another implication of this is that a field should not be defined as
numeric-edited in both the Data Division section and the Screen Section.
This results in numeric-edited to numeric-edited moves being produced by
the compiler to move the Data Division item into the work area and back
again. The action of such moves is undefined and has unpredictable
results. This is the case even if both the Data Division item and the
Screen Section item have the same picture.
Hence, if the following lines are coded in your program:
working-storage section.
01 ws-item pic zz9.99 value 1.23
screen section.
01 demo-screen.
03 pic zz9.99 using ws-item.
procedure division.
display demo-screen.
the result of the DISPLAY is undefined.
The items used in the Data Division as source or target for
Screen Section ACCEPT or
DISPLAY statements should always be non-edited fields.
The CURSOR IS Clause
This feature allows you to specify precisely where in a field you want
the cursor to be positioned at the start of the ACCEPT operation, and
returns where the cursor was left at the end of an ACCEPT operation. If
you do not specify a CURSOR IS clause in your program, the cursor is
always initially positioned at the start of the first field for every
ACCEPT operation.
The CURSOR IS clause is defined in the SPECIAL-NAMES paragraph,
as follows :
special-names.
cursor is cursor-position.
where cursor-position is a field defined in your Working-Storage section
as follows :
01 cursor-position.
03 cursor-row pic 99.
03 cursor-column pic 99.
where:
cursor-row Specifies the row the cursor is positioned on.
Valid values are between 1 and the number of lines
on the screen.
cursor-column Specifies the column the cursor is positioned on.
Valid values are between 1 and the number of columns
on the screen.
Whenever an ACCEPT statement is executed, ADIS attempts to initially
position the cursor at the position specified in cursor- position. If
the position specified is invalid (that is, either cursor-row or
cursor-column does not contain a valid value), the cursor is positioned
at the start of the first field on the screen.
If the value in cursor-position is valid, ADIS searches through all of
the fields to see if the requested cursor position lies within one of
them. If it does, the cursor is positioned at the required point. If it
does not, then the cursor is positioned at the start of the first field.
Therefore, if you want the cursor to be positioned at the start of the
first field, set both cursor-row and cursor-column to 1.
Where the defined position is on a suppressed character or insertion
symbol in a numeric edited field, the cursor moves to the first available
character to the right. If there is no further data item, the cursor
returns to the first data item on the screen.
When the ACCEPT is terminated, if the value in cursor- position at the
start of the ACCEPT was valid, the position of the cursor when the
terminating key is pressed is returned in cursor- position. Note,
however, that this may not be the same position as the current cursor
position, since ADIS usually moves the cursor to the end of the field
upon termination of an ACCEPT operation to allow relative positioned
ACCEPT statements to start at the correct point on the screen.
If the value in cursor-position at the start of the ACCEPT was invalid,
then, when the ACCEPT is terminated, the contents of cursor-position are
unchanged.
One example of the use of this facility is that in menu-type operations,
the operator need only move the cursor to a position on the screen
corresponding to the selection required.
The operator's choice can be determined by the returned value of
cursor-position.
Large Screens
Screens larger than 25 lines can be defined in your terminfo entry (see
Chapter 22 , Device Handling and Terminfo) and are detected by your
COBOL system.
Programs using ANSI ACCEPT/DISPLAY
statements, enhanced ACCEPT/DISPLAY syntax, Screen Section and the COBOL
system library routines should run correctly on large screens. If an
application is developed for a screen larger than the screen it is run
on, then the extra lines are lost, or, in single field ACCEPT/DISPLAY
statements, the screen is scrolled up by one line.
ADIS Configuration
One of the powerful features of ADIS is that it can be
configured to tailor the behavior of ACCEPT and DISPLAY statements. Full
configuration is possible using the ADISCF and KEYBCF utilities (supplied
with this product) via the ADISCTRL and cobkeymp files produced by these
utilities, respectively. These utilities are described in Chapter 21
, ADIS Configuration Utility and Chapter 24 , Keyboard
Configuration Utility in this manual.
ADIS is designed to operate with no ADISCTRL
or cobkeymp
files present, using predefined defaults for all the configurable
options. Applications that operate successfully using these default
options can be shipped without either the ADISCTRL or cobkeymp files.
At run time ADIS will search for the ADISCTRL and cobkeymp files in the
current directory and then, if not found, in the COBOL system directory.
Unless your applications all use the same non-default configuration you
are advised to work without the ADISCTRL and cobkeymp files, if possible,
and to create them in the current directory only if they are needed.
Altering the ADIS Configuration from a Program.
The ADISCTRL file contains a number of predefined ADIS configurations.
Your program can use a library routine
to select which configuration to use during the execution of extended
ACCEPT and DISPLAY statements. It will override the configuration
selected in ADISCF.
The routine is defined as:
call x"AF" using set-configuration
configuration-name
where the parameters are defined as follows:
01 set-configuration pic 9(2) comp-x value 59.
01 configuration-name pic x(70).
configuration-name is the name that appears on the F6=Choose menu in
ADISCF. Note that this has to be exactly as specified in the ADISCTRL
file, including the case of all characters in the name. If the name
supplied is not found in the ADISCTRL file, the set-configuration
parameter will contain the value 255 on return from the call.
ADIS Run Time Configuration.
This section describes features of ADIS that are not available via COBOL
syntax, but can be accessed with the x"AF" COBOL system /library routine.
Most of these features can also be set by configuring ADIS using ADISCF.
See Chapter 21 , ADIS Configuration Utility for more details.
All of these features are accessed by the following call statement:
call x"AF" using set-bit-pairs parameter-block
where the parameters are defined as follows:
01 set-bit-pairs pic 9(2) comp-x value 1.
01 parameter-block.
03 bit-pair-setting pic 9(2) comp-x.
03 bit-map-section pic x value "2".
03 bit-pair-number pic 9(2) comp-x.
03 filler pic 9(2) comp-x value 1.
The values to be set for the fields bit-pair-setting and bit-pair-number
are given in each of the descriptions below.
With all x"AF" calls, if an error occurs, the first parameter is set to
the value 255.
The functions available using this facility are as follows:
* Enable/disable pre-display
* Enable/disable display of the ADIS indicators
* Enable/disable display of ADIS error messages
* Enable/disable auto-skip between fields
* Enable/disable input data case conversion
* Enable/disable password concealment
Enable/Disable Pre-display
This routine allows you to control whether or not the initial contents of
fields are
pre-displayed before any data entry is allowed when an ACCEPT statement
is executed. This is also controlled by Accept/Display option 5 in
ADISCF. This call will override any value set in ADISCF.
Note: The pre-display of fields defined as fixed format numeric or
numeric-edited cannot be turned off.
The fields in parameter-block should be set as follows:
bit-pair-number must be set to 76.
bit-pair-setting should be set to one of the following values:
0 Only fixed-format numeric and fixed-format numeric-edited fields
are pre-displayed.
1 Only numeric fields and fixed-format numeric-edited fields are
pre-displayed.
2 A field is pre-displayed as soon as the cursor is moved into it.
3 All of the fields in the ACCEPT are pre-displayed before any data
entry is allowed. The default.
Example
The following code will turn off pre-display of fields for all following
ACCEPT operations:
move 76 TO bit-pair-number
move 0 TO bit-pair-setting
call x"AF" using set-bit-pairs parameter-block
Enable/Disable Display of the ADIS Indicators
These routines allow you to enable or disable the display of the
indicators that
ADIS displays during an ACCEPT to indicate insert/replace mode,
autoclear mode or "off end of field". These can also be controlled by
use of the Positions screen (F7) in ADISCF. These calls will override any
settings made in ADISCF. By default, these indicators are displayed.
There are different calls to control each of these indicators, but they
all have the same format.
The fields in parameter-block should be set as follows:
bit-pair-number should be set to one of the following:
56
To control the
Insert/Replace mode indicator
57
To control the "Off
end of field" indicator
58 To control
the "Autoclear" indicator
bit-pair-setting should be set to one of the following:
0 The indicator is displayed if necessary. The default.
3 The indicator is never displayed
Example
The following code will disable display of the insert/replace indicator
and enable display of the "Off end of field" indicator.
move 56 to bit-pair-number
move 3 to bit-pair-setting
call x"AF" using set-bit-pairs parameter-block
move 57 to bit-pair-number
move 0 to bit-pair-setting
call x"AF" using set-bit-pairs parameter-block
Enable/Disable Display of ADIS Error Messages
This routine allows you to enable or disable the display of the messages
that ADIS may output during execution of an ACCEPT statement. These can
also be controlled by use of the Positions screen (F7) in ADISCF. This
call will override any settings made in ADISCF. By default, these
messages are displayed.
The fields in parameter-block should be set as follows:
bit-pair-number must be set to 44.
bit-pair-setting should be set to one of the following values:
0 Error
messages are never displayed, but the bell is rung. Invalid data
entered into a numeric or numeric-edited field in free-format mode
is not reported as an error.
1 Error messages are never displayed, but the bell is rung. Invalid
data entered into a numeric or numeric-edited field in free format
mode is reported as an error by ringing the bell.
2 Error messages are displayed and the bell is rung if the
appropriate error occurs. Invalid data entered into a numeric or
numeric-edited field in free-format mode is not reported as an
error.
3 Error messages are displayed and the bell is rung if the
appropriate error occurs. Invalid data entered into a numeric or
numeric-edited field in free-format mode is reported as an error by
ringing the bell.
Example
The following code will disable the display of error messages and disable
the reporting of invalid data in numeric and numeric-edited fields.
move 44 TO bit-pair-number
move 0 TO bit-pair-setting
call x"AF" using set-bit-pairs parameter-block
Enable/Disable Auto-skip Between Fields
This routine allows you to control circumstances in which auto-skip to a
following or preceding field may occur during execution of an ACCEPT
statement. This can also be controlled by use of Accept/Display option 7
in ADISCF. This call will override any settings made in ADISCF.
The fields in parameter-block should be set as follows:
bit-pair-number must be set to 81.
bit-pair-setting should be set to one of the following values:
1 No auto-skip. An explicit field-tab or cursor key (but not
Backspace) must be used to move between fields.
3 Auto-skip enabled. Any cursor movement or a character key will
cause auto-skip to the next field if at end of the current field.
The default.
Example
The following code will disable auto-skip between fields:
move 81 TO bit-pair-number
move 1 TO bit-pair-setting
call x"AF" using set-bit-pairs parameter-block
Enable/Disable Input Data Case Conversion
This routine allows you to control whether lower-case ASCII characters
are automatically converted to upper-case on entry during execution of an
ACCEPT statement.
The fields in parameter-block should be set as follows:
bit-pair-number must be set to 85.
bit-pair-setting should be set to one of the following values:
0 No case conversion occurs. (The default.)
1 Lower case alphabetic input data is converted to upper case on
entry.
Example
The following code will enable conversion to upper case of all alphabetic
input.
move 85 TO bit-pair-number
move 1 TO bit-pair-setting
call x"AF" using set-bit-pairs parameter-block
Enable/Disable Password Concealment
This routine allows you to control whether characters input when an
ACCEPT statement is executed should be echoed to the screen, or not.
The fields in parameter-block should be set as follows:
bit-pair-number must be set to 84.
bit-pair-setting should be set to one of the following values:
0 Input is echoed to the screen. (The default.)
1 Input is not echoed to the screen for the next ACCEPT statement
encountered only.
2 Input is not echoed to the screen for any following ACCEPT
statements until it is re-enabled.
Example
The following code will conceal the input for the next ACCEPT statement
only:
move 84 TO bit-pair-number
move 1 TO bit-pair-setting
call x"AF" using set-bit-pairs parameter-block
Select Timeout Units.
This routine allows you to determine whether the timeout value is
interpreted as seconds or tenths of a second.
The fields in parameter-block should be set as follows:
bit-pair-number must be set to 14.
bit-pair-setting should be set to one of the following values:
0 Units are seconds
1 Units are tenths of a second
Timeout Reset Control.
This routine allows you to control whether the timer is reset every time
a character is entered, or times out after the specified period anyway.
The fields in parameter-block should be set as follows:
bit-pair-number must be set to 15.
bit-pair-setting should be set to one of the following values:
0 Timer is never reset. Timeout occurs after the specified time from
the start of the accept.
1 The timer is reset each time a character is entered.
Allow Screen Read on Non-FED Terminal.
This function allows the initial field contents to be read from the
current screen map held by the RTS, when predisplay is off during an
accept.
The fields in parameter-block should be set as follows:
bit-map-section must be set to 6.
bit-pair-number must be set to 6.
bit-pair-setting should be set to one of the following values:
Note: bit-map-section is set to 6 for this function, but 2 for all the
other functions listed in this section. Do not forget to
restore it to 2 between using this function and another one.
0 no screen read
1 during an accept, if predisplay is off, the initial field contents
are read from the current screen map held by the RTS.
Control Clause In ACCEPT/DISPLAY Statements.
This system supports the CONTROL clause within the WITH phrase of Format
2 of the screen handling ACCEPT and DISPLAY statements, and within ADIS
ACCEPT and DISPLAY statements. This clause allows attributes associated
with a Screen Section item to be defined at run time. See the chapter
The Nucleus of your Language Reference for details of format and syntax
Data Division Size
To ensure intermediate code portability, the size of the Data Division of
programs which have a Screen Section or which utilize the additional
ACCEPT or DISPLAY formats documented in your Language Reference should be
limited to 64K. Errors will occur at run time if this limit is not
observed. This restriction applies only to intermediate code compiled
with the INTLEVEL=1 compiler directive.
MPE/iX 5.0 Documentation