Command reference / object

CRTEDTD

Create Edit 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.

Allowed environments: *ALL. Positional parameters: 1.

Parameters

EDTD Edit description

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 QEDIT n , where n is the single-digit edit code specified in this parameter. This is a required parameter.

Type
*CHAR
Required
Yes
Length
1
Case
Uppercase

Allowed values: 5, 6, 7, 8, 9

INTMASK Integer mask

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: Blank: Each blank is replaced with a fill character or with a digit from the number being edited once zero suppression ends. Zero (0): The farthest left zero is a digit replacement character and also ends zero suppression. All other zeros in the integer mask are handled as constants. Ampersand (&): Blank substitution. 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:

Type
*CHAR
Required
No
Default
*NONE
Length
31
Case
Mixed case

Suggested / special values: *NONE

*NONE
No editing mask is used on the integer portion of decimal fields.
'integer-mask'
Specify the character string that is used as the editing mask for the integer portion of a decimal field. A maximum of 31 characters, enclosed in apostrophes, can be used in the integer mask.

DECPNT Decimal point character

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:

Type
*CHAR
Required
No
Default
.
Length
1
Case
Mixed case

Suggested / special values: *NONE

' . ' (period)
The period (or decimal point) is the separator character. It must be enclosed in apostrophes.
*NONE
No separator character is specified; a decimal point is not needed in the edited result.
'separator-character'
Specify the separator character, such as the comma (,), that is used as a decimal point. Any alphanumeric or special character can be used, but a special character must be enclosed in apostrophes.

FRACMASK Fraction mask

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:

Type
*CHAR
Required
No
Default
*NONE
Length
31
Case
Mixed case

Suggested / special values: *NONE

*NONE
No editing mask is used on the fraction portion of decimal fields.
'fraction-mask'
Specify the character string that is used as the editing mask for the fraction portion of a decimal field. A maximum of 31 characters, enclosed in apostrophes, can be used in the fraction mask.

FILLCHAR Fill character

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:

Type
*CHAR
Required
No
Default
*BLANK
Length
1
Case
Mixed case

Suggested / special values: *BLANK

*BLANK
The fill character is a blank.
'fill-character'
Specify the character that is used as the fill character. Any alphanumeric or special character can be used, but a special character must be enclosed in apostrophes.

CURSYM Currency symbol

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:

Type
*CHAR
Required
No
Default
*NONE
Length
15
Case
Mixed case

Suggested / special values: *NONE

*NONE
No floating currency symbol is specified; none is needed in the edited result.
'floating-currency-symbol'
Specify the character string that is used as the floating currency symbol for monetary amount fields. A maximum of 15 alphanumeric and special characters, enclosed in apostrophes, can be specified.

ZEROBAL Edit zero values

Specifies the editing action for zero values. The possible values are:

Type
*CHAR
Required
No
Default
*YES
Length
4
Case
Uppercase

Allowed values: *YES, *NO

*YES
The normal editing rules are followed. (For information on Editing rules, refer to the description of the Create Edit Description (CRTEDTD) command in the CL Reference manual.
*NO
If the field being edited has a value of zero, the entire field (integer, decimal point, or fraction) is replaced by the fill character, including constants in the edit mask.

NEGSTS Negative status characters

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:

Type
*CHAR
Required
No
Default
*NONE
Length
31
Case
Mixed case

Suggested / special values: *NONE

*NONE
No character string is specified; blanks are used to the right of the field in the edited result.
'negative-status-character-string'
Specify the character string that immediately follows the edited field when the field is negative in value. A maximum of 31 characters, enclosed in apostrophes, can be specified as the negative status character string.

POSSTS Positive status characters

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:

Type
*CHAR
Required
No
Default
*NONE
Length
31
Case
Mixed case

Suggested / special values: *NONE

*NONE
No character string is specified; blanks are used to the right of the field in the edited result.
'positive-status-character-string'
Specify the character string that immediately follows the edited field when the field is positive in value. A maximum of 31 characters, enclosed in apostrophes, can be specified as the positive status character string.

LFTCNS Left constant characters

Specifies the character string constant that always appears as the farthest left portion of the edited result. The possible values are:

Type
*CHAR
Required
No
Default
*NONE
Length
31
Case
Mixed case

Suggested / special values: *NONE

*NONE
No constant appears on the left side of edited fields.
'left-constant'
Specify the character string that always appears on the left side of an edited field. A maximum of 31 characters, enclosed in apostrophes, can be specified.

RGTCNS Right constant characters

Specifies the character string constant that always appears as the farthest right portion of the edited result. The possible values are:

Type
*CHAR
Required
No
Default
*NONE
Length
31
Case
Mixed case

Suggested / special values: *NONE

*NONE
No constant appears on the right side of edited fields.
'right-constant'
Specify the character string that always appears on the right side of an edited field. A maximum of 31 characters, enclosed in apostrophes, can be specified.

TEXT Text description

Specifies the text that briefly describes the object. The possible values are:

Type
*CHAR
Required
No
Default
*BLANK
Length
50
Case
Mixed case

Suggested / special values: *BLANK

*BLANK
No text is specified.
'description'
Specify no more than 50 characters of text, enclosed in apostrophes.

AUT Authority

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:

Type
*NAME
Required
No
Default
*LIBCRTAUT
Length
10
Case
Uppercase

Suggested / special values: *LIBCRTAUT, *CHANGE, *ALL, *USE, *EXCLUDE

*LIBCRTAUT
The authority for the object is the same as the create authority for QSYS. The create authority for QSYS can be displayed by using the Display Library Description (DSPLIBD) command. If the create authority is changed with the Change Library (CHGLIB) command, the new authority will not affect existing objects.
*CHANGE
The user can perform all operations on the object except those limited to the owner or controlled by object existence (*OBJEXIST) and object management (*OBJMGT) authorities. The user can change and perform basic functions on the object. *CHANGE authority provides object operational (*OBJOPR) authority and all data authority. If the object is an authorization list, the user cannot add, change, or remove users.
*ALL
The user can perform all operations except those limited to the owner or controlled by authorization list management (*AUTLMGT) authority. The user can control the object's existence, specify the security for the object, change the object, and perform basic functions on the object. The user also can change ownership of the object.
*USE
The user can perform basic operations on the object, such as running a program or reading a file. The user cannot change the object. Use (*USE) authority provides object operational (*OBJOPR), read (*READ), and execute (*EXECUTE) authorities.
*EXCLUDE
The user cannot access the object.
authorization-list-name
Specify the name of an authorization list. Users included on the authorization list are granted authority to the object as specified by the list. The authorization list must exist when the object is created.

Examples

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**

CRTEDTD EDTD(6) INTMASK(' . 0 ') DECPNT(',') FRACMASK(' ') CURSYM('DM') NEGSTS('- **')

FIELDA: Logical mask is 'bbb.b0b,bb-b**' with floating DM Edited result is bbbDM12,34bbbb FIELDB: Same logical mask Edited result is bbbDM12,34-b** FIELDC: Same logical mask Edited result is bbbbDM0,00bbbb or, if ZEROBAL(*NO) had been specified, bbbbbbbbbbbbbb

CRTEDTD EDTD(7) INTMASK('0 MONTH DAY YEAR') LFTCNS('DATE IS ')

DATE: Logical mask is equal to the INTMASK parameter value Edited result is DATEbISbb9MONTH18DAYb78YEAR

CRTEDTD EDTD(9) INTMASK(' , 0') DECPNT('.') FRACMASK(' ') FILLCHAR('*') NEGSTS(' ERROR **')

FIELDA: Logical mask is 'b,bb0.bbbbbbbbbbb' or 'b,bb0.bbbERRORb**' (Both use the * as the fill character) Edited result is ***12.34bbbbbbbbb FIELDB: Same logical mask Edited result is ***12.34bERRORb** FIELDC: Same logical mask Edited result is *****.00bbbbbbbbb or, if ZEROBAL(*NO) had been specified, ********bbbbbbbbb

IBM command documentation

Generated from os/cl/catalog/CRTEDTD.json and os/cl/help/CRTEDTD.json.