MPE/iX Intrinsics Reference Manual (32650-90875)

Chapter 9 523
Command Definitions (MAIL-PUTJCW)
NLFINDSTR
NLFINDSTR
NM and CM callable.
Searches
string1
for
string2
, and returns an integer value indicating the offset in
string1
where
string2
was found.
Syntax
I16 I16V CA I16V CA
offset
:=NLFINDSTR(
langnum,string1,length1,string2,
I16V U16A U16A
length2,error
,
charset
);
Functional Return
offset
16-bit signed integer (assigned functional return)
Returns a -1 if
string2
is not found in
string1
.
Parameters
langnum
16-bit signed integer by value (required)
Contains the language ID number.
string1
character array (required)
Contains the string of characters to be searched. It can contain 1 byte and
2 byte Asian characters.
length1
16-bit signed integer by value (required)
Passes the length, in bytes, of
string1
.
string2
character array (required)
Contains the character string to be searched for.
length2
16-bit signed integer by value (required)
Passes the length, in bytes, of
string2
.
error
16-bit unsigned integer array (required)
Returns two elements: the first element is the error number; the second
element is reserved and always returns 0. The possible error number
values are:
Value Meaning
0
Successful
1 *NLS not installed
2 *Specified language not configured