Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
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.
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
EDTD | Edit description | 5, 6, 7, 8, 9 | Required, Positional 1 |
INTMASK | Integer mask | Character value, *NONE | Optional |
DECPNT | Decimal point character | Character value, '.', *NONE | Optional |
FRACMASK | Fraction mask | Character value, *NONE | Optional |
FILLCHAR | Fill character | Character value, *BLANK | Optional |
CURSYM | Currency symbol | Character value, *NONE | Optional |
ZEROBAL | Edit zero values | *YES, *NO | Optional |
NEGSTS | Negative status characters | Character value, *NONE | Optional |
POSSTS | Positive status characters | Character value, *NONE | Optional |
LFTCNS | Left constant characters | Character value, *NONE | Optional |
RGTCNS | Right constant characters | Character value, *NONE | Optional |
TEXT | Text 'description' | Character value, *BLANK | Optional |
AUT | Authority | Name, *LIBCRTAUT, *CHANGE, *ALL, *USE, *EXCLUDE | Optional |
Top |
Specifies a single-digit code (5, 6, 7, 8, or 9) that identifies the user-defined edit description being created. The actual name of the created object (which is stored in the QSYS library) is QEDITn, where n is the single-digit edit code specified in this parameter.
This is a required parameter.
Top |
Specifies a character string (mask) that describes the editing of the integer portion of a decimal field. Characters other than a blank, a zero, or an ampersand (&) are handled as constants in the editing process. Blank, zero, and ampersand have the following meanings:
Note: You cannot specify both INTMASK(*NONE) and FRACMASK(*NONE) on the CRTEDTD command. Instead, specify blanks for INTMASK and FRACMASK, and specify GENLVL(30) on the Create Printer File (CRTPRTF) or Create Display File (CRTDSPF) command, which allows the file to create, but ignores the edit code keyword.
The possible values are:
Top |
Specifies, for decimal fields, a single character used as a decimal point to separate the integer (INTMASK) and fraction (FRACMASK) portions of the edited result. If the field has no decimal places, this character is not used and is not considered in the width of the edited results.
Note: If the separator character specified for DECPNT is also used in the INTMASK parameter, it has no special meaning in the integer mask; it is handled only as a constant or as a digit replacement character in the integer mask.
The possible values are:
Top |
Specifies a character string (mask) that describes the editing of the fraction portion of a decimal field (to the right of the decimal point). The characters have the same meaning as described for the Integer mask prompt (INTMASK parameter) except that all zeros are handled as constants and blanks are not replaced with a fill character.
The possible values are:
Top |
Specifies the character that is used in each position of a result that is zero suppressed. The specified character replaces all leading zeros that are to the left of the first significant digit in the integer mask (or a forced zero).
The possible values are:
Top |
Specifies the character string that is used as the floating currency symbol. The character string specified appears immediately to the left of the first significant digit (or constant). If the first significant digit is a zero, occurring in the position that ended zero suppression, the character string ends in the position occupied by that zero.
The possible values are:
Top |
Specifies the editing action for zero values.
The possible values are:
Top |
Specifies the character string that immediately follows the body of the edited result if the field is negative. If the field is positive, blanks are substituted for the length of the string, unless a value is also specified for the Positive status characters prompt (POSSTS parameter).
The possible values are:
Top |
Specifies the character string that immediately follows the body of the edited result if the field is positive or zero. If the field is negative, blanks are substituted for the length of the string unless a value is also specified for the Negative status characters prompt (NEGSTS parameter).
The possible values are:
Top |
Specifies the character string constant that always appears as the farthest left portion of the edited result.
The possible values are:
Top |
Specifies the character string constant that always appears as the farthest right portion of the edited result.
The possible values are:
Top |
Specifies the text that briefly describes the object.
The possible values are:
Top |
Specifies the authority you are giving to users who do not have specific authority for the object, who are not on an authorization list, and whose group profile or supplemental group profiles do not have specific authority for the object.
The possible values are:
Top |
The examples assume the following:
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(' **')
Edited result is $bbb12.34CREDITb**
Edited result is $bbb12.34DBbbbbb**
Edited result is $bbbbb.00CREDITb** or, if ZEROBAL(*NO) had been specified, $bbbbbbbbCREDITb**
Example 2: Create Edit Description 6
CRTEDTD EDTD(6) INTMASK(' . 0 ') DECPNT(',') FRACMASK(' ') CURSYM('DM') NEGSTS('- **')
Edited result is bbbDM12,34bbbb
Edited result is bbbDM12,34-b**
Edited result is bbbbDM0,00bbbb or, if ZEROBAL(*NO) had been specified, bbbbbbbbbbbbbb
Example 3: Create Edit Description 7
CRTEDTD EDTD(7) INTMASK('0 MONTH DAY YEAR') LFTCNS('DATE IS ')
Edited result is DATEbISbb9MONTH18DAYb78YEAR
Example 4: Create Edit Description 9
CRTEDTD EDTD(9) INTMASK(' , 0') DECPNT('.') FRACMASK(' ') FILLCHAR('*') NEGSTS(' ERROR **')
Edited result is ***12.34bbbbbbbbb
Edited result is ***12.34bERRORb**
Edited result is *****.00bbbbbbbbb or, if ZEROBAL(*NO) had been specified, ********bbbbbbbbb
Top |
Top |