With this session parameter, you specify field attributes at field/element or statement level.
Related session parameter: CD
- Color Definition
Possible settings | See AD Parameter Syntax. | You can specify multiple attributes in any sequence. |
---|---|---|
Default setting | See below. | |
Applicable statements | FORMAT |
|
|
Parameter may be specified at statement level and/or at element level. | |
Parameter may be specified at element level, however, only the attributes specified in the relevant statement description can be used. | ||
Applicable command | none |
Note:
The AD
parameter may be also specified in
function calls, however, only the attributes specified in the section Function
Call (Programming Guide) can be used.
The following topics are covered below:
AD=[field-representation] [field-alignment] [field-i/o-characteristics] [interpretation-of-alphanumeric-fields] [mandatory-input] [input-value-length] [field-upper/lower-case] [filler-character] |
You can specify multiple attributes in any sequence. Possible values are:
AD=
|
B |
L |
E |
G |
T |
'c ' |
The meaning of the attributes and the possible values are explained below.
DISPLAY #FIELDA (AD=R) INPUT #FIELDB (AD=M) INPUT (AD=IM) #FIELDA #FIELDB
Value | Meaning | Statements | Explanation |
---|---|---|---|
B |
blinking (*) |
|
The value of the field is displayed blinking. |
C |
cursive/italic (*) | The value of the field is displayed cursive/italic. | |
D |
default intensity | The value of the field is displayed with normal intensity, that is, not highlighted in any way. This is the default value. | |
I |
intensified | The value of the field is displayed intensified. | |
N |
non-display | A value entered in the field will not be displayed. | |
U |
underlined | The value of the field is displayed underlined. | |
V |
reverse video (*) | The value of the field is displayed reverse video. | |
Y |
dynamic attributes | Attributes are to be controlled via an attribute control variable (Format C). |
* The field representation attributes marked with an asterisk (*) require corresponding hardware features, and will be ignored at runtime if these features are not available.
Value | Meaning | Statements | Explanation |
---|---|---|---|
L |
left-justified | The value of the field is displayed left-justified. This is the default value for alphanumeric fields. | |
R |
right-justified | The value of the field is displayed right-justified. This is the default value for numeric fields. | |
Z |
leading zeros | Numeric values are displayed with leading zeros, right-justified. |
Value | Meaning | Statements | Explanation |
---|---|---|---|
A |
input field, non-protected | The value of the field is to be entered in response to the INPUT statement. This is the
default value.
|
|
input only |
If you mark a parameter with For a field defined with For If for |
||
M |
output field, modifiable | The value of the field is to be displayed during INPUT statement execution, and a
different value may be entered by the user. The field is an output field and may
be modified.
|
|
modifiable |
By default, the passed value of a parameter can be changed in the called object (subprogram, stored procedure, subroutine, dialog, method) and the changed value passed back to the calling object, where it overwrites the original value. For a field defined with If, for |
||
O |
output field, write-protected | The value of the field is to be displayed during INPUT execution. The field is an
output field and may not be modified.
|
|
non-modifiable |
If you mark a parameter with Internally, If for If for |
||
P |
temporarily protected | Used in conjunction with an attribute control variable (Format C), the
DY parameter (dynamic
attributes), and the REINPUT statement.
|
Note:
The Field Input/Output Characteristics A
, M
and
O
of the AD
parameter may be also specified in
function
calls.
Value | Meaning | Statements | Explanation |
---|---|---|---|
Q |
display alphanumeric field as if it were a numeric field |
|
This attribute is available on mainframe computers only. A corresponding
hardware feature is required.
An alphanumeric field is interpreted as if it
were a numeric field. If the field is displayed under the scope of profile or
session parameter |
Value | Meaning | Statements | Explanation |
---|---|---|---|
E |
value mandatory | A value must be entered in the field in response to an INPUT statement; otherwise an
error message will be issued. This is only relevant for input-only fields
(AD=A ).
|
|
F |
value optional | A value can, but need not, be entered in the field in response to an
INPUT statement. This is
the default value.
|
Value | Meaning | Statements | Explanation |
---|---|---|---|
G |
value size | The value entered in the field in response to an INPUT statement must be of the
same length as the field. This is only relevant for input-only fields
(AD=A ).
|
|
H |
value size | The value entered in the field in response to an INPUT statement may be shorter
than the field. This is the default value.
|
Value | Meaning | Statements | Explanation |
---|---|---|---|
T |
translate lower to upper case | The value entered is to be translated to upper case. | |
W |
accept lower case | Lower case values are to be accepted. AD=W is the default value.
Note: |
Value | Meaning | Statements | Explanation |
---|---|---|---|
'c' |
filler character | The empty field is to be filled with the specified character c (for display
only) if AD=A (input field, non-protected) or AD=M
(output field, modifiable) is specified.
|
Before the value is displayed for a modifiable field (AD=M
), field positions
that are not occupied by the value are filled with the specified filler character as
follows:
Leading or trailing positions (depending on the field alignment) are filled for format I, N and P fields.
Trailing positions are filled for format A fields.
If the user enters a value in response to the INPUT
statement, before the value has been assigned to the
field,
both leading and trailing filler characters are removed for format I, N and P fields,
trailing filler characters are removed for format A fields.
Caution:
Filler characters that may occur as part of the value in either leading or trailing
position should be avoided to prevent undesired results. For example, if the filler
character "0" (zero) is defined for a field of format N5 and the value
00100
is entered as input data, leading and trailing zeroes are removed so
that only the value 1
remains, and will be assigned to the field. For the
same reason, the minus sign "-" should be avoided as a filler character for
numeric fields if negative values are to be entered.