CBL_NLS_COMPARE

2つの文字列を比較する。

構文:
call "CBL_NLS_COMPARE" using        string1
                                    string2
                       by value     string1-length
                       by value     string2-length
                       by reference result-byte
                       returning    status-code
パラメタ:
呼び出しプロトタイプ使用時 ( 説明の読み方) PIC (32bitシステム)
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 説明の読み方 参照
入力パラメタ:

string1 1つ目の文字列
string2 2つ目の文字列
string1-length 1つ目の文字列の長さ
string2-length 2つ目の文字列の長さ
出力パラメタ:

0

result-byte 比較の結果:
0 2つの文字列が同じ長さ
-1 文字列2の方が長い string2
+1 文字列1の方が長い
status-code

ルーチンが成功したか否かを次のように示す。

0 成功
105 メモリ割当てエラー
他参照:

関連項目