Convert Character String to 64-Bit Integer (CEE4JSTN) API
Required Parameter Group:
1 | input_string | Input | VSTRING |
2 | length | Input | INT4 |
3 | output_integer | output | INT8 |
Omissible Parameter:
5 | fc | Output | FEEDBACK |
Service Program Name: QLEMF
Default Public Authority: *USE
Threadsafe: Yes
The Convert Character String to 64-Bit Integer (CEE4JSTN) API converts a character string representation of an integer to its 64-bit integer equivalent.
Authorities and Locks
None.
Required Parameter Group
- input_string (input)
- A character string representing the integer that needs to be formatted. The
valid range for signed integer is (-263) < x < (263
- 1). The range for unsigned is (0 < x < 264 - 1).
The following rules apply to input_string.
The decimal separator is retrieved from the job attributes. The input string is scanned left to right until the decimal point or end of string is reached. Any character to the right of the decimal point will be ignored.
Multiple - and + are allowed. The first sign, starting from right to left will indicate the sign of the input.
Imbedded spaces, "-", "+", "." and "," are valid characters.
For examples of this process, see Examples.
- length (input)
- A 32-bit binary integer representing the number of characters in the input
string provided including the sign.
- output_integer (output)
- A 64-bit storage in which the result is stored.
Omissible Parameter
- fc (output)
- A 12-byte feedback code passed by reference. If specified as an argument, feedback information (a condition token) is returned to the calling procedure. If not specified, and the requested operation was not successfully completed, the condition is signaled to the condition manager.
Feedback Codes and Conditions
CEE0000 | The API completed successfully |
Severity: 00 | |
CEE2537 | Intput string contains characters that are not valid |
Severity: 30 | |
CEE2539 | Intput integer is too large or too small |
Severity: 30 | |
CEE9902 | Unexpected user error occurred in &1 |
Severity: 30 |
Examples
In the following examples, "." is the decimal separator.
Input | Output |
---|---|
" +241-" | -241 |
" +1 001.23-" | -1001 |
" 537,072.34+ " | 537072 |
API introduced: V4R3
[ Back to top | ILE CEE APIs | APIs by category ]