MODIFY MAP (COBOL)
The MODIFY MAP statement modifies the options in the map request block (MRB) for a map. Modifications can be designated as permanent or temporary. You can request modifications that are field-specific, map-specific, or both. Field-specific revisions apply to the variable data fields in the map.
idmscu19
The MODIFY MAP statement modifies the options in the map request block (MRB) for a map. Modifications can be designated as permanent or temporary. You can request modifications that are field-specific, map-specific, or both. Field-specific revisions apply to the variable data fields in the map.
The MODIFY MAP statement parameters that revise predefined map or map data field attributes have no defaults. If a parameter is not specified, it remains set to the value that was specified at map generation or in a previous MODIFY MAP PERMANENT statement.
Syntax
►►─── MODIFY MAPmap-name────────────────────────────────────────────────────►◄ ►─┬───────────────┬──────────────────────────────────────────────────────────► ├─ PERMANENT ◄ ─┤ └─ TEMPORARY ───┘ ►─┬────────────────────────────────────────────┬─────────────────────────────► └─ CURSOR at ─┬─cursor-row cursor-column─┬─┘ └─ DFLDfield-name──────────┘ ►─┬──────────────────────────────┬───────────────────────────────────────────► │ ┌────────────────────┐ │ └─ WCC ─▼─┬─┬─ RESETMDT ─┬─┬─┴─┘ │ └─ NOMDT ────┘ │ │ │ ├─┬─ RESETKBD ─┬─┤ │ └─ NOKBD ────┘ │ │ │ ├─┬─ ALARM ───┬──┤ │ └─ NOALARM ─┘ │ │ │ ├─┬─ STARTPRT ─┬─┤ │ └─ NOPRT ────┘ │ │ │ └─┬─ NLCR ─┬─────┘ ├─ 40CR ─┤ ├─ 64CR ─┤ └─ 80CR ─┘ ►─┬────────────────────────────────────────────────────────┬─────────────────►◄ │ ┌────────────────────────┐ │ └─ FORfield-specifications──▼─modification-options─┴─┘Expansion of field-specifications►─┬─ ALL ─┬─ BUT ────┬─ CURRENT ───────────────┬─────────────────────────────► │ └─ EXCEPT ─┘ │ │ │ ├─ ALL ─┬─ CORRECT ─┬─ FIELDS ───────────────┤ │ └─ ERROR ───┘ │ │ ┌───────────────────┐│ └─┬───────────────────┬─▼─ DFLDfield-name─┴┘ ├─ ALL ◄ ───────────┤ └─ all ─┬─ BUT ────┬┘ └─ EXCEPT ─┘Expansion ofmodification-options►───┬─┬─ BACKSCAN ───┬─────────────────────────┬─ . ─────────────────────────► │ └─ NOBACKSCAN ─┘ │ │ │ ├─ OUTPUT DATA is ─┬─ YES ───────┬─────────┤ │ ├─ NO ────────┤ │ │ ├─ ERASE ─────┤ │ │ └─ ATTRIBUTE ─┘ │ │ │ ├─ INPUT DATA is ─┬─ YES ─┬────────────────┤ │ └─ NO ──┘ │ │ │ ├─┬─ RIGHT ─┬─ JUSTIFY ────────────────────┤ │ └─ LEFT ──┘ │ │ │ ├─ PAD ─┬─pad-character─┬────────────────┤ │ ├─ LOW-VALUE ─────┤ │ │ └─ HIGH-VALUE ────┘ │ │ │ ├─ EDIT is ─┬─ ERROR ───┬──────────────────┤ │ └─ CORRECT ─┘ │ │ │ ├─┬─ REQUIRED ─┬───────────────────────────┤ │ └─ OPTIONAL ─┘ │ │ │ ├─error message is─┬─ ACTIVE ─────┬──────┤ │ └─ 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
- MODIFY MAPmap-nameSpecifies the map to modify. The map must be included in the MAP SECTION of the program.
- PERMANENTApplies the modifications to all mapping mode I/O requests until the program terminates or until a subsequent MODIFY MAP request overrides the requested revisions. This value is the default.
- TEMPORARYApplies the modifications only to the next mapping mode I/O request (that is, MAP IN, MAP OUT, or MAP OUTIN).
- CURSOR ATSpecifies where to position the cursor during output operations.
- cursor-rowSpecifies a row on the terminal screen. Specify the symbolic name of the user-defined field that contains the row value, or the value itself expressed as a numeric constant. Typically, fields with cursor row and column coordinates are level-77 data items that are defined as PIC S9(4) USAGE COMP (halfword).
- cursor-columnSpecifies a column on the terminal screen. Specify the symbolic name of a user-defined field that contains the column value, or the value itself expressed as a numeric constant. Typically, fields with cursor row and column coordinates are level-77 data items that are defined as PIC S9(4) USAGE COMP (halfword).
- DFLDfield-nameSpecifies a map field. The cursor is moved to the first position in the field.
- WCCSpecifies the write-control character (WCC) options for the output operation. If a MODIFY MAP request alters any WCC option, unspecified options are reset to NOMDT, NOKBD, and NOALARM.
- RESETMDTResets (turns off) the modified data tags (MDTs) for the map fields automatically when the map is displayed.
- NOMDTDoes not reset (turn off) the modified data tags (MDTs) for the map fields when the map is displayed. The associated data is retransmitted to variable-storage data fields during the next MAP IN request.
- RESETKBDUnlocks the keyboard automatically when the map is displayed.
- NOKBDDoes not unlock the keyboard when the map is displayed.
- ALARMSounds the terminal audible alarm (if installed) automatically when the map is displayed.
- NOALARMDoes not sound the terminal audible alarm when the map is displayed.
- STARTPRTPrints the contents of the terminal buffer automatically when the data has been transmitted to the terminal. This option applies only to 3280-type printers.
- NOPRTDoes not print the contents of the terminal buffer when the data has been transmitted to the terminal. This option applies only to 3280-type printers.
- NLCRDoes not perform line formatting on the printer output. Printing begins on a new line only when the printer encounters new line (NL) and carriage control (CR) characters.
- 40CRPrints the contents of the 3280-type printer buffer at 40 characters per line.
- 64CRPrints the contents of the 3280-type printer buffer at 64 characters per line.
- 80CRPrints the contents of the 3280-type printer buffer at 80 characters per line.
- FORSpecifies the map fields to modify or to exclude from modification.
Expansion of field-specifications
- ALL BUT (EXCEPT) CURRENTModifies 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. If that request referenced a list of fields rather than a single map field, no currency exists and all map fields are modified.BUT and EXCEPT are synonyms and can be used interchangeably.
- ALL CORRECT FIELDSModifies all fields that are found to be correct during automatic editing or by a user-written edit module.To specify, ALL CORRECT FIELDS, automatic editing must be enabled for the map.
- ALL ERROR FIELDSModifies all fields that are found to be in error during automatic editing or by a user-written edit module.If you specify ALL ERROR FIELDS, automatic editing must be enabled for the map.
- ALLModifies all named map fields. This value is the default.
- all BUT (EXCEPT)Modifies all map fields except for the named fields.BUT and EXCEPT are synonyms and can be used interchangeably.
- DFLDfield-nameSpecifies the map fields to modify or exclude from modification. Separate multiple DFLD specifications by at least one blank. Multiple DFLD specifications must come from the same map record. 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. Use the following syntax:map-data-field-name─┬─────────────┬──┬────────────────────────┬─ └─subscript─┘ └─┬─ IN ─┬─record-name─┘ └─ OF ─┘
Modification Options
- BACKSCANBackscans the specified fields and removes trailing blanks before performing a MAPOUT operation. Only the characters up to the last nonblank are sent to the terminal. Fields that remain on the screen 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 contents of all terminal data fields are erased.
- NOBACKSCANDoes not backscan the specified fields and remove trailing blanks.
- OUTPUT DATA ISSpecifies how to treat the output map fields.
- YESSets the fields to the value of the corresponding variable-storage data fields.
- NOLeaves the fields unchanged.
- ERASEErases the fields.
- ATTRIBUTETransmits only the attribute byte of the fields.
- INPUT DATA is YESMoves map fields automatically to the corresponding variable-storage data fields during an input operation.
- INPUT DATA is NODoes not move map fields to the corresponding variable-storage data fields during an input operation.
- RIGHT JUSTIFYRight justifies the variable-storage fields on input.
- LEFT JUSTIFYLeft justifies the variable-storage fields on input.
- PADSpecifies whether to pad variable-storage data fields on input and defines the padding value or character.If RIGHT JUSTIFY is specified, fields are padded on the left. If LEFT JUSTIFY is specified, fields are padded on the right.
- pad-characterSpecifies the symbolic name of a user-defined PIC X DISPLAY field that contains the pad character, or the character itself enclosed in quotation marks.
- LOW-VALUEPads the fields with zeros.
- HIGH-VALUEPads the fields with the highest value in the computer collating sequence.
- EDIT IS ERRORSets the error flagonfor the specified map fields. Automatic editing must be enabled for the map.Setting 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, when any field has an error flag, only attribute bytes are transmitted for all fields (both CORRECT and INCORRECT). No data is moved from program variable storage to the screen.
- EDIT IS CORRECTSets the error flagofffor the specified map fields. Automatic editing must be enabled for the map.Setting 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, when any fieldhas an error flag, only attribute bytes are transmitted for all fields (both CORRECT and INCORRECT). No data is moved from program variable storage to the screen.
- REQUIREDRequires the user to type data in the specified map fields. If no data is entered, an error occurs on MAPIN.Automatic editing must be enabled for the map and for the specified map fields.
- OPTIONALDoes not require the user to type data in the specified map fields.
- error message isSpecifies whether to display an error message that is associated with the field.
- ACTIVEDisplays the error message that is associated with the field. This value is the default.Typically, ACTIVE is specified after specifying ERROR MESSAGE SUPPRESS for the map in a previous MODIFY MAP PERMANENT statement.
- SUPPRESSDoes not display the error message. When the map is redisplayed because of errors, the message that is defined for the map field is not displayed even when the field contains edit errors.
- ATTRIBUTESIndicates the 3270- and 3279-type terminal display attributes for the specified map fields. Only the named attributes are modified in the MRB. Separate multiple attributes by blanks.
- SKIPRepositions the cursor automatically past the map fields to the next unprotected field. When you specify SKIP, the NUMERIC and PROTECTED attributes are assigned to the affected map fields automatically.
- ALPHAMERICAllows the user to type any character on the 3270 keyboard into the map fields.
- NUMERICAllows the user to type numeric characters only into the map fields. If the terminal does not have the numeric lock option, NUMERIC is ignored.
- PROTECTEDProtects the specified map fields from data entry or modification by the user.
- UNPROTECTEDMakes the specified map fields available for data entry or modification by the user.You cannot specify both UNPROTECTED and SKIP.
- DISPLAYDisplays the specified map fields in normal intensity.
- DARKDoes not display the specified map fields.You cannot specify both DARK and DETECT.
- BRIGHTDisplays the specified map fields in bright intensity.Fields that have the BRIGHT attribute are detectable by a light pen.
- DETECTMakes the specified map fields detectable by a light pen.Fields that have the BRIGHT attribute are also detectable by a light pen.
- MDTSets the modified data tag automatically for the map fields when they are displayed.
- NOMDTDoes not set the modified data tag automatically for the map fields when they are displayed.
- BLINKDisplays the specified map fields with blinking characters. This option applies only to 3279 terminals.If you specify BLINK, you cannot specify REVERSE-VIDEO or UNDERSCORE.
- NOBLINKDoes not display the specified map fields with blinking characters. This option applies only to 3279 terminals.
- REVERSE-VIDEODisplays the specified map fields in reverse video (background and character colors reversed). This option applies only to 3279 terminals.If you specify REVERSE-VIDEO, you cannot specify BLINK or UNDERSCORE.
- NORMAL-VIDEODisplays the specified map fields in normal video. This option applies only to 3279 terminals.
- UNDERSCOREDisplays the specified map fields with underlined characters. This option applies only to 3279 terminals.If you specify UNDERSCORE, you cannot specify BLINK or REVERSE-VIDEO.
- NOUNDERSCOREDisplays the specified map fields without underlined characters. This option applies only to 3279 terminals.
- NOCOLOR/BLUE/RED/PINK/GREEN/TURQUOISE/YELLOW/WHITESpecifies a display color for the specified map fields. This option applies only to 3279 terminals.
Examples
The following examples illustrate the use of the MODIFY MAP statement.
- Example 1The following statement positions the cursor at EMP-ID-0415 and prohibits the user from entering data in any field except EMP-ID-0415 and DEPT-ID-0410:MODIFY MAP EMPMAPLR TEMPORARY CURSOR AT DFLD EMP-ID-0415 FOR ALL BUT DFLD EMP-ID-0415 DFLD DEPT-ID-0410 ATTRIBUTES PROTECTED.
- Example 2The following statement sets the edit flag on for the TASK-CODE-01 field, which overrides automatic editing and error handling for the next MAP IN request:MODIFY MAP EMPMAPLR TEMPORARY FOR DFLD TASK-CODE-01 EDIT IS ERROR.
- Example 3The following statement suppresses the display of default error messages for fields EMP-ID and DEPT-ID on the current map:MODIFY MAP EMPMAPLR TEMPORARY FOR DFLD EMP-ID DFLD DEPT-ID ERROR MESSAGE IS SUPPRESS.Because this MODIFY MAP statement specifies TEMPORARY, the error messages are suppressed only for the next MAPOUT. If PERMANENT (default) was specified, the error messages would be suppressed until the program terminated or until a subsequent MODIFY MAP overrode the error message specifications.
Status Codes
After completion of the MODIFY MAP function, the ERROR-STATUS field in the IDMS-DC communications block indicates the outcome:
Status code
| Meaning
|
0000 | The request has been serviced successfully. |
4629 | The program passed an invalid parameter. |
4644 | The map field is not in the specified map. A reference to a map field subscript may be invalid. |
4656 | The referenced map contains no data fields. |