BIF DEEDIT

Provide the DEEDIT function that removes special characters from an EBCDIC data field.

BIF DEEDIT

Read syntax diagramSkip visual syntax diagramBIF DEEDITFIELD( data-area)LENGTH( data-value)

Condition: LENGERR

This command is threadsafe.

 

Description

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.

Options

FIELD(data-area)
specifies the field to be edited.
LENGTH(data-value)
specifies the field length in bytes.

Conditions

22 LENGERR
Occurs if the LENGTH value is less than 1.

Default action: terminate the task abnormally.

Examples

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.

Two examples of the contents of CONTG before and after execution of the command are:
Original value      Returned value
14-6704/B             00146704B
$25.68                000002568

A decimal point is an EBCDIC special character and as such is removed.