MPE/iX Intrinsics Reference Manual (32650-90905)

552 Chapter9
Command Definitions (MAIL-PUTJCW)
NLKEYCOMPARE
NLKEYCOMPARE
NM and CM callable.
Compares two strings of different length (for use with KSAM generic key searching).
Syntax
CA I16V CA I16V
NLKEYCOMPARE(
generickey,length1,key,length2,
I16 I16V U16A U16A
result,langnum,error
,
collseq
);
Parameters
generickey
character array (required)
Passes the generic key to be compared to the keys contained in the record
read by FREAD.
length1
16-bit signed integer by value (required)
Contains the length, in bytes, of
generickey
, which must be less than
length2
.
key
character array (required)
Passes an entire key to which you want to compare
generickey
.
length2
16-bit signed integer by value (required)
Contains the length in bytes of
key
, which must be greater than
length1
.
result
16-bit signed integer by reference (required)
Returns the result of the compare:
Value Meaning
0 The retrieved key matches the generic key exactly for a
length of
length
.
1 The retrieved key does not match the generic key; it is
different only because of priority (for example, uppercase
versus lowercase characters or accent). The FREAD key is
still in range; records can follow whichever key matches
the generic key exactly.
2 The retrieved key is less than the generic key (its collating
order precedes the key specified). It does not match
generickey
. This means the FREAD call found a record
that precedes the range requested. Records that match
generickey
can follow.
3 The retrieved key is greater than the generic key (it