CBL_NLS_COMPARE
Compares two strings.
Syntax:
call "CBL_NLS_COMPARE" using string1
string2
by value string1-length
by value string2-length
by reference result-byte
returning status-code
Parameters:
|
Using call prototype (see Library Routines - Key) |
Picture (32-bit systems) |
| string1 |
pic x(n). |
pic x(n). |
| string2 |
pic x(n). |
pic x(n). |
| string1-length |
cblt-os-size |
pic x(4) comp-5. |
| string2-length |
cblt-os-size |
pic x(4) comp-5. |
| result-byte |
cblt-sx1-comp5 |
pic s9 comp-5. |
| status-code |
See Library Routines - Key |
On Entry:
| string1 |
The first string. |
| string2 |
The second string. |
| string1-length |
Length of the first string. |
| string2-length |
Length of the second string. |
On Exit:
| result-byte |
Result of the comparison:
| 0 |
The two strings are the same |
| -1 |
string1 < string2 |
| +1 |
string1 > string2 | |
| status-code |
Indicates whether the routine was successful:
| 0 |
Success |
| 105 |
Memory allocation error | |
See Also: