AIX | HP-UX | Linux | OS/2 | OS/390 | OS/400 | PTX | SUN | Win NT |
|
|
|
|
| X |
|
|
|
Purpose
Converts NUMERIC, DECIMAL, INTEGER and SMALLINT data types that are returned as a result of an SQL operation for the DTW_SQL language environment. The variable DTW_EDIT_CODES is a string of characters that correspond to the resulting columns of the table that DTW_SQL LE will build; for example, the fifth character in DTW_EDIT_CODES will be applied to the fifth column of the result set if that column is one of the supported types. This single character can be any of the supported system supplied edit codes that are defined in Data Description Specification Reference.
For example, a DECIMAL(6,0) field would normally be displayed as the character string '112698'. By specifying an edit code of 'Y' for that column in the variable DTW_EDIT_CODES, the corresponding column in the resulting table is displayed as a character string that represents the date of '11/26/98'.
Tip: Applying a user-supplied edit code to a column that results in a character string with non-numeric characters (such as commas or currency symbols) can cause syntax errors if the character string is sent back to the server for subsequent processing within a Net.Data macro. For example, the non-numeric column value might be used for numeric comparisons in subsequent DTW_SQL functions calls, causing syntax errors.
Specify the value of this variable using a DEFINE statement or with the @DTW_ASSIGN() function.
Values
DTW_EDIT_CODES="edit_code"
Table 12. DTW_EDIT_CODES Values
Values | Description |
---|---|
edit_code | Specifies a string of characters that correspond to the resulting columns of the table that the SQL language environment builds. |
Examples
Example 1:
@DTW_ASSIGN(DTW_EDIT_CODES "JJLJJ*******Y")