NET/MASTER Network Control Language (NCL) Programmer's Guide

Controlling Access to UDBs by NonStop NET/MASTER MS
Working With Files
106160 Tandem Computers Incorporated 12–17
3. Write an NCL procedure called PROC1 that refers to a UDB with the identifier of
UDBID1. The NCL procedure has statements such as the following:
FILE OPEN ID=UDBID1 FORMAT=MAPPED MAP=$NCL
FILE GET ID=UDBID1 OPT=KLT ARGS
FILE PUT ID=UDBID1 ARGS
FILE CLOSE ID=UDBID1
If the NCL procedure is executed at this stage, all FILE verbs in PROC1 refer to
LOGFILE1 since LOGFILE1 is associated with the UDB ID of UDBID1.
4. Dissociate UDBID1 from LOGFILE1 using the following UDBCTL command:
UDBCTL STOP=UDBID1
5. Associate UDBID1 with LOGFILE2 using the following UDBCTL command:
UDBCTL $DATA.SUBVOL.LOGFILE2=UDBID1
If the NCL procedure is executed at this stage, all FILE verbs in PROC1 refer to
LOGFILE2 since LOGFILE2 is associated with the UDB ID of UDBID1.
Closing UDBs From Access
by NonStop NET/MASTER
MS
You can use the UDBCTL CLOSE command to close a UDB or UDB pair from
system-wide access. This closes the UDB or UDB pair and executes an implicit
UDBCTL STOP command for the associated identifier. Accordingly, the UDB or UDB
pair must not be in use: otherwise, the operation fails.
The following example closes the UDB MYFILE:
UDBCTL CLOSE=$DATA.SUBVOL.MYFILE
The following code segment closes access to a UDB using the INTCMD verb from an
NCL process:
INTCMD "UDBCTL CLOSE=$DATA.SUBVOL.MYFILE"
INTREAD
The following example closes a UDB pair:
UDBCTL CLOSE=($DATA.SUBVOL.MYFILE1,$DATA.SUBVOL.MYFILE2)
The following code segment closes access to a UDB using the INTCMD verb from an
NCL process:
INTCMD "UDBCTL CLOSE=($DATA.SUBVOL.MYFILE1,",
"$DATA.SUBVOL.MYFILE2)"
INTREAD
Note You must use the name of the UDB or files in the UDB pair when you close the UDB or UDB pair, not the
associated UDB ID.