Purpose
Determines if one or more of a map's data fields are changed, identical, truncated, erased, or in error.
A map field status condition applies to the status of the tested map data fields at the time of the most recent mapin operation. The IN ERROR status condition also applies to the status of the map fields following a map modification command that specifies EDIT IS ERROR/CORRECT.
Map field status tests cannot be used to test the condition of system-supplied $MESSAGE, $RESPONSE, and $PAGE fields.
Syntax
┌─────── , ────────┐ ►►─────┬─┬── ALL ───┬───┬─ OF ( ─▼─ map-field-name ─┴─) ─┬──────┬─────────────► │ ├── ANY ───┤ └─ FIELDS ───────────────────────┘ │ │ ├── SOME ──┤ │ │ └┬─ NONE ─┬┘ │ │ └─ NO ───┘ │ ├─ ALL ─┬─ BUT ────┬── ( map-field-name ) ───────────────┤ │ └─ EXCEPT ─┘ │ └──┬─ FIELD ───┬── map-field-name ───────────────────────┘ └─ DFLD ────┘ ►─────┬───────┬────┬───────┬───┬─ IDENtical ─┬───────────────────────────────►◄ ├─ IS ─┤ └─ NOT ─┘ ├─ CHANged ───┤ └─ ARE ─┘ ├─ TRUNcated ─┤ ├─ ERASed ────┤ └─ in ERRor ──┘
Parameters
The outcome of the test must be true for every specified field.
The outcome of the test must be true for one or more of the specified fields.
The outcome of the test must be true for none of the specified fields.
NO can be used in place of NONE.
The outcome of the test must be true for at least one but not all of the specified fields.
Specifies a data field in the dialog's map.
One or more fields, up to the number of fields defined for the map, can be specified inside the parentheses.
Specifies all data fields in the dialog's map.
Specifies that all map fields are to be tested, except for the fields specified by map-field-name
EXCept can be used instead of ALL BUT.
Map-field-name specifies a data field in the dialog's map.
One or more fields can be specified, up to the number of fields defined for the map, inside the parentheses.
Explicitly names one map field for which the outcome of the test must be true.
Map-field-name must be a data field known to the dialog's map.
DFLD can be used in place of FIELD.
Specifies that a test is for the opposite of the specified status.
At the time of the most recent mapin from the terminal, the contents of the mapped-in field are compared with the original contents of the dialog's record buffer.
The condition is true if:
Note: The MDT can also be set at mapout, depending on the map's definition and any MODIFY MAP commands issued before mapout.
At the time of the most recent mapin from the terminal, the field's modified data tag (MDT) is checked to determine if the end user has changed the field.
When erase EOF is pressed at the beginning of a field, the MDT is set; however, the changed condition is only true if you have specified a pad character.
The condition is true if:
Note: The MDT can also be set at mapout, depending on the map's definition and any MODIFY MAP commands issued before mapout.
At the time of the most recent mapin from the terminal, CA ADS truncates excess data entered in the specified map fields.
At the time of the most recent mapin from the terminal, the terminal operator erased all data in specified map fields.
At the time of the most recent mapin from the terminal, specified map fields contain erroneous data or were given the EDIT IS ERROR attribute in a map modification command.
Note: You do not have to wait for mapin. You can set fields and immediately test them.
Automatic editing affects the use of the IN ERROR status condition as follows:
Note: The above does not apply for pageable map detail areas.
Note: The above does not apply for pageable map detail areas.
EXECUTE ON EDIT ERRORS is specified on the Process Modules screen.
Note: Map fields in error are not mapped in. Variable storage contains the values of the fields prior to the last mapout operation.
Usage
Pageable Map Considerations
Example 1: Testing for field changes
The map field status condition in the following IF statement is true when the user modifies any map field:
IF ANY FIELD IS CHANGED ...
Example 2: Testing for modified data
The map field status condition in the following IF statement is true if the input data is identical to data initially displayed on the map. In this example, the user is asked to specify another department if no change is made to the department id or name:
IF FIELD DEPT-ID-0410 IS IDENTICAL
AND FIELD DEPT-NAME-0410 IS IDENTICAL
THEN
DISPLAY MSG TEXT
'PLEASE SPECIFY NEXT DEPARTMENT'.
Example 3: Testing for field truncation
The map field status condition in the following IF statement is true when excess data entered in the CUST-CITY field has been truncated during the mapin operation:
IF FIELD CUST-CITY IS TRUNCATED ...
Example 4: Testing for erased data
The map field status condition in the following IF statement is true when the user erases all data in the CUST-NAME, CUST-ADDR1, and CUST-CITY fields:
IF ALL OF (CUST-NAME, CUST-ADDR1, CUST-CITY) ARE ERASED ...
|
Copyright © 2014 CA.
All rights reserved.
|
|