Provide the DEEDIT function that removes special characters from an EBCDIC data field.
Condition: LENGERR
This command is threadsafe.
BIF DEEDIT provides the built-in function DEEDIT. It specifies that alphabetic and special characters are removed from an EBCDIC data field, and the remaining digits right-aligned and padded to the left with zeros as necessary.
If the field ends with a minus sign or a carriage-return (CR), a negative zone (X'D') is placed in the rightmost (low-order) byte.
If the zone portion of the rightmost byte contains one of the characters X'A' through X'F', and the numeric portion contains one of the hexadecimal digits X'0' through X'9', the rightmost byte is returned unaltered (see the example). This permits the application program to operate on a zoned numeric field. The returned value is in the field that initially contained the unedited data.
A 1 byte field is returned unaltered, no matter what the field contains.
Default action: terminate the task abnormally.
EXEC CICS BIF DEEDIT
FIELD(CONTG)
LENGTH(9)
This removes all characters other than digits from CONTG, a 9 byte field, and returns the edited result in that field to the application program.
Original value Returned value
14-6704/B 00146704B
$25.68 000002568
A decimal point is an EBCDIC special character and as such is removed.