Dynamic modification of extended field attributes

For an application program to modify extended attribute data, the MFLD statement must specify ATTR=nn. Any error causes the DFLD EATTR= specification for that extended attribute byte to be used.

For modification of the extended attributes, two additional bytes per attribute must be reserved. The values that can be specified in these extended attribute modification bytes and the resulting values that are used are:

Specification
Value Used
X'00'
Device default
Valid value
Your specification
Invalid or omitted
From EATTR= on DFLD statement
Duplicate
Last (rightmost) specification

During online execution, if ATTR=PROT is specified as a dynamic modification, any field validation attributes defined on the DFLD statement or specified as a dynamic modification are reset.

Restriction: Trigger fields are not supported by MFS.

The following table shows the format of the extended attribute modification bytes.

Table 1. Format of extended attribute modification bytes
ATTR 1 type ATTR 1 value ATTR 2 type ATTR 2 value ATTR n type ATTR n value
  1 2 3 2xn_2 2xn_1

Types

Hexadecimal specifications:

01
Validation replacement
02
Validation addition
03
Field outlining replacement
04
Field outlining addition
05
Input control replacement
06
Input control addition

Field outlining applies to 3270 display devices, and to printers defined as 3270P or SCS1 that support the 3270 Structured Field and Attribute Processing option, and support the Extended Graphics Character Set (EGCS).

Character specifications (the letter C indicates character):

C1
Highlighting
C2
Color
C3
Programmed Symbols

Values

Field validation in hexadecimal:

Bit
Meaning
0 to 4
Reserved
5
Mandatory fill
6
Mandatory field
7
Reserved

For field highlighting:

Character
Meaning
X'00'
Device default
X'F1'
Blink
X'F2'
Reverse video
X'F4'
Underline

Field color (seven-color models only):

Character
Meaning
X'00'
Device default
X'F1'
Blue
X'F2'
Red
X'F3'
Pink
X'F4'
Green
X'F5'
Turquoise
X'F6'
Yellow
X'F7'
Neutral

Field outlining in hexadecimal:

Bit
Meaning
0 to 3
Reserved
4
Left line
5
Over line
6
Right line
7
Under line
X'00'
Default (no outline)

Input control (of DBCS/EBCDIC mixed fields) in hexadecimal:

Bit
Meaning
0 to 6
Reserved
7
SO/SI creation
X'00'
Default (no SO/SI creation)

For the programmed symbols, valid local ID values are in the range X'40'—X'FE', or X'00' for the device default.

Ways to specify the binary validation attribute type and value in COBOL are shown in the following code example.

VAL_REP_MFILL  PIC 9(3)  COMP VALUE 260   (replace-mandatory fill)
*
VAL_REP_MFLD   PIC 9(3)  COMP VALUE 258   (replace-mandatory field)
*
VAL_ADD_MFILL  PIC 9(3)  COMP VALUE 516   (add-mandatory fill)
*
VAL_ADD_MFLD   PIC 9(3)  COMP VALUE 514   (add-mandatory field)
*

Ways to specify field outlining attributes, input control types, and values in COBOL are shown in the following code example.

       01  BINVALUE.
           02  VAL0000                 PIC S999 COMP   VALUE   +0.
           02  VAL0000X    REDEFINES   VAL0000.
               03  FILLER              PIC X.
               03  VAL00               PIC X.
      *                                      (NO FIELD OUTLINE)
           02  VAL0001                 PIC S999 COMP   VALUE   +1.
           02  VAL0001X    REDEFINES   VAL0001.
               03  FILLER              PIC X.
               03  VAL01               PIC X.
      *                                      (UNDERLINE)
           02  VAL0002                 PIC S999 COMP   VALUE   +2.
           02  VAL0002X    REDEFINES   VAL0002.
               03  FILLER              PIC X.
               03  VAL02               PIC X.
      *                                      (RIGHTLINE)
           02  VAL0003                 PIC S999 COMP   VALUE   +3.
           02  VAL0003X    REDEFINES   VAL0003.
               03  FILLER              PIC X.
               03  VAL03               PIC X.
      *                                      (RIGHTLINE & UNDERLINE)
           02  VAL0004                 PIC S999 COMP   VALUE   +4.
           02  VAL0004X    REDEFINES   VAL0004.
               03  FILLER              PIC X.
               03  VAL04               PIC X.
      *                                      (OVERLINE)
           02  VAL0005                 PIC S999 COMP   VALUE   +5.
           02  VAL0005X    REDEFINES   VAL0005.
               03  FILLER              PIC X.
               03  VAL05               PIC X.
      *                                      (OVERLINE & UNDERLINE)
           02  VAL0006                 PIC S999 COMP   VALUE   +6.
           02  VAL0006X    REDEFINES   VAL0006.
               03  FILLER              PIC X.
               03  VAL06               PIC X.
      *                                      (OVERLINE & RIGHTLINE)
           02  VAL0007                 PIC S999 COMP   VALUE   +7.
           02  VAL0007X    REDEFINES   VAL0007.
               03  FILLER              PIC X.
               03  VAL07               PIC X.
      *                                      (OVERLINE & RIGHTLINE
      *                                       & UNDERLINE)
           02  VAL0008                 PIC S999 COMP   VALUE   +8.
           02  VAL0008X    REDEFINES   VAL0008.
               03  FILLER              PIC X.
               03  VAL08               PIC X.
      *                                      (LEFTLINE)
           02  VAL0009                 PIC S999 COMP   VALUE   +9.
           02  VAL0009X    REDEFINES   VAL0009.
               03  FILLER              PIC X.
               03  VAL09               PIC X.
      *                                      (LEFTLINE & UNDERLINE)
           02  VAL000A                 PIC S999 COMP   VALUE  +10.
           02  VAL000AX    REDEFINES   VAL000A.
               03  FILLER              PIC X.
               03  VAL0A               PIC X.
      *                                      (LEFTLINE & RIGHTLINE)
           02  VAL000B                 PIC S999 COMP   VALUE  +11.
           02  VAL000BX    REDEFINES   VAL000B.
               03  FILLER              PIC X.
               03  VAL0B               PIC X.
      *                                      (LEFTLINE & RIGHTLINE
      *                                       & UNDERLINE)
           02  VAL000C                 PIC S999 COMP   VALUE  +12.
           02  VAL000CX    REDEFINES   VAL000C.
               03  FILLER              PIC X.
               03  VAL0C               PIC X.
      *                                      (LEFTLINE & OVERLINE)
           02  VAL000D                 PIC S999 COMP   VALUE  +13.
           02  VAL000DX    REDEFINES   VAL000D.
               03  FILLER              PIC X.
               03  VAL0D               PIC X.
      *                                      (LEFTLINE & OVERLINE
      *                                       & UNDERLINE)
           02  VAL000E                 PIC S999 COMP   VALUE  +14.
           02  VAL000EX    REDEFINES   VAL000E.
               03  FILLER              PIC X.
               03  VAL0E               PIC X.
      *                                      (LEFTLINE & OVERLINE
      *                                       & RIGHTLINE)
           02  VAL000F                 PIC S999 COMP   VALUE  +15.
           02  VAL000FX    REDEFINES   VAL000F.
               03  FILLER              PIC X.
               03  VAL0F               PIC X.
      *                                      (BOX)
Examples

The following examples show the use of the EATTR= and ATTR=(,nn) operands:

AX     DFLD  EATTR=(VMFILL,HUL),ATTR=(NUM,HI)
AY     MFLD  AX,ATTR=(,2)

The EATTR= operand of the DFLD statement requests that the specified field must be completely filled with data, high intensity, and underlined. The ATTR= operand of the DFLD statement requests that the specified field be numeric and high intensity.

Specifying the ATTR=(,2) operand indicates the application program can dynamically modify the two extended attributes specified in the EATTR= operand. If this is specified, the LTH= value on the MFLD statement must be increased by 4 bytes for the modified attribute bytes. The application program can dynamically modify the validation and the extended highlighting attributes. The extended attributes of color and programmed symbols cannot be dynamically modified, because they were not specified in the EATTR= operand. The existing 3270 attributes cannot be dynamically modified, because ATTR=YES was not specified on the MFLD statement.

To dynamically modify the extended highlighting to blinking, and add mandatory field validation when data is entered into the field, the extended attribute types and values shown in the following table must be placed in the field referenced by the MFLD AY in the preceding example.

Table 2. Extended attribute types and values for COBOL
ATTR 1 type ATTR 1 value ATTR 2 type ATTR 2 value Field data
C1 F1 02 02 data
0 1 2 3 4–n

Specification of color and programmed symbols, if present, is ignored. Regardless of the number of attribute modification bytes specified, MFS sends the number of extended attributes specified in the EATTR=operand of the DFLD.

Because the validation addition type (X'02') is specified, rather than the validation replacement type (X'01'), the change to the validation attribute byte is an addition rather than a replacement.

BX    DFLD    EATTR=(CD,HD,PC'Z'),ATTR=(PROT)
BY    MFLD    BX,ATTR=(YES,3)

The EATTR= operand of the DFLD statement requests a field with a programmed symbol buffer local ID of Z and the protected attribute. If no dynamic modification by an IMS application program occurs, the color and highlighting device defaults are used. Because of the specification of ATTR=(YES,3) in this example, the color, extended highlighting, programmed symbol buffer local ID, and existing 3270 attributes can be dynamically modified.

You can dynamically modify the color, extended highlighting, and the 3270 attribute bytes, while keeping the programmed symbol local ID (PC'Z') as specified on the DFLD statement. For example, to dynamically modify the color to pink, the extended highlighting to reverse video, and the 3270 attribute bytes to numeric and unprotected, use the attribute modification bytes for fields referenced by MFLD BY as shown in the following table.

Table 3. Example of dynamically modified attribute bytes
Existing 3270 ATTR mods ATTR 1 type ATTR 1 value ATTR 2 type ATTR 2 value ATTR 3 type ATTR 3 value Field data
00 D0 C2 F3 C1 F2 40 40 data
0 1 2 3 4 5 6 7 8–n

With byte 1, bit 1 of the existing 3270 attribute modification bytes on, IMS replaces the existing 3270 attribute byte rather than adding to it. This changes the field to unprotected and specifies the numeric attribute. The third attribute has a type of X'40' (an invalid type) specified, which causes IMS to use the DFLD specification for programmed symbols.