CBL_NLS_COMPARE

Compares two strings.
Restriction: National Locale Support is only supported for native COBOL code.

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 Key) Picture
string1 pic x(n). pic x(n).
string2 pic x(n). pic x(n).
string1-length cblt-os-size pic x(4) comp-5

or

pic x(8) comp-5 (64-bit native programs only)

string2-length cblt-os-size pic x(4) comp-5

or

pic x(8) comp-5 (64-bit native programs only)

result-byte cblt-sx1-comp5 pic s9(2) 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