SET-FILE Command

The SET-FILE command sets up a Q-pointer named QFILE in the Master Dictionary of the current account. This command is useful for permitting immediate access to a file in another account, perhaps to make a copy of it. Each use of the SET-FILE command redefines the QFILE item.

Format

SET-FILE account filename

Parameter(s)

account

Name of the account that has the file you want the Q-pointer to point to.

filename

Name of the file you want the Q-pointer to point to.

Description

SET-FILE creates or updates an item in the Master Dictionary called QFILE, which points to the account and file you specify. The file must be referenced by the name QFILE, not by its own name.

The SET-FILE command prompts you to enter the name of the account and the file name if you do not include them in the SET-FILE statement.

Setting Up a Temporary Q-pointer

The following example shows how to set up a Q-pointer to the file CUSTOMERS in the ACCOUNTS account:

>SET-FILE

ACCOUNT NAME ?ORDER-ENTRY

Enter the name of the account. Next you are prompted for the file name:

FILE NAME ?CUSTOMERS

Enter the file name. The first time you use SET-FILE, the following message is displayed:

'QFILE' ADDED

Once a QFILE item exists, the following message is displayed:

'QFILE' UPDATED

To list the contents of the CUSTOMERS file, all you need enter is:

>LIST QFILE

If you want to make a permanent Q-pointer to the CUSTOMERS file in the ORDER-ENTRY account, make a copy of it:

>COPY MD QFILE

   TO: CUSTOMERS

   1 QFILE TO CUSTOMERS

 

1 ITEMS COPIED