NET/MASTER Network Control Language (NCL) Reference Manual

&SYS.FILE.ID
System Variables
106126 Tandem Computers Incorporated 5–39
&SYS.FILE.ID The &SYS.FILE.ID system variable contains the current local file identifier.
&SYS.FILE.ID
Considerations
&SYS.FILE.ID is useful when you are using multiple local file identifiers and you
wish to know the current one.
For more information on this system variable, and an example of its use, refer to
the NonStop NET/MASTER NCL Programmer’s Guide.
Example
In the following example, the procedure FILE_ID opens a file and displays its current
local file identifier. This example shows that a file can have more than one local
identifier:
FILE_ID:PROCEDURE
&ID=OUR_FILE
/* open a file */
FILE OPEN UDBID=&ID ID=LOCAL_1
/* then display its local ID */
SAY &SYS.FILE.ID "IS THE CURRENT LOCAL FILE IDENTIFIER"
/* open the same file with a different local identifier */
FILE OPEN UDBID=&ID ID=LOCAL_2
/* then display the new local ID */
SAY &SYS.FILE.ID "IS THE CURRENT LOCAL FILE IDENTIFIER"
END FILE_ID