Introduction to Data Management

Managing Records With ENSCRIBE
4-6 15873 Tandem Computers Incorporated
Creating and
Accessing
ENSCRIBE Files
Before a program can access a disk file, you must create that file. At this point, you
specify the name of the file, whether the file is permanent or temporary, and the
structure of the file (key-sequenced, relative, entry-sequenced, or unstructured),
among other information. Once your file exists, you can access it through an
application program or through ENABLE or ENFORM.
Creating Files You create an ENSCRIBE file in either of two ways:
By issuing commands to FUP that specify, display, and modify file parameters
such as file type, record length, and key description, and that create the file with
those parameters. FUP accepts your commands directly from your terminal or
from a command file stored on disk.
By calling file system procedures from within your application program, using the
appropriate parameters to describe the file. Within your program, the statements
used to invoke these procedures depend on the source language in which you are
coding. In a COBOL 74 or COBOL85 program, for instance, after specifying the
file parameters in the Environment Division and the Data Division, you create the
file with an OPEN statement in the Procedure Division. As another example, in a
TAL program, you specify the file parameters through the INT and LITERAL data
declarations, and then create the file by calling the CREATE procedure.
Describing Record Formats
with DDL
To define the data objects that will be stored in your database files and used by your
application programs, you use DDL. With DDL, you can specify both record structure
and data-field characteristics. In DDL, you use statements that look very much like
COBOL Data Division statements.
DDL provides a uniform way of describing record formats, regardless of the
programming language used to access the records. With DDL, you can generate
system-wide record format definitions that present programs with a consistent view
of a given record format.
The objects in your database can include elements such as data definitions, records,
Subsystem Programmatic Interface (SPI) token codes, SPI token maps, and SPI token
types. SPI is a set of procedures for building information in command, response, and
event-message buffers, and retrieving information from those buffers. SPI provides
Tandem software subsystems such as PATHWAY and EXPAND with a uniform
interface to the applications that execute under their control.
Working with DDL entails the following tasks, using the elements illustrated in
Figure 4-2:
1. Describing the data objects with DDL statements that you enter in an EDIT file
called a source schema. Schemas are particularly useful if you have a lot of
complex data definitions; otherwise, you can describe the data objects
interactively to the DDL compiler as noted in the next step.