Figure 6-4. Identifying a Disc File using File Designators Backreferencing a File

You can invoke a :FILE command that refers to a previously in voked :FILE command using a technique called \backreferencing." Once y ou establish a set of speci￿cations in a :FILE command, you can apply them to other ￿le references in y our job or session b y using the formal ￿le designator, preceded b y an asterisk (*). F or example, if y ou have de￿ned a ￿le named MYFILE in a :FILE command, you can later refer to all the same speci￿cations b y stating *MYFILE . This is useful when y ou want to be sure the ￿le speci￿cations for a ￿le used by one program matc h those already set up for a ￿le in another program. It also sa ves supplying the same parameters o ver again.

Whenever you reference a prede￿ned ￿le in a File System command, y ou must enter the asterisk before the formal ￿le designator if y ou want the prede￿nition to apply .

Figure 6-5 sho ws an example of bac k referencing. In this example, a :FILE command equates the formal ￿le designator EMPLOYEE in the PERSONEL program with the actual ￿le designator MASTER . At run time, the program opens a ￿le named MASTER where it speci￿es EMPLOYEE . If you wanted to run a di￿eren t program, named FINANCE , with the ￿le MASTER , back referencing allows access to it without requiring that y ou repeat all the parameters that w ere speci￿ed in the ￿rst :FILE command. The :FILE command for the FINANCE program simply bac k references the actual ￿le designator giv en in the previous :FILE command by specifying the string *EMPLOYEE . This allows access to the MASTER ￿le with all the same attributes speci￿ed in the ￿rst :FILE command.

6-10 File System