When to Specify File Mode Letters: Reading Files
When you request that CMS access a file, you have to identify it so that CMS can locate it for you. The commands that expect files of particular file types (reserved file types) let you enter only the file name of the file when you enter the command. When you process any of these commands or process a module or exec file, CMS uses the standard search order to search all of your accessed file modes (directories and minidisks) to locate the file. Some CMS commands that perform this type of search are:
| AMSERV | GLOBAL | MODMAP |
| ASSEMBLE | LOAD | RUN |
| DOSLIB | LOADMOD | TXTLIB |
| EXEC | MACLIB |
Some CMS commands require that you enter the file name and file type to identify a file. You may specify the file mode letter; if you do not specify the file mode, CMS searches only file mode A and its extensions when it looks for the file. If you do specify a file mode letter, the file mode you specify and its extensions are searched for the file. Some commands you can use this way are:
| FILEDEF | SYNONYM | UPDATE |
| TAPE | ||
| PUNCH | TYPE |
For the STATE command, if you specify the file name, file type and file mode, CMS searches the specified disk and its extensions. If no file mode is specified, CMS searches all accessed disks in CMS search order.
There are some CMS commands that do not search extensions of file modes when looking for files. They include:
| CREATE ALIAS | GRANT AUTHORITY | RELOCATE |
| CREATE LOCK | LISTFILE | RENAME |
| DELETE LOCK | QUERY ALIAS | REVOKE AUTHORITY |
| ERASE | QUERY AUTHORITY | |
| FILELIST | QUERY LOCK |
You must explicitly enter the file mode if you want to use these commands to process files that are on extensions.
These commands search every accessed file mode, regardless of whether they have read-only status or read/write status:
NAMEFIND