CL Command Reference - CRTEDTD

CL Command List > CRTEDTD Reference

Description:

The Create Edit Description (CRTEDTD) command defines an edit mask for the specified edit description and stores it in the QSYS library. As many as five edit descriptions can be defined by the user. A version of each of these edit descriptions is supplied in the QSYS library. More information about the IBM-supplied versions is in the Application Display Programming book, SC41-5715. To create a new version, the IBM-supplied version must first be deleted by the Delete Edit Description (DLTEDTD) command.

Edit descriptions can be used in data description specifications and high-level language programs to edit numeric fields.


Examples:

The examples assume the following:

FIELDA
Six digits (four integer and two decimal positions) with a value of 001234

FIELDB
Same as FIELDA but with a negative value (-001234)

FIELDC
Same as FIELDA but with a zero value (000000)

DATE
Six digits (0 decimal positions) with a value of 091878

The character b is used to represent blank spaces.

Example 1: Create Edit Description 5

CRTEDTD EDTD(5) INTMASK(¡¯ , , 0¡¯) FRACMASK(¡¯ ¡¯)
NEGSTS(¡¯DB ¡¯) POSSTS(¡¯CREDIT¡¯) LFTCNS(¡¯$¡¯)
RGTCNS(¡¯ **¡¯)

FIELDA
Logical mask is ¡¯$b,bb0.bbDBbbbb b**¡¯ for a negative value or ¡¯$b,bb0.bb CREDIT b**¡¯ for a positive value
Edited result is $bbb12.34CREDITb**

FIELDB
Same logical mask
Edited result is $bbb12.34DBbbbbb**

FIELDC Same logical mask
Edited result is $bbbbb.00CREDITb** or, if ZEROBAL(*NO) had been specified, $bbbbbbbbCREDITb**