Schema Processor Operation [ TurboIMAGE/XL Database Management System Reference Manual ] MPE/iX 5.0 Documentation
TurboIMAGE/XL Database Management System Reference Manual
Schema Processor Operation
The Schema Processor is a program that accepts a textfile containing the
schema as input, scans the schema and if no errors are detected,
optionally produces a root file. The Schema Processor prints a heading,
an optional list of the schema, and summary information on a listfile.
The Schema Processor executes as either an MPE/iX job or session. For
further information about sessions and jobs, refer to the MPE/iX Commands
Reference Manual. In either case, you must use the following MPE/iX
command to initiate execution of the Schema Processor:
:RUN DBSCHEMA.PUB.SYS
Table 3-5 lists the formal file designators and default actual file
designators that the Schema Processor uses for the text file and list
file. The input/output devices to which $STDINX and $STDLIST refer
depend upon the way the system is generated. However, $STDINX is the
standard job or session input device and $STDLIST is the standard job or
session output device.
Table 3-5. Schema Processor Files
-------------------------------------------------------------------------------------------------
| | | | |
| File | Use | Formal File | Default Actual |
| | | Designator | File Designator |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| textfile | Schema and Schema Processor commands | DBSTEXT | $STDINX |
| | | | |
| listfile | Output listing | DBSLIST | $STDLIST |
| | | | |
-------------------------------------------------------------------------------------------------
If you want to equate these files to some other actual file designator,
you can use the MPE/iX FILE command. If a FILE command is included in
the job stream, you must inform the Schema Processor of this in the RUN
command in the following way:
:RUN DBSCHEMA.PUB.SYS;PARM=n
where:
n = 1 if an actual file designator has been equated to DBSTEXT.
n = 2 if an actual file designator has been equated to DBSLIST.
n = 3 if actual file designators have been equated to both DBSTEXT
and DBSLIST.
NOTE Parm equals 1 or 3 is recommended for large schema files.
Table 3-6 shows sample combinations of MPE/iX RUN and FILE commands
that can be used to initiate DBSCHEMA execution.
Table 3-6. Examples of RUN and FILE Commands
------------------------------------------------------------------------------------------
| :RUN DBSCHEMA.PUB.SYS Uses all default files. Prompts for lines of |
| schema in session mode. |
- :FILE DBSTEXT=ORDERSSC Processes schema from a user disk text file named -
- :RUN DBSCHEMA.PUB.SYS;PARM=1 ORDERSSC. Outputs listing to $STDLIST. -
| :FILE DBSLIST;DEV=LP Prompts for lines of schema and outputs the listing |
| to a |
- :RUN DBSCHEMA.PUB.SYS;PARM=2 line printer. -
| :FILE DBSTEXT=ORDERSSC Processes schema from user text file named |
| ORDERSSC; |
- :FILE DBSLIST;DEV=LP outputs the listing to a line printer. -
- :RUN DBSCHEMA.PUB.SYS;PARM=3 -
------------------------------------------------------------------------------------------
Only the first 72 characters of each text file record are processed.
If the schema is error-free, a root file is created, given the same name
as the one specified for the database in the schema, initialized, and
saved as a catalogued disk file. To process the schema without creating
a root file, use the NOROOT option of the $CONTROL command. For more
information, refer to "Schema Processor Commands" later in this chapter.
Creating the Text File
A convenient method for creating the input file is to use a text editor,
for example, EDIT/3000, to enter the commands and schema in a disk file.
Figure 3-2 illustrates this process in a sample session that also
executes the Schema Processor. The example shown in Figure 3-2 uses
EDIT/3000.
The steps to follow are listed below and correspond to the numbers in
Figure 3-2 :
1. Initiate an MPE/iX session by logging on with the appropriate user
name and account.
2. Initiate text editor execution. Enter an Editor ADD command in
response to the first prompt.
3. Enter Schema Processor commands and the schema itself into records
of the Editor work file.
4. Save the work file in a disk file named ORDERSSC. Then terminate
the Editor.[REV BEG]
5. Use the MPE/iX FILE command to equate the formal file designator
DBSLIST to the line printer and DBSTEXT to the disk file
ORDERSSC.[REV END]
6. Initiate execution of DBSCHEMA and indicate that the text file and
list file have been defined in FILE commands. When the Schema
Processor has finished processing the schema, it prints the number
of error messages and verifies that the root file has been
created.
The Schema Processor can also be executed in batch mode. See "Schema
Processor Commands" later in this chapter.
___________________________________________________________________________
| |
| 1 |
| |
| :HELLO USER.ACCOUNT |
| HP3000 RELEASE: B.30.00 ... TUE, SEP 10, 1991, 1:49 PM |
| MPE/iX HP31900 B.08.14 Copyright (C) Hewlett-Packard 1987. ...|
|2 |
| |
| :EDITOR |
| HP32201A.00.00 EDIT/3000 TUE, SEP 10, 1991, 2:07 PM |
| (C) HEWLETT-PACKARD CO. 1985 |
|3 |
| |
| /ADD |
| 1 $PAGE "SCHEMA OF DATA BASE ORDERS" |
| 2 $CONTROL ERRORS=5, BLOCKMAX=256 |
| 3 BEGIN DATABASE ORDERS; |
| : |
| 59 END. |
| 60 // |
| ... |
|4 |
| |
| /KEEP ORDERSSC |
| /EXIT |
|5 |
| |
| :FILE DBSLIST;DEV=LP |
| :FILE DBSTEXT=ORDERSSC |
|6 |
| |
| :RUN DBSCHEMA.PUB.SYS;PARM=3 |
| HP30391C.03.02 |
| NUMBER OF ERROR MESSAGES: 0 |
| ROOT FILE ORDERS CREATED |
| END OF PROGRAM |
| :BYE |
| |
| |
___________________________________________________________________________
Figure 3-2. Sample Schema Creation Session
The Database Creator
The person who creates the root file is identified as the database
creator and can subsequently create and initialize the database. To do
so, the database creator must log on with the same account, user name,
and group that he or she used to create the root file and execute the
TurboIMAGE/XL utility program DBUTIL. This program is described in
chapter 8.
MPE/iX 5.0 Documentation