Creating Aliases to Files
When you create a file, this original file is known as a base file. Later, you can create an alias to the file and place it in another directory. The alias is a pointer to the base file; the base file does not move, and you are not creating a copy of it.
Aliases allow you to refer to a single file in more than one directory, or more than once in one directory. Aliases also let two different users refer to the same file using different names.
When entering most CMS commands, you do not need to be concerned with whether a file is a base file or an alias. All CMS commands will work on the file name you specify, regardless of whether it is a base file or an alias.
Aliases can be created only in FILECONTROL directories. They cannot exist in DIRCONTROL directories. You can, however, create an alias in a FILECONTROL directory that refers to a base file in a DIRCONTROL directory.
Aliases are useful for pointing to the same information from two directories, or from two different places within the same FILECONTROL directory. For example, assume that Jim is the owner of a file called PRICE LIST. PRICE LIST is within the directory Jim uses for the files for Project A1, called PROJA. When Jim is assigned a second project, he creates a separate FILECONTROL directory to contain files for the new project.
If Jim needs to use the same pricing information for both Project A1 and his new project, Project EZ, he may find it useful to create an alias for PRICE LIST in the new directory. He can name the file EZ PRICES in the new directory. EZ PRICES is then an alias to the base file, PRICE LIST. If he wanted to XEDIT the price information, he could specify either name. The advantage to making an alias to the base file, instead of a copy of the file, is that he could make changes to either file, and the change would be reflected in both files.
An alias does not have to be created from a base file; you can create an alias to an alias. Once Jim creates the alias EZ PRICES, he can create an alias to EZ PRICES if he needs the same information for a third project, Project NEW. Internally, CMS ensures that all aliases point directly to a base file, regardless of how they are created.
create alias price list .proja ez prices .projez
create alias ez prices .projez new prices .projnew
Aliases are most useful when sharing files. The other user can erase, rename, or relocate aliases to your file without affecting your base file. Also, if you change the name of your base file, a user who has an alias to it will still be able to share the file. CMS will automatically update the pointer so that the alias still refers to the same base file.
- Mike can grant Terry read or write authority for the LOTS TODO file. Terry could then create an alias to the file in one of her own FILECONTROL directories. She could call it MIKE JOBS. Then every time she wanted to work with the file, she could XEDIT her alias MIKE JOBS. While Terry would have the alias called MIKE JOBS, the base file, LOTS TODO, is still owned by Mike.
- Terry could grant Mike write authority for one of her FILECONTROL directories, and Mike could create an alias for Terry within that directory. He could create for her an alias called TERRY JOBS as a pointer to the LOTS TODO file. When Terry wanted to work with the file, she would XEDIT her alias, TERRY JOBS.
Either way, once Terry has an alias to the file, she and Mike would be able to XEDIT the same information.