Convert Edit Word (QECCVTEW) API


  Required Parameter Group:


  Optional Parameter Group:


  Default Public Authority: *USE

  Threadsafe: Yes

The Convert Edit Word (QECCVTEW) API translates an edit word specification into an edit mask. This is useful when one of the standard or user-defined edit codes does not provide the editing required.

Authorities and Locks

None.


Required Parameter Group

Edit mask
OUTPUT; CHAR(256)

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.

Edit mask length
OUTPUT; BINARY(4)

Returns the actual length of the edit mask parameter.

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.

Receiver variable length
OUTPUT; BINARY(4)

The actual 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 value returned in the receiver variable in the edit machine instruction.

Edit word
INPUT; CHAR(*)

The edit word is translated into an edit mask. If the optional currency symbol parameter is not used, the character in the system value QCURSYM is treated as a currency symbol if it appears in the edit word.

Edit word length
INPUT; BINARY(4)

The actual length of the edit word. The value passed must be from 1 through 256.

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter.


Optional Parameter Group

Source length
INPUT; BINARY(4)

The length of the source data that is to be edited. The length used is the same as the value that would be used for the source variable precision parameter of the QECEDT API.

An edit word may begin with a zero suppression character. If it does, two different edit word combinations can be provided:

  • The zero suppression character and the remaining number of replacement characters equals the source length. This provides suppression of the leading zero, only.
  • The zero suppression character plus the replacement characters is one more than the source length. This results in no zero suppression.

If the edit word provided is the second form, use this parameter. Otherwise, an incorrect edit mask is generated because QECCVTEW assumes the first form of editing is intended.

Currency symbol
INPUT; CHAR(1)

The currency symbol to be placed in the edited output. If this value appears in the edit word, it is used as the currency symbol.

If the value passed for currency symbol is X'00' (HEX zero), the API uses the system value QCURSYM as the currency symbol.


Error Messages



API introduced: V2R2

[ Back to top | Edit Function APIs | APIs by category ]