CHAR
The arguments are defined as follows:
integerExpression | integerExpression returns a value that is a built-in integer data type (SMALLINT, INTEGER, or BIGINT). The result is the fixed-length character string representation of the argument in the form of an integer constant. The result consists of n characters that are the significant digits that represent the value of the argument. If the argument is negative, the result has a preceding minus sign. The result is left justified. The result length must be 6 for a small integer, 11 for a large integer, and 20 for a big integer. Shorter results are padded on the right with blanks to achieve the required length A positive value always includes one leading blank. | ||||||||||
decimalExpression | decimalExpression returns a value that is a built-in decimal data type. The result is the fixed-length character string representation of the argument. The result includes a decimal point and up to p digits; p is the precision of the decimalExpression with the preceding minus sign if the argument is negative. If the number of bytes in the result is less than the defined length of the result, the result is padded on the right with blanks. The decimal point character is a period (.) or a comma (,) based on DSNHDECP specifications. | ||||||||||
floatingExpression | floatingExpression returns a value that is a built-in floating-point data type (DOUBLE or REAL). The result is the fixed-length character string representation of the argument in the form of a floating-point constant. The length of the result is 15 bytes for a short floating point and 23 for a long floating point in the following format: +/-.mE+/-nn / denotes an OR condition, m represents mantissa, and n represents an exponent. | ||||||||||
decfloatExpression | decfloatExpression returns a value that is a built-in decimal floating data type (long or short). The result is the fixed-length character string representation of the argument in the form of a floating-point constant. The length of the result is 34 bytes for a short decfloat and 42 for a long decfloat in the form of: +/-.mE+/-nnn and 42 bytes for a long floating point number in the following form: +/-.mE+/-nnnn / denotes an OR condition, m represents mantissa, and n represents an exponent. If the DECFLOAT value is one of the special values INFINITY, SNAN, or NAN, the strings INFINITY, SNAN, or NAN, respectively, are returned. If the special value is negative, a minus sign is the first character in the returned string. | ||||||||||
stringExpression, length | stringExpression must be an expression that returns a value of a built-in character string whose length equals the value of the length argument. The length value must be an integer constant not exceeding 255. | ||||||||||
datetimeExpression, format datetimeExpression, string | datetimeExpression must be an expression that is one of the following built-in data types:
The expression is converted to an external format using the format template, if applicable. You must define the format as follows:
|