Use this field-level keyword to define an edit mask for fields with EDTCDE or EDTWRD keywords.
When a field is displayed with this keyword, user-specified areas of the field are protected. The EDTMSK keyword is ignored when the workstation is not attached to a controller that supports an enhanced data stream.
EDTMSK(edit mask)
One parameter must be specified.
The edit mask is made of two characters: an ampersand (&) and a blank ( ). The ampersand represents a protected part of the field. A blank represents an unprotected part of the field. The edit mask must equal the display length of the field (after editing), and the number of unprotected positions must equal the program length of the field. The user must be careful to protect only nonnumeric data because protected data is not returned to the user if the field is changed.
The field containing the EDTMSK keyword must be usage I or usage B. It must also contain the EDTCDE or EDTWRD keywords.
The following keywords cannot be specified on a field with the EDTMSK keyword:
Option indicators are not valid for this keyword.
The EDTMSK keyword reduces the number of available input fields by total number of segments that are used to compose that particular field. For example, EDTMSK(' & & ') is composed of 3 segments and thus reduces the number of available input by 3.
If the ENTFLDATR keyword is specified with the EDTMSK keyword, you might have unpredictable results.
The following example shows how to specify the EDTMSK keyword:
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 A R RECORD A F1 11 0B 3 4EDTWRD('0( ) - ') A EDTMSK(' & & & ') A F2 6 0B 4 4EDTCDE(Y) A EDTMSK(' & & ') A
In this example, the dash and parentheses in field 1 are protected. Also, the data separators in field 2 are protected.