EDTMSK (Edit Mask) keyword for display files

You 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.

The format of the keyword is:
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:

  • AUTO (RAB, RAZ)
  • CHECK(AB, MF, RB, RZ, RLTB)
  • CHOICE
  • CNTFLD
  • DSPATR(OID SP)

Option indicators are not valid for this keyword.

Although the maximum number of input fields is 256, the use of the EDTMSK keyword can impact the field count. The segments of EDTMSK fields are treated at run time as separate input fields on some emulators or controllers. Some controllers consider each segment of the field as an actual input field, and each segment counts toward the 256 maximum. However, some emulators count a EDTMSK field as a single field toward the count of 256. But, they might keep track of the segments separately. One emulator is known to have a maximum of 512 segments allowed. Therefore, when an emulator and a controller use the same display file, the emulator might allow more EDTMSK fields than the controller.

If the ENTFLDATR keyword is specified with the EDTMSK keyword, you might have unpredictable results.

Example

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.