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


v_remove

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

Read syntax diagramSkip visual syntax diagram
>>-v_remove--vntoken--filename---------------------------------><

Function

v_remove invokes the v_remove callable service to remove a directory entry.

Parameters

vntoken
A variable name that contains the vnode token for the directory from which filename is to be removed.
filename
The name for the directory entry. The directory entry could be identified by a name for a file, the name of a hard link to a file, or the name of a symbolic link.

Usage notes

  1. If the name specified refers to a symbolic link, the symbolic link file named by filename is deleted.
  2. If the v_remove service is successful and the link count becomes zero, the file is deleted. The contents of the file are discarded, and the space it occupied is freed for reuse. However, if another process (or more than one) has the file open or has a valid vnode token when the last link is removed, the file contents are not removed until the last process closes the file or releases the vnode token.
  3. When the v_remove service is successful in removing a directory entry and decrementing the link count, whether or not the link count becomes zero, it returns control to the caller with RETVAL 0. It updates the change and modification times for the parent directory, and the change time for the file itself (unless the file is deleted).
  4. You cannot remove a directory using v_remove. To remove a directory, refer to v_rmdir.

Example

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

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014