Updated August 2016
xcall MIAMEX, MX_GETDEV, dev, proj, prog, drbase, status {,devflags}
Each call to MX_GETDEV returns information about the next device in the device table. See the DEVICE system parameter for information about how the devices in the device table are defined. When MX_GETDEV hits the end of the device table, it returns a status code and then starts over at the beginning on the next call. You can also force it to restart at the beginning by setting the dev parameter to "".
MX_GETDEV is very similar to MX_GETERSATZ, but returns information about "real" devices rather than ersatz devices.
Parameters
dev (String), 6) [in/out]
On input, if null (""), resets the scan to the start of the device table—i.e. returns the first device in the table. On output, returns the next device in the table, e.g. "DSK1", with no trailing colon. See status.
proj, prog (b,1 or b,2) [out]
For normal device definitions, whose PPNs are implicitly defined by the existence of ###### subdirectories, these parameters will return 0. Only for devices that are explicitly defined with only a single PPN will these parameters be returned with non-zero values. In that case, if proj and proj are mapped as b,2 (preferred), the two parts of the PPN will be returned as decimal values ranging from 0-999. Although deprecated, for backwards compatibility, if proj and prog are mapped as b,1 variables, the values will be encoded as if octal (with a range of 0-377).
drbase (String), 100+) [out]
The base path for the device or device/ppn combination is returned here. It will be terminated with a trailing directory separator character, e.g. c:\vm\miame\dsk0\.
status (Num) [out]
Returns 0 on success, else 1 if it hits the end of the device table, in which case the rest of the return parameters should be ignored. Note that the next call after hitting the end of the table will return the first device in the table.
devflags (Num) [out]
If specified, returns attribute flags related to the device (zero or more of the following):
Value |
Meaning |
&h01 |
Read-only device |
&h02 |
Memory device |
See Also