Finds first object matching a name pattern.
Syntax
01 SPOBJHANDLE PIC S9(9) BINARY.
01 NAME-IN PIC X(60).
01 NAME-OUT PIC X(60).
01 OUTLEN PIC S9(9) BINARY VALUE 60.
01 SPRETCODE PIC S9(9) BINARY.
*
- NOTE: IF THE INPUT STRING IS NOT TERMINATED
- BY MOVING X'00' TO THE END, LANGUAGE ENVRONMENT
- MAY APPEND DATA CAUSING UNEXPECTED RESULTS!
- MOVE "P*" TO NAME-IN. MOVE X"00" TO NAME-IN (3:1).
CALL ‘SPOFFNM'
USING SPOBJHANDLE, NAME-IN,
NAME-OUT, OUTLEN, SPRETCODE.
Arguments
SPOBJHANDLE The handle of the opened object file. Input.
NAME-IN A string containing the name (or wildcard) to search for.
Wildcards consist of one or more letters of the name, followed by an asterisk, e.g., "AP*". Input.
NAME-OUT A buffer to be filled with the identifier of the object matching the name pattern. Output.
OUTLEN The size of the buffer that contains the identifier of the object matching the name pattern. If the buffer size is smaller than the identifier, the identifier is truncated. Input.
Return Values
PIP-ERROR
PIP-NOT-FOUND PIP-OK
SPOFOP.
Prerequisites
Alternates
None.
Notes
This procedure returns the identifier of the object that matches the name pattern entered. Use SPOFN to retrieve the next object with identifier matching the name pattern.
If no name string is matched, the procedure returns PIP-NOT-FOUND.