SET-FILE Command

The SET-FILE command is used to create a temporary Q-pointer. It is a Proc that requires two parameters: the name of the account where the file is located and the name of the file. It creates a File Synonym Definition item named QFILE in the Master Dictionary containing this information. Each use of the SET-FILE command overwrites the previous contents of the item.

This type of file synonym is especially useful in applications for establishing access to a file in another account in order to run INFO/ACCESS reports or to copy items from the file. For example, suppose you created a cataloged BASIC program named PHONE-LOG and then you wanted to make it available in two other accounts. To do that, you have to copy the command from your Master Dictionary into the other accounts. SET-FILE can be used to create a temporary file pointer to the Master Dictionary of each account.

>SET-FILE STAFF MD

'QFILE' UPDATED

 

>COPY MD PHONE-LOG

TO: (QFILE

   1 PHONE-LOG

 

1 ITEMS COPIED

 

>SET-FILE SALES MD

'QFILE' UPDATED

 

>COPY MD PHONE-LOG

TO: (QFILE

   1 PHONE-LOG

 

1 ITEMS COPIED

Once you have created the QFILE item, you can make a copy of it under a new name in your Master Dictionary. This is an alternative way to create a permanent Q-pointer instead of using the Editor.

For example, to create a permanent Q-pointer to the Master Dictionary of the SALES account, enter:

>COPY MD QFILE (D)

TO: SALES

This command makes a copy of the QFILE item under the name SALES and deletes the original QFILE item from the Master Dictionary.

See Also

File Synonyms

Creating Q-Pointers