NC.OPENFL Statement  
Previous  Top  Next

Description  
 
This routine will open a file and store the file's details in the OSMOSiS standard file variable.  
 
Syntax  
 
Uses the common area to pass the required processing information:  

Common Variable
Description of how the variable is used
Ranges
Param
The file name to be opened and type of file
Any valid file.

Attribute 1 is the file name


Attribute 2 is "1" if the file is an indirect file i.e. the file name in attribute 1 is formatted
0 to 23
 

An indirect file is a file in another account but the file is not referenced as a q-pointer in the current account. The file name must therefore be formatted:  

·Account Name followed with a comma then the File Name.  

The file is opened into the COMMON area NCFL (xx) where xx is the number in the array that is returned in the variable Param.  

The file name is stored in the COMMON variable NCMFL (3)<1,xx>.  

There are a few special cases and validations performed:  

·The record called SYSTEM in the file _CONTROL can be used to "lock" whole files for processes performed within OSMOSiS only. Attribute 2 in the record contains a list of the files that are locked. If a file open is attempted with NC.OPENFL and the file is locked by this method it will return the error:  

·"fff: File is LOCKED at the moment please wait!" where fff is the file name.  


·If the file name is "fff,?" where fff is a valid file and the "?" means that the "shared" file is to be entered by the operator.  
 
The routine will request:  

·"Enter File Name:"  

document Remarks  

do-it Be careful not to affect one of NCFL without the corresponding NCMFL (3)  

do-it The file name entered will be attached to the "fff," and the shared file will be opened in the normal way. The entered file name is returned in PARAMS (3).  

do-it An alternative routine is also supplied that does not use the common area to pass data but fields are defined within the CALL statement. See the next page MV.OPEN.FILE. The routines are slightly different.