Mapping Filespecs

Because the operating systems where A-Shell typically runs all use a multi-level hierarchical directory system, we map the DevPPN-style devices and PPNs to hierarchical directories using DEVICE statements in miame.ini. A couple of simple examples should make the concept relatively clear:

DEVICE=DSK0 C:\VM\MIAME\DSK0\     ;(Windows)

DEVICE=DSK0 /myapp/dsk0/          ;(UNIX)

The above definitions equate the A-Shell device named DSK0 with the directory C:\VM\MIAME\DSK0\ (Windows) and with /myapp/dsk0/ (UNIX). To these base directories, we would convert the PPN into a six digit number, using three digits for the Project number and three digits for the Programmer number. Thus, DSK0:[1,4] would get mapped to C:\VM\MIAME\DSK0\001004\ in the first case and /myapp/dsk0/001004 in the second. Finally, the filename is appended to the end. So, DSK0:COPY.LIT[1,4] would be mapped to C:\VM\MIAME\DSK0\001004\COPY.LIT in the first case (Windows) and to /myapp/dsk0/001004/copy.lit in the second. Under UNIX, we fold the filespec to lower case to be consistent with typical UNIX conventions. Each DevPPN or A-Shell device must be mapped to a native path, as in the examples above, but each definition can be entirely independent and arbitrary. It is also possible to map individual PPNs to arbitrary native directories.