NET/MASTER Network Control Language (NCL) Programmer's Guide
Working With Entry-Sequenced Files
Working With Files
12–44 106160 Tandem Computers Incorporated
Opening the File for Access
by NonStop NET/MASTER
MS
The UDBCTL OPEN command opens an entry-sequenced file for access by NonStop
NET/MASTER MS. The following code segment uses the INTCMD verb to execute
the UDBCTL OPEN command from an NCL process:
…
SAY "Opening "&filename
INTCMD "UDBCTL OPEN="&filename" ID="&id
INTREAD
…
Opening the File for Access
by NCL
The FILE OPEN verb opens an entry-sequenced file for access by NCL. You can open
an entry-sequenced file as mapped, unmapped, or delimited.
Opening a Mapped Entry-Sequenced File
The following code segment opens a previously created entry-sequenced file as
mapped using the map $NCL:
…
FILE OPEN ID=&id FORMAT=MAPPED MAP=$NCL
…
You can open a file as mapped using either a standard or user-defined map.
Opening an Unmapped Entry-Sequenced File
The following code segment opens a previously created entry-sequenced file as
unmapped:
…
FILE OPEN ID=&id FORMAT=UNMAPPED
…
Opening a Delimited Entry-Sequenced File
The following code segment opens a previously created entry-sequenced file as
delimited:
…
FILE OPEN ID=&id FORMAT=DELIMITED
…
Adding a Record The FILE ADD verb adds a new record to an entry-sequenced file. You can use FILE
ADD to add records to mapped, unmapped, and delimited entry-sequenced files.
When you add a record to an entry-sequenced file, the record is added to the end of
the file.
Note When used with entry-sequenced files (since you cannot update records), the FILE PUT verb performs
the same operation as the FILE ADD verb.