selnew - Create a New Work File


If the list of objects belonging to a change request needs to be stored in a global rather than a local array, a unique key to the ^%vcsel work file is required. This key can be any non-numeric value. It is the responsibility of the calling program to ensure that the key is not already in use by another process. This function can be used to allocate a guaranteed unique key which can be used once and discarded.

It is the responsibility of the calling program to delete the work file contents after use.

Usage:

set ok=$$selnew^%vcapi(userid,.key,.count,type,.err)

Inputs:

userid VC/m user ID (derived from host operating system if null)
type Arbitrary string identifying type of contents of work file (by convention "O" is used for objects)

Outputs:

$$vcsel 1 = Operation succeeded
0 = Operation failed
key Guaranteed unique key to ^%vcsel work file global
count Number of items in work file (always 0 for a new work file)
err Error message if operation failed