HP 3000 Manuals

Redirecting Input, Output, and the Schema Listing [ DBChange Plus User's Guide ] MPE/iX 5.0 Documentation


DBChange Plus User's Guide

Redirecting Input, Output, and the Schema Listing 

By default, command input comes from $STDIN (the user terminal
interactively; the job file in batch mode).  By default, output is
directed to $STDLIST (the user terminal interactively or the job's
$STDLIST spool file in batch mode).

You can redirect input, output, and the schema listing by issuing the
following formal file designators either before or during DBChange Plus
operation.  (To issue them during DBChange Plus operation, be sure to
enter a colon (:)  after the DBCPLUS prompt (>).)

   *   DBCIN--the formal file designator for command input.  If you set a
       file equation for DBCIN before running the DBCPLUS program,
       commands are read from the named file.

       To read input from a file, use the following file equation:

            :file dbcin= InFileName 

   *   DBCOUT--the formal file designator for command output.  This file
       can be a temporary file or a permanent file large enough to hold
       the contents of the output.  The DBCOUT file equation must be used
       with the OUTPUT LP command.

       To send output to a new permanent file, use the following file
       equation:

            :file dbcout= FileName;dev=disc;rec=-80,16,f,ascii;disc= n;save;nocctl 

       where FileName is the name of the new permanent file, and n is the
       approximate number of lines in the output file.

Printing the Schema to an MPE XL File 

To print the schema to a new permanent MPE XL file, use the PRINT SCHEMA
command specifying a FileName.  The FileName must adhere to the MPE XL
file naming conventions.  (Refer to the MPE XL General Users Reference 
Manual.)  DBChange automatically builds a fixed ASCII disk file which can
accommodate a file size up to 60000 lines.  If the file does not use all
the allotted disk space, any unused disk space is returned back to the
system.


CAUTION When redirecting output to a disk file, be sure the file is large enough to accommodate all output. If the file is not large enough, the DBCPLUS or DBAPLUS programs can abort causing the database to be in an inconsistent state.
Printing the Schema to an MPE XL File in Interactive Mode. When you issue the PRINT SCHEMA FileName command in interactive mode, the new file is opened and the DBCPLUS program verifies if a file with the same name already exists. If one does, you are prompted and must confirm if you want the existing file purged. If a file with the same name does not exist, the new file is built and the schema is printed to the new file. In the following example, the schema for the ORDERS database is interactively printed to a file named ORDERSZ, which already exists: >print schema ordersz Old schema file ORDERSZ exists. Purge and create a new file [y/N]? y Schema is printed. > Printing the Schema to an MPE XL File in Batch Mode. When you issue the PRINT SCHEMA FileName command in batch mode and a file with the same name already exists, the new file is not created and the following message appears in your output: Duplicate schema file. Cannot process PRINT SCHEMA. If a file with the same name does not exist, the new file is built and the schema is printed to the new file. Refer to PRINT SCHEMA in chapter 10, "DBChange Plus Commands," for a detailed description of the command syntax and parameters.


MPE/iX 5.0 Documentation