The EDIT subparameter lets you create your own edit patterns for converted numeric data. An edit pattern can consist of:
-
Significant digit selectors.
-
Leading insignificant digit selectors.
-
Sign replacement characters.
-
Any other characters to be printed in the actual output.
The edit pattern can be up to 44 characters in length, with a maximum of 31 digits.
The characters used to represent significant or insignificant digit selectors are determined by the keyword EDIT. If EDIT is specified, the letter I represents leading insignificant digits which will print as blanks if the digits are zeros, and the letter T represents significant digits (digits that will print in their true form, even as leading zeros).
The keyword EDIT can be specified with replacements for the letters I and/or T. Any printable character can be used as a replacement character. This replacement provides you with a pattern that encompasses all printable characters.
The figure below illustrates the concept of replacing the insignificant and significant digit selectors I and T with other characters.
When a blank, quotation mark or unbalanced parenthesis appears within an EDIT pattern, the entire pattern must be enclosed within single quotation marks. Balanced parentheses need not be enclosed within quotation marks. A single quotation mark within the pattern (i.e., an apostrophe) must be specified as two apostrophes.
All other characters are printed as specified in the edit pattern, with the following exceptions:
-
Any character specified after the first leading insignificant digit selector and before the first significant digit selector will print as a blank, unless a previously selected digit was non-zero.
-
Any character specified after the last significant digit selector will print as a blank if the edited number is positive.
-
Any character or character string specified before the first leading insignificant digit selector, including a leading sign character, will print to the immediate left of the first significant digit. The appropriate number of leading blanks will be supplied, assuring that the total number of characters in the printed field corresponds to the total number of characters in the edit pattern.
-
Any leading insignificant digit selector specified after the first significant digit selector will be treated as a significant digit selector.
-
The sign replacement character appearing as the first and/or last character of the pattern is replaced as per the SIGNS subparameter.