Guardian Procedure Calls Reference Manual
devices that match the specified parameters satisfy the search. The range of valid logical device
number input values is 0 through 65375.
You can also specify a starting value of 65535 to request a search starting with the
lowest-numbered logical device in the system. This alternative is equivalent to specifying a
starting value of 0, and is provided only for compatibility with previous RVUs.
On return, ldevnum receives the number of the first matching logical device, if one exists. The
ldevnum remains unchanged if no such logical device exists. If ldevnum is out of range on
input, GETDEVNAME returns a status value of 2 (no logical device exists whose logical
device number is greater than or equal to ldevnum) and ldevnum remains unchanged.
NOTE: The calling program must treat ldevnum as unsigned. This exception exists for
compatibility with previous RVUs.
It was formerly possible to request a search starting at the lowest logical device in the system
by passing any negative number in ldevnum. This functionality still exists, but the negative
number must be either -1 or the equivalent unsigned value (65535). An arbitrary negative
number is no longer accepted.
devname
output
INT:ref:4
returns the device name or volume name of the designated device, if it exists, or the next higher
(numerically) logical device if the designated device does not exist. The devname remains
unchanged if no higher logical device exists.
sysnum
input
INT:value
specifies the system (in a network) that is searched for ldevnum. If omitted, the local system
is assumed.
devtype
input
INT:value
specifies an optional device type qualifier. If specified, the device type has to match the
designated device. If they do not match, the device is ignored and the search continues.
devsubtype
input
INT:value
specifies an optional device subtype qualifier. If specified, the device subtype has to match
the designated device. If they do not match, the device is ignored and the search continues.
Returned Value
INT
A status value that indicates the outcome of the call:
Successful; the name of the designated logical device is returned in devname.0
The designated logical device does not exist. The logical device number of the next higher device is returned
in ldevnum; the name of that device is returned in devname.
1
There is no logical device with devname equal to or greater than devname which matches the devname
and devsubtype parameters, if supplied.
2
658 Guardian Procedure Calls (G)