# MX\_GETERSATZ > [HTML Version](mx_getersatz.htm) _Reviewed and revised April 2024_ **xcall MIAMEX, MX\_GETERSATZ, ersatz, dev, proj, prog, status** MX\_GETERSATZ (MIAMEX 11) is used to obtain information about the defined [ERSATZ](ersatz_sp.htm.md) devices. Each call returns the next defined ERSATZ device in sequence. **Parameters** _ersatz_ ([String](string.htm.md), 10+) \[in/out\] Returns the next defined ERSATZ device name without the trailing colon. To start from the beginning, set ersatz to "". Any other value is ignored on input, as it uses a static internal cursor to maintain its position in the table of definitions. _dev_ ([String](string.htm.md), 6+) \[out\] Returns the real device corresponding to the ersatz device, e.g. "DSK0" _proj, prog_ ([Num](num.htm.md)) \[out\] Return the two parts of the PPN corresponding to the ersatz device. Warning: if B1 variables are used here, the routine will translate the PPN parts into octal, which is almost certainly not what you want except in certain legacy situations. Any other type will return the normal decimal PPN values, each of which ranges from 0 to 999. See [PPN Numbering](ppnnumbering.htm.md) for the complete back story. _status_ ([Num](num.htm.md)) \[out\] Returns zero if not yet past the end of the table, i.e. indicating that the rest of the returned parameters are valid. Returns one indicating that the end of the table has been reached and the other parameters should be ignored. The next call will start over at the beginning of the table. See the _ersatz_ above for how to force it to start over at the beginning. **Comments** Note that a short-cut is available to reset to the first ERSATZ device. If the _ersatz_** **parameter is a null string, then information on the first ERSATZ device will be returned; it is not necessary to go around a loop waiting for a returned status of one. **See Also** • [MX\_GETDEV](mx_getdev.htm.md) scans the table of real, i.e. non-ersatz devices