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


v_create

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

Read syntax diagramSkip visual syntax diagram
>>-v_create--vntoken--filename--type--mode--stem--vntoken2------>

>--+--------------+--------------------------------------------><
   '-major--minor-'   

Function

v_create invokes the v_create callable service to create a new file in the directory represented by vntoken. The file can be a regular, FIFO, or character special file.

Parameters

vntoken
A variable name that contains the vnode token for the directory in which the file filename is to be created.
filename
The name of the file. It must not contain null characters.
type
A number used to specify the type of file to be created: a regular, FIFO, or character special file. You can specify one of the predefined variables beginning with S_ to set the value—for example, S_ISREG. For a list of the variables, see fstat.
mode
A three-digit number, corresponding to the access permission bits. Each digit must be in the range 07, and all three digits must be specified. For more information about permissions, see REXX predefined variables.
stem
The name of a stem variable used to return the status information. Upon return, stem.0 contains the number of variables that are returned. To obtain the desired status information, 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
A variable name that will contain the vntoken of the created file upon return.
major
For a character special file (S_ISCHR), the device major number. For a complete description, see mknod.
minor
For a character special file (S_ISCHR), the device minor number. For a complete description, see mknod.

Usage notes

  1. If the file named in filename already exists, the v_create service returns a failing return code, and no vnode token is returned.
  2. The caller is responsible for freeing vnode tokens returned by the service by calling to the v_rel service when they are no longer needed.

Example

In the following example, assume that filenm and vnod were assigned values earlier in the exec:
"v_create vnod (filenm)" s_isreg 777 "st. filetok"

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014