Previous Topic: MAP OUTIN (DC/UCF)Next Topic: MODIFY RECORD


MODIFY MAP (DC/UCF)

The MODIFY MAP statement requests that the system modify options in the map request block (MRB) for a map; modifications can be designated as permanent or temporary. Requested revisions can be field-specific, map-specific, or both; field-specific revisions apply to the map's variable data fields.

Note: The MODIFY MAP statement parameters used to revise predefined map and/or map data field attributes have no defaults. If a MODIFY MAP parameter is not specified, the applicable option remains set to the value specified at map generation or to the value specified in a previously issued MODIFY MAP PERMANENT statement.

Syntax
►►─── MODIFY MAP (map-name) ──────────────────────────────────────────────────►

 ►─┬───────────────┬─┬─────────────────────────────────────────────────┬──────►
   ├─ PERMANENT ◄ ─┤ └─ CURSOR AT ─┬─ (cursor-row)  (cursor-column) ─┬─┘
   └─ TEMPORARY ───┘               └─ DFLD (field-name) ─────────────┘

 ►─┬───────────────────────────────┬──────────────────────────────────────────►
   │       ┌────────────────────┐  │
   └─ WCC ─▼─┬─┬─ RESETMDT ─┬─┬─┴──┘
             │ └─ NOMDT  ───┘ │
             ├─┬─ RESETKBD ─┬─┤
             │ └─ NOKBD  ───┘ │
             ├─┬─ ALARM ───┬──┤
             │ └─ NOALARM ─┘  │
             ├─┬─ STARTPRT ─┬─┤
             │ └─ NOPRT ────┘ │
             └─┬─ NLCR ─┬─────┘
               ├─ 40CR ─┤
               ├─ 64CR ─┤
               └─ 80CR ─┘
 ►─┬───────────────────────────────────────────────────────────┬──────────────►─
   └─ FOR ─┬─ ALL ─┬─ BUT ─────┬─ CURRENT ───────────────────┬─┘
           │       └─ EXCEPT ──┘                             │
           ├─── ALL ─┬───────────┬─ FIELDS ──────────────────┤
           │         ├─ CORRECT ─┤                           │
           │         └─ ERROR ───┘                           │
           │ ┌─────────────────────────────────────────────┐ │
           ├─▼─┬───────────────────┬─ DFLD (field-name) * ─┴─┤
           │   ├─── ALL ◄ ─────────┤                         │
           │   └─ ALL ─┬─ BUT ────┬┘                         │
           │           └─ EXCEPT ─┘                          │
           └─ DFLD (field-name) * ───────────────────────────┘
─►─┬──────────────┬───────────────────────────────────────────────────────────►─
   ├─ BACKSCAN ───┤
   └─ NOBACKSCAN ─┘

─►─┬───────────────────────────────┬─┬────────────────────────┬───────────────►─
   └─ OUTPUT DATA ─┬─ YES ───────┬─┘ └─ INPUT DATA ─┬─ YES ─┬─┘
                   ├─ NO ────────┤                  └─ NO ──┘
                   ├─ ERASE ─────┤
                   └─ ATTRIBUTE ─┘
─►─┬─────────────────────┬────────────────────────────────────────────────────►─
   ├─ RIGHT ─┬─ JUSTIFY ─┘
   └─ LEFT ──┘

─►─┬───────────────────────┬─┬──────────────────────┬─────────────────────────►─
   ├─ PAD (pad-character) ─┤ └─ EDIT ─┬─ ERROR ───┬─┘
   └─ NOPAD ───────────────┘          └─ CORRECT ─┘
─►─┬────────────┬─┬────────────────────────────────┬──────────────────────────►─
   ├─ REQUIRED ─┤ └─ ERROR MESSAGE ─┬─ ACTIVE ───┬─┘
   └─ OPTIONAL ─┘                   └─ SUPPRESS ─┘

─►─┬───────────────────────────────────────┬─ ; ──────────────────────────────►◄
   │              ┌───────────────────────┐│
   └─ ATTRIBUTES ─▼─┬───────────────────┬─┴┘
                    ├─ SKIP ────────────┤
                    ├┬─ ALPHAMERIC ─┬───┤
                    │└─ NUMERIC ────┘   │
                    ├┬─ PROTECTED ───┬──┤
                    │└─ UNPROTECTED ─┘  │
                    ├┬─ DISPLAY ─┬──────┤
                    │├─ DARK ────┤      │
                    │└─ BRIGHT ──┘      │
                    ├─ DETECT ──────────┤
                    ├┬─ MDT ───┬────────┤
                    │└─ NOMDT ─┘        │
                    ├┬─ BLINK ───┬──────┤
                    │└─ NOBLINK ─┘      │
                    ├┬─ REVERSE_VIDEO ─┬┤
                    │└─ NORMAL_VIDEO ──┘│
                    ├┬─ UNDERSCORE ───┬─┤
                    │└─ NOUNDERSCORE ─┘ │
                    ├─ NOCOLOR ─────────┤
                    └┬─ BLUE ──────┬────┘
                     ├─ RED ───────┤
                     ├─ PINK ──────┤
                     ├─ GREEN ─────┤
                     ├─ TURQUOISE ─┤
                     ├─ YELLOW ────┤
                     └─ WHITE ─────┘
Parameters
map-name

Specifies the 1- to 8-character name of a map specified by the DECLARE MAP statement, as described in DML Precompiler-Directive Statements.

PERMANENT

Specifies that modifications will apply to all mapping mode I/O requests issued until the program terminates or until a subsequent MODIFY MAP request overrides the requested revisions. PERMANENT is the default.

TEMPORARY

Specifies that modifications will apply only to the next mapping mode I/O request (that is, MAP IN, MAP OUT, or MAP OUTIN).

CURSOR AT

Identifies the screen location at which the cursor will be positioned during output operations.

cursor-row cursor-column

Specifies a row and column on the terminal screen to which the cursor will be moved. Cursor-row is either the symbolic name of a FIXED BINARY(15) field that contains the row value or the value itself expressed as a numeric constant. Cursor-column is either the symbolic name of a FIXED BINARY(15) field that contains the column value or the value itself expressed as a numeric constant.

DFLD (field-name)

Specifies that the cursor will be moved to the first position in the specified field. Field-name must be the name of a map field.

WCC

Specifies the write-control-character (WCC) options requested for the output operation.

Note: If a MODIFY MAP request alters any WCC option, the system resets unspecified options to the following values:

RESETMDT/NOMDT

Specifies whether the modified data tags (MDTs) for the map fields will be reset (turned off) automatically when the map is displayed. When NOMDT is in effect, the associated data is retransmitted to variable-storage data fields during the next MAP IN request.

RESETKBD/NOKBD

Specifies whether the keyboard will (RESETKBD) or will not (NOKBD) be unlocked automatically when the map is displayed.

ALARM/NOALARM

Specifies whether the terminal audible alarm (if installed) will sound automatically when the map is displayed.

STARTPRT/NOPRT

Specifies (for 3280-type printers only) whether the contents of the terminal buffer will be printed automatically when the data has been transmitted to the terminal.

NLCR/40CR/64CR/80CR

Specifies the characters-per-line formatting for 3280-type printer output and is meaningful only if the STARTPRT option has been specified.

NLCR Specifies that no line formatting will be performed on the printer output. Printing will begin on a new line only if the printer encounters new line (NL) and carriage control (CR) characters.

40CR Specifies that the contents of the 3280-type printer buffer will be printed at 40 characters per line.

64CR Specifies that the contents of the 3280-type printer buffer will be printed at 64 characters per line.

80CR Specifies that the contents of the 3280-type printer buffer will be printed at 80 characters per line.

FOR

Specifies the map fields to be modified or excluded from modification

ALL BUT CURRENT

Modifies all fields except the current field. The current field is the map field that was referenced in the last MODIFY MAP or INQUIRE MAP request issued by the program. However, if that request referenced a list of fields rather than a single map field, no currency exists and all map fields are modified.

ALL CORRECT/ERROR FIELDS

Modifies either all fields found to be correct or all fields found to be in error during automatic editing or by a user-written edit module.

If either ALL CORRECT FIELDS or ALL ERROR FIELDS is specified, automatic editing must be enabled for the map.

ALL/ALL BUT DFLD (field-name)

Explicitly specifies the fields to be modified or excluded from modification. DFLD (field-name) names the map fields to be modified or excluded from modification. Field-name must be a map field. Multiple DFLD specifications come from only one record and must be separated by at least one blank. Field names that are not unique within the program must be qualified with the name of the associated record. Likewise, multiply-occurring fields must be qualified with the appropriate subscripts. Multiple DFLDs are separated by at least one blank (for Example, HOSPITAL_CLAIM.DIAGNOSIS_0430(1) HOSPITAL_CLAIM.DIAGNOSIS_0430(2) HOSPITAL_CLAIM.DIAGNOSIS_0430(3) ).

ALL Specifies that all named map fields will receive the requested modifications. ALL is the default.

ALL BUT Specifies that all map fields except those named will receive the requested modifications.

BACKSCAN/NOBACKSCAN

Indicates whether the system is to backscan the specified fields to remove trailing blanks before performing a mapout operation. If BACKSCAN is specified, only characters up to the last nonblank will be sent to the terminal; fields remaining on the screen will contain whatever characters were present before the MAP OUT or MAP OUTIN request was issued. If the MAP OUT or MAP OUTIN request specifies the ERASE option, the system erases the contents of all terminal data fields.

OUTPUT DATA YES/NO/ERASE/ATTRIBUTE

Specifies whether map fields will be set to the value of the corresponding variable-storage data fields (YES), left unchanged (NO), or erased (ERASE), or whether only the attribute byte (ATTRIBUTE) is transmitted during an output operation.

INPUT DATA YES/NO

Specifies whether map fields will be moved automatically to the corresponding variable-storage data fields during an input operation.

RIGHT/LEFT JUSTIFY

Indicates whether the variable-storage fields should be right- or left-justified on input.

PAD (pad-character)/NOPAD

Indicates whether variable-storage data fields will be padded on input.

PAD (pad-character) Pads the field on the right (if right justified) or left (if left justified) with the specified character. Pad-character can be the symbolic name of the field (CHAR(1)) containing the pad character, or the pad character itself enclosed in single quotation marks.

NOPAD Does not pad the fields.

EDIT ERROR/CORRECT

Explicitly sets the error flag on (ERROR) or off (CORRECT) for the specified map fields. If this parameter is specified, automatic editing must be enabled for the map.

The ability to set the error flag enables programs to perform their own editing and validation in addition to that provided by the automatic editing feature. On a MAPOUT operation, if any field is flagged to be in error, then for all fields (both correct and incorrect) only attribute bytes are transmitted; no data is moved from program variable storage to the screen.

REQUIRED/OPTIONAL

Indicates whether the terminal operator will be required to enter data in the specified map fields. An error results on mapin if REQUIRED is specified and the terminal operator fails to enter data in a required field.

If this parameter is specified, automatic editing must be enabled for the map and for the specified map fields.

ERROR MESSAGE ACTIVE

Enables display of the error message associated with the field. Typically, you enable display of an error message only after specifying ERROR MESSAGE SUPPRESS for the map in a previous MODIFY MAP PERMANENT statement.

ERROR MESSAGE SUPPRESS

Disables display of the error message associated with the field. When the map is redisplayed because of errors, the error message defined for the map field will not be displayed even if the field contains edit errors.

Use of this parameter allows you flexibility in handling error messages. For instance, you can code a data validation module to suppress a map field's default error message to enable a different error message to be displayed for that field.

ATTRIBUTES

Indicates the 3270- and 3279-type terminal display attributes for the specified map fields. If multiple attributes are specified, they must be separated by at least one blank. Only the named attributes will be modified in the map's MRB.

SKIP

Indicates that the cursor will be repositioned automatically over the map fields to the next unprotected field. If SKIP is specified, the specified map fields are assigned the NUMERIC and PROTECTED attributes (described below) automatically.

ALPHAMERIC/NUMERIC

Indicates whether the data input to the map fields by the terminal operator can be alphanumeric (any character on the 3270 keyboard) or numeric. If the terminal does not have the numeric lock option, a specification of NUMERIC is ignored.

PROTECTED/UNPROTECTED

Indicates whether the specified map fields will be protected from data entry or will be available for data entry or modification by the terminal operator. UNPROTECTED cannot be specified if SKIP has been specified.

DISPLAY/DARK/BRIGHT

Indicates whether the specified map fields will be displayed in normal (DISPLAY) or bright (BRIGHT) intensity or will not be displayed (DARK). DARK cannot be specified if DETECT has been specified.

DETECT

Indicates whether the specified map fields will be detectable by a light pen. All fields assigned the BRIGHT attribute are automatically detectable by a light pen.

MDT/NOMDT

Indicates whether the modified data tag will (MDT) or will not (NOMDT) be set automatically for the map fields when displayed.

BLINK/NOBLINK

Indicates (3279s only) whether the specified map fields will be displayed with blinking characters.

REVERSE_VIDEO/NORMAL_VIDEO

Indicates (3279s only) whether the specified map fields will be displayed in reverse video (background and character colors reversed) or in normal video.

UNDERSCORE/NOUNDERSCORE

Indicates (3279s only) whether the specified map fields will be displayed with underlined characters.

NOCOLOR

Specifies (for 3279s only) that the map fields will not be displayed with color attributes.

BLUE/RED/PINK/GREEN/TURQUOISE/YELLOW/WHITE

Indicates (3279s only) that the specified map fields will be displayed with one of the seven available color attributes.

Note: UNDERSCORE, REVERSE_VIDEO, and BLINK are mutually exclusive; that is, they can be specified in conjunction with other attributes but cannot be specified with each other. For Example, neither REVERSE_VIDEO nor UNDERSCORE can be assigned to a field for which the BLINK attribute has been defined.

Example

The following statement positions the cursor at EMP_ID_0415 and prohibits the terminal operator from entering data in any field except EMP_ID_0415 and DEPT_ID_0415:

MODIFY MAP (EMPMAPLR) TEMPORARY
  CURSOR AT DFLD (EMP_ID_0415)
  FOR ALL BUT DFLD (EMP_ID_0415) DFLD (DEPT_ID_0415)
  ATTRIBUTES PROTECTED;

The following statement sets the edit flag on for the TASK_CODE_01 field, thereby overriding automatic editing and error handling for the next mapin request:

MODIFY MAP (EMPMAPLR) TEMPORARY
  FOR DFLD (TASK_CODE_01)
  EDIT ERROR;
Status Codes

Upon completion of the MODIFY MAP function, the ERROR_STATUS field in the IDMS DC communications block indicates the outcome of the operation:

0000

The request has been serviced successfully.

4629

An invalid parameter has been passed from the program.

4644

The map field is not in the specified map; a possible cause is a reference to an invalid map field subscript.

4656

The referenced map contains no data fields.