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


v_get

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

Read syntax diagramSkip visual syntax diagram
>>-v_get--vfstoken--fid--vntoken-------------------------------><

Function

v_get invokes the v_get callable service to return a vnode token for the file or directory represented by the input FID within the mounted file system represented by the input VFS token.

Parameters

vfstoken
A variable name that contains the VFS token for the file system where the file identified by fid resides.
fid
A variable that contains a file ID. File IDs are returned in the file attribute structure in the stem index ST_FID.
vntoken
A variable name that stores the vnode token for the requested file.

Usage notes

  1. The FID (file identifier) uniquely identifies a file in a particular mounted file system, and its validity persists across mounting and unmounting of the file system, as well as z/OS UNIX re-IPLs. This distinguishes the FID from the vnode token, which relates to a file in active use, and whose validity persists only until the token is released via the v_rel callable service.

    A server application uses v_get to convert an FID to a vnode token when it is preparing to use a file, since the vnode token identifies the file to the other services.

  2. The FID for a file is returned in a stem variable by such services as v_rpn and v_lookup.
  3. The caller is responsible for freeing vnode tokens returned by v_get by calling to the v_rel service when they are no longer needed.

Example

In the following example, assume that vfs and st.st_fid were assigned values earlier in the exec:
"v_get vfs st.st_fid vnod"

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014