MV.QPNTR Statement  
Previous  Top  Next

Description  
 
This routine will open the file Filename in account AccountName and create an MD record entry with the id contained in Qfilename.  
 
Syntax  
 
MV.QPNTR (AccountName, Filename, Qfilename, Option, FileVar, Error)  
 
Variable Name
Description
Range
AccountName
Account name or direct path to the account where the file resides.

Filename
File name to be pointed to

Qfilename
Name of the MD record to store the q-pointer file

Option
See below for a list of options

FileVar
Variable to store the opened file variable

Error
"0" if opened successfully, "1" unsuccessful

     
 
A q-pointer is a record in the MD of the local account that points to a file that resides in a different account. To make the q-pointer easy to understand, if the q-pointer refers to an account that is actually another q-pointer in the account AccountName then the object q-pointer will become this q-pointer. This routine will repeat the q-pointer to q-pointer until the true file is uncovered.  
 
The opened file variable will be returned in FileVar.  
 
If an error occurs and the file cannot be opened the variable Error will return the value "1". If the routine detects an infinite loop, the error value will be "2".  
 
The value of Option determines how the routine functions:  
 
Option
Description
A
Open the DATA portion of the q-pointer file and stored it in FileVar.
I
Open the DICT portion of the q-pointer file and stored it in FileVar.
M
Return the q-pointer's account in AccountName and the file in Filename.
R
Store the contents of the resulting q-pointer record in Qfilename but this does NOT open the file into FileVar.
O
Used in conjunction with "R" will open the file to FileVar.
B
Build the q-pointer and records it in the MD even if there is an error.
Blank
Build the q-pointer and records it in the MD unless there is an error.
D
Open the q-pointer to FileVar but does not store the q-pointer in the MD.
P
AccountName is defined as a path and not a name in SYSTEM.
L
Filename or the resulting q-pointer file can reside in the local account.
S
Suppresses any error message.
 
 
document Remarks  
 
prcarrow If an error exists, unless option "B" is used, the q-pointer record is NOT recorded to the MD.