1 | Edit mask | Output | Char(256) |
2 | Edit mask length | Output | Binary(4) |
3 | Receiver variable length | Output | Binary(4) |
4 | Zero balance fill character | Output | Char(1) |
5 | Edit code | Input | Char(1) |
6 | Fill or Floating currency indication | Input | Char(1) |
7 | Source variable precision | Input | Binary(4) |
8 | Source variable decimal positions | Input | Binary(4) |
9 | Error code | I/O | Char(*) |
The Convert Edit Code (QECCVTEC) API translates an edit code specification into an edit mask, which is a byte string used to format a numeric value into a readable character string.
Returns the edit mask generated by this call. The actual length of the edit mask is returned in the edit mask length parameter. The area beyond the actual length of the edit mask is filled with hexadecimal zeros.
The value returned to this parameter should be passed to the Edit (QECEDT) API or the edit machine instruction.
The actual length of the edit mask.
The value returned in this parameter should be passed to the QECEDT API or used to substring the value returned in the edit mask in the edit machine instruction.
Returns the length of the output that is produced by the returned edit mask when it is used.
The value returned in this parameter should be passed to the QECEDT API or used to substring the receiver variable in the edit machine instruction.
Indicates how to perform the edit so that zero balance suppression is done correctly for those edit codes that have zero balance suppression.
The value returned in this parameter should be passed to the QECEDT API or used to determine whether zero suppression requires special handling before issuing the edit machine instruction.
The edit code that is to be translated into an edit mask. The valid values are:
A-D
J-Q
W
Y-Z
1-9
For more information on edit codes, see the discussion of the EDTCDE keyword in the DDS Reference: Display Files.
Indicates how the output should be padded on the left. This parameter should be specified as follows:
" " | Blank fill: All suppressed zeros are replaced with blanks. |
"*" | Asterisk fill: All suppressed zeros are replaced with asterisks. |
Character | Blank fill: The specified character is used as a floating currency symbol and placed to the left of the first nonsuppressed digit. Characters are X'41' to X'FE'. |
Note: You can optionally specify asterisk fill or floating currency symbol with edit codes 1 through 4, A through D, and J through Q.
The precision of the numeric variable that is edited with the edit mask. Precision is the displayed length of a field, not including the decimal point. The valid ranges depend on the value specified for the edit code.
Edit Code | Range |
---|---|
W | 5-8 |
Y | 3-8 |
All others | 1-31 |
The precision of the numeric variable depends on its class:
Variable Class |
Precision |
---|---|
Packed | The precision for which the variable was declared. For example, PACKED(8,4) has precision 8. |
Zoned | The precision for which the variable was declared. For example, ZONED(8,4) has precision 8. |
Binary(2) | 5 |
Binary(4) | 10 |
Notes:
The number of digits that the source variable precision parameter has placed after the decimal point in the edited output. The value must be less than or equal to source variable precision, but greater than 0. The normal value depends on the class of the source variable precision parameter:
Variable Class |
Decimal Position |
---|---|
Packed | The number of decimal positions for which the variable was declared. For example, PACKED (8,4) has 4 decimal positions. |
Zoned | The number of decimal positions for which the variable was declared. For example, ZONED (8,4) has 4 decimal positions. |
Binary(2) | 0 |
Binary(4) | 0 |
The structure in which to return error information. For the format of the structure, see Error Code Parameter.
Message ID | Error Message Text |
---|---|
CPF2620 E | Field longer than integer or fraction mask. |
CPF2639 E | Edit mask too large. |
CPF27B2 E | Edit code not valid. |
CPF27B3 E | Fill/floating currency indication not valid. |
CPF27B4 E | Source variable precision not valid. |
CPF27B5 E | Source decimal position not valid. |
CPF3C90 E | Literal value cannot be changed. |
CPF3CF1 E | Error code parameter not valid. |
CPF9801 E | Object &2 in library &3 not found. |
CPF9802 E | Not authorized to object &2 in &3. |
CPF9872 E | Program or service program &1 in library &2 ended. Reason code &3. |
Top | Edit Function APIs | APIs by category |