Edit Function APIs
The edit function APIs create and use edit masks.
An edit mask is a byte string that tells the edit machine instruction or the Edit (QECEDT) API how to format a numeric value into a readable character string. An edit mask can format a numeric value so that languages that cannot use machine instructions directly can take advantage of this function. The edit mask is defined by the Edit Code (EDTCDE) and Edit Word (EDTWRD) keywords in DDS.
An edit code is a standard description of how a number should be formatted. There are many standard edit codes defined by the system. Users can define several edit codes the way they want with the use of the Create Edit Description (CRTEDTD) command.
An edit word is a user-defined description of how a number should be formatted. An edit word usually is used when one of the standard edit codes or user-defined edit codes is not sufficient for a particular situation.
For more information about these terms, see the Data description specifications (DDS) topic collections.
The edit function APIs are:
- Convert Edit Code (QECCVTEC) 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.
- Convert Edit Word (QECCVTEW) 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.
- Edit (QECEDT) uses an edit mask to transform a numeric from its internal format to a character form suitable for displaying.
[ Back to top | APIs by category ]