Loading...
Select Version
&pagelevel(3)&pagelevel
Domain: Conversion functions
The INTEGER-TO-X-LITERAL( ) function converts an integer to an X literal containing the 4-byte long coding.
INTEGER-TO-X-LITERAL( ) is the inverse function to X-LITERAL-TO-INTEGER( ).
Format
INTEGER-TO-X-LITERAL( ) INT-TO-X-LIT( ) |
INTEGER = arithm_expression |
Result type
STRING
Input parameters
INTEGER = arithm_expression
Specifies the number or resulting value of expression to be converted
Result
String containing an X literal.
Error message
No error messages
Example
/DECLARE-VARIABLE A( TYPE= *STRING ) /DECLARE-VARIABLE B( TYPE= *INTEGER ) /A = INT-TO-X-LIT( -235736076 ) /SHOW-VARIABLE A A = X'F1F2F3F4' /B = X-LIT-TO-INT(&(A)) &* take account of & replacement /SHOW-VARIABLE B B = -235736076 /B = X-LIT-TO-INT('1234') /SHOW-VARIABLE B B = -235736076 /A = INT-TO-X-LIT( 0 ) /SHOW-VARIABLE A A = X'00000000'