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

Working With Edit Files
Working With Files
106160 Tandem Computers Incorporated 12–101
Working With Edit
Files
The structure of records in an edit file is briefly described earlier in this section. This
subsection describes how to work with edit files from an NCL process. It does so by
presenting a series of code segments that you can use when you create your own NCL
procedures. The code segments show the following:
How to create the file from the OCS command input line
How to open an edit file for system-wide access from an NCL process
How to open an edit file for use by an NCL process and specify how its data is
organized
How to get (retrieve) a record from an edit file
Comments throughout each code segment describe how it works. A complete
example of an NCL procedure that works with edit files is included at the end of this
subsection.
Note You cannot add a record to, update a record in, or delete a record from an edit file from an NCL process.
Creating the File As a general rule, it is not useful to create an edit file from an NCL process because
NCL cannot add records to the file. However, you can use FUP or EDIT to create an
edit file from the OCS command input line.
The following FUP command creates an edit file from the OCS command input line:
OPSYS SEND FUP CREATE $DATA2.JOHNNCLS.EDITFILE, CODE 101
The following FUP command purges the edit file:
OPSYS SEND FUP PURGE $DATA2.JOHNNCLS.EDITFILE !
The following FUP command terminates the session with FUP:
OPSYS EOF FUP