Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

Reality V15.2 Online Documentation (MoTW) Revision 3

SET-FILE (TCL) (m604806+setfile.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

SET-FILE

Creates a file synonym definition item (Q-pointer) in your current account MD to allow access to a file in another account, or in your current account by a different name.

Note: The syntax /account/file allows you to access a file on another account without setting up a temporary or permanent Q-pointer.

Syntax

SET-FILE {account-name {file-specifier} {?} {(options}}

Syntax elements

account-name is the name of the account containing the file you want to access.

The system verifies the named account as a valid account and prints an error message if the named account is not found. The 'B' or 'N' option inhibits account-name verification.

file-specifier is the name of the file for which the Q-pointer is being set up.

The system verifies the named file as a valid file on the specified account and prints an error message if the named file is not located. The 'B' or 'N' option inhibits file-name verification.

? displays current SET-FILE parameters.

Note: If you do not specify the account and file names as part of the command and do not use the question mark or D option, the system prompts for them.

Options

B Inhibits verification of user input, that is, the accountname, file-name, and data-section-name.

Caution

The B option will let you set a Q-pointer to a non-existent account or to a non-existent file.

C Configures default Q-pointer items.

H Help. Displays SET-FILE options and current parameters.

L Allows viewing (but not update) of current parameters.

N A synonym for the B option.

O Overwrites the existing Q-pointer. Used with the P or S options.

P Creates a permanent Q-pointer (name prompted for). Instead of 'QFILE', the item-id is the name of the file pointed to or any other synonym that you specify.

PS Allows you to change the name of a permanent Q-pointer previously created with the P or S option.

Q Updates a port-dependent Q-pointer; used with the P option.

S A Synonym for the P option.

V Displays the current version of the SET-FILE command.

A ? when used at the FILE NAME?  prompt provides a list of files on the specified account.

Operation

The SET-FILE command builds two temporary Q-pointers called "QFILE" and "QF*port.no" (where port.no is your current port number). These Q-pointers are maintained until SET-FILE is re-executed, thereby changing QFILE and QF*port.no.

By using the P or S option, you can create a Q-pointer with any name that you specify. This creates a permanent Q-pointer that is not changed by subsequent SET-FILE commands, unless you specifically overwrite it using the O option.

Using the PS option you can change the name of the permanent Q-pointer without changing the file pointed to.

SET-FILE has two main uses:

Examples

Example 1

In the following examples, the port number is assumed to be 5.

:SET-FILE SYSPROG BP
'QFILE' and 'QF*5' UPDATED

Creates or updates 'QFILE' and 'QF*5' to point to the 'BP' file on the 'SYSPROG' account.

Example 2

:SET-FILE
*Account = 'SYSPROG'
*File = 'BP'
ACCOUNT NAME?RECORDS
FILE NAME?ADDRESS
'QFILE' and 'QF*5' UPDATED

Creates or updates 'QFILE' and 'QF*5' to point to the 'ADDRESS' file on the 'RECORDS' account.

If you now type:

:LIST QFILE

you will get the same response as if you had logged onto the RECORDS account and then typed:

:LIST ADDRESS

Example 3

:SET-FILE ?
Help is available with the 'H' option.

Other information:
The Port-dependent Q-pointer-id is 'QF*401'.
The Non-port-dependent 'QFILE' is also in use.

Current Q-pointer contents:
*Account = REALWEB-EXAMPLES
   *File = SUBROUTINE.EXAMPLES

In this example, the current SET-FILE parameters are displayed. This command option does not display "permanent" Q-pointer items.

Example 4

:SET-FILE ACCTS (P
Use 'ACCTS' as a permanent Q-pointer id? Y
'ACCTS' created.

Sets a permanent Q-pointer named 'ACCTS' to the MD of the ACCTS account.

Example 5

:SET-FILE RECORDS ADDRESS (P
Use 'ADDRESS' as a permanent Q-pointer id? N
Enter name for permanent Q-pointer: REC.ADD
Use 'REC.ADD' as a permanent Q-pointer id? Y
'REC.ADD' created.

This example set a Q-pointer named 'REC.ADD' to the 'ADDRESS' file on the 'RECORDS' account.

RealityV15.2Revision 3Comment on this topic