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

Controlling Access to UDBs by NonStop NET/MASTER MS
Working With Files
12–12 106160 Tandem Computers Incorporated
The following code segment opens MYFILE from an NCL process and assigns the
UDB an identifier:
/* Opens the UDB with a UDB ID */
INTCMD "UDBCTL OPEN=$DATA.SUBVOL.MYFILE ID=UDBID1"
The following example assigns the identifier MYFILE2 to the UDBs MYFILE1 and
MYFILE2 when you open the UDB pair:
UDBCTL OPEN=($DATA.SUBVOL.MYFILE1,$DATA.SUBVOL.MYFILE2) ID=*
The preceding example is the same as the following example:
UDBCTL OPEN=($DATA.SUBVOL.MYFILE1,$DATA.SUBVOL.MYFILE2)
ID=MYFILE2
The following code segment opens the UDB pair from an NCL process and assigns the
UDB pair an identifier:
/* Opens the UDB pair with a UDB ID */
INTCMD "UDBCTL OPEN=($DATA.SUBVOL.MYFILE1,",
"$DATA.SUBVOL.MYFILE2) ID=UDBID1"
Assigning an Identifier After a UDB or UDB Pair Is Opened. If you do not assign an identifier
when you open the UDB or UDB pair by using the UDBCTL OPEN command, you
must assign an identifier later on before NCL can work with the UDB or UDB pair.
This requires two UDBCTL commands—one to open the UDB or UDB pair, another to
assign the UDB ID.
Entering the following two commands opens a UDB and then assigns the UDB an
identifier:
UDBCTL OPEN=$DATA.SUBVOL.MYFILE
UDBCTL $DATA.SUBVOL.MYFILE=UDBID1
The following code segment opens MYFILE from an NCL process and then assigns the
identifier UDBID1 to the UDB after the UDB is opened:
/* Opens the UDB without a UDB ID */
INTCMD "UDBCTL OPEN=$DATA.SUBVOL.MYFILE"
/* Assigns a UDB ID to the UDB */
INTCMD "UDBCTL $DATA.SUBVOL.MYFILE=UDBID1"
Entering the following two commands opens a UDB pair and then assigns the UDB
pair an identifier:
UDBCTL OPEN=($DATA.SUBVOL.MYFILE1,$DATA.SUBVOL.MYFILE2)
UDBCTL ($DATA.SUBVOL.MYFILE1,$DATA.SUBVOL.MYFILE2)=UDBID1