z/OS Using REXX and z/OS UNIX System Services
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


v_lookup

z/OS Using REXX and z/OS UNIX System Services
SA23-2283-00

Read syntax diagramSkip visual syntax diagram
>>-v_lookup--vntoken--filename--stem--vntoken2-----------------><

Function

v_lookup invokes the v_lookup callable service to search a directory for a file. v_lookup accepts a vnode token representing a directory and a name identifying a file. If the file is found in the directory, a vnode token for the file and the attributes of the file are returned.

Parameters

vntoken
A variable name that contains the vnode token for the directory in which filename is looked up.
filename
The name of the file.
stem
The same file attribute information is returned in stem as if a v_getattr had been used on the file looked up. Upon return, stem.0 contains the number of attribute variables returned. To access the attribute values, you can use a numeric value or the predefined variables beginning with ST_ used to derive the numeric value. See stat for a list of the predefined variables, or REXX predefined variables for the numeric values.
vntoken2
The variable name for the buffer that, when returned, will contain the vnode token for the looked-up file.

Usage notes

The caller is responsible for freeing vnode tokens returned by the v_lookup service by calling to the v_rel service when they are no longer needed.

Example

In the following example, assume that dirtok and file were assigned values earlier in the exec:
"v_lookup dirtok (file) st. outtok"

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014