Editing rules for PL/I varying length zero terminated string types
Character or Graphic data types with the PL/I VARYINGZ attribute (FM types ZC and Z2) are shown in the Edit panels with one or two display characters added to the end of the declared length. These screen positions contain X'00' or X'0000' when the current length of the string is equal to the maximum declared length. The extra positions are protected from data entry by File Manager.
The Edit processing rules for a VARYINGZ field are:
- The position of the X'00' or X'0000' terminating characters is automatically moved within the string if the replacement string length is not equal to the replaced string length.
- If the updated string length would exceed the string maximum, an error message is issued.
- If the updated string length is equal to the string maximum the X'00' or X'0000' is moved to the extra display positions.
- If a VARYINGZ field declaration specifies a maximum length REFER variable, the displayed REFER value may be updated to increase or decrease the maximum string length for the VARYINGZ field. If the new maximum length set by the REFER value is less that the current length of the data string, the data string is truncated and the terminating characters are placed in the new extra positions.
- Overtyping of a Graphic VARYINGZ field is not recommended as Graphic strings usually contain undisplayable characters that can't be overtyped in the TABL or SNGL Formats.