Defined edit codes are stored in a text file /mrcjava/mrcclasses/editcode.txt which includes default and mrc pre-defined codes. The mrc pre-defined codes are called user defined code, so you can either change or define your new edit code within this section.
Summary of Default Edit Codes
|Edit Code Name||Commas||Decimal point||Sign for Negative||Decimal or Blank||Positive Example||Negative Example|
|1||Yes||Yes||No Sign||.00 or 0||12,345.67||12,345.67|
|3||No||Yes||No Sign||.00 or 0||12345.67||12345.67|
|A||Yes||Yes||CR||.00 or 0||12,345.67||12,345.67CR|
|C||No||Yes||CR||.00 or 0||12345.67||12345.67CR|
|J||Yes||Yes||– (minus)||.00 or 0||12,345.67||12,345.67-|
|L||No||Yes||– (minus)||.00 or 0||12345.67||12345.67-|
|N||Yes||Yes||– (floating)||.00 or 0||12,345.67||-12,34567|
|P||No||Yes||– (floating)||.00 or 0||12345.67||-12345.67|
Specifying Your own Edit Word
The following is a brief explanation of the rules for defining an edit word.
— Any character other than a space, ampersand (&), zero, asterisk (*), decimal point (.), comma (,), minus sign (-), or CR will be treated as a literal and will be printed wherever it occurs.
— No literal will be printed which occurs to the left of the first significant digit in a number.
— A blank in the edit word will be replaced with the digit from the corresponding position of the data field.
— An ampersand will be replaced by a space.
— To stop suppression of leading zeros, place a zero or an asterisk in the farthest right position where zero suppress is to stop. A zero will cause leading zeros to be replaced with spaces. An asterisk will cause leading zeros to be replaced with asterisks.
— Either a minus sign or CR may be used to indicate a negative number. Whichever one is used, it must appear to the right of the last digit in the number. If a number is positive, the minus sign or CR will be replaced by spaces.
— Commas or decimal points which occur to the left of the first significant digit of a number will not be printed.
As an example of how these rules are applied, the following is the edit word customer account number where the first six digits are the base customer number and the last three digits are a location code:
0____-___ where the underscores indicate spaces.
The zero indicates that leading zero suppression stops in the first digit of the customer number. The minus sign is treated as a literal since it is not to the right of the last digit in the number. If a customer’s account number was 000234001, this edit word would cause the number to be displayed as 00234-001.