NET/MASTER Network Control Language (NCL) Programmer's Guide
Controlling Access to a UDB or UDB Pair by NCL
Working With Files
106160 Tandem Computers Incorporated 12–21
Controlling Access to
a UDB or UDB Pair by
NCL
After you have created a UDB or UDB pair, opened it for system-wide access from
NonStop NET/MASTER MS, and assigned it a UDB ID, then an NCL process can
access the UDB or UDB pair and the data contained therein by using the FILE verbs.
Table 12-1 summarizes the FILE verbs. Table 12-2 summarizes the FILE verbs and
Enscribe file types supported by NCL. These tables appear earlier in this section. The
following subsections discuss how to use the FILE verbs in detail. This subsection lists
the system variables set by the FILE verbs, briefly discusses the &SYS.FILE.RC system
variable, and briefly explains how to handle run-time file errors.
System Variables Set by
FILE Verbs
When attempting to open a UDB or UDB pair from an NCL process, or when
performing other operations on UDBs or UDB pairs, the FILE verbs set system
variables to indicate the success or failure of an operation. You can test these system
variables from an NCL process after a FILE verb has completed its operation. The
FILE verbs set the following system variables:
&SYS.FILE.ERROR
&SYS.FILE.ID
&SYS.FILE.KEY
&SYS.FILE.PATH
&SYS.FILE.RC
&SYS.FILE.RCNT
&SYS.VARCNT
&SYSMSG
Refer to the NonStop NET/MASTER NCL Reference Manual for information on each
system variable.
Return Codes in
&SYS.FILE.RC
The &SYS.FILE.RC system variable contains a return code after each FILE verb
completes its operation, which indicates the result of the operation. For each FILE
verb, the meaning of each return code is described in the NonStop NET/MASTER NCL
Reference Manual.
Handling Run-Time File
Errors
You can handle run-time file errors in an NCL process by using either the ERROR or
the FILE_ERROR error handler. These error handlers are discussed in Section 7,
"Run-Time Error Handling."