Task 14:Using IMAGE/SQL Utility Command Files [ IMAGE/SQL Administration Guide ] MPE/iX 5.0 Documentation
IMAGE/SQL Administration Guide
Task 14:Using IMAGE/SQL Utility Command Files
This task describes how to execute an IMAGE/SQL utility command file in
interactive or batch mode.
Getting Ready
An IMAGE/SQL utility command file can be created with a text editor or
can be produced as part of the logging process. If you create or edit
this file with an editor, it must be kept unnumbered.
In the following examples, the file UPDATYPE contains the following
commands:
_______________________________________________________
| |
| SET TURBODB SALES.SERED.ATC |
| SET SQLDBE PARTSDBE.SERED.ATC |
| UPDATE TYPE IN CUSTOMER.CREDIT_RATING TO CHAR(4)|
| EXIT |
_______________________________________________________
Note that the commands in this command file assume the TurboIMAGE/XL
database is already attached to the DBEnvironment.
If you want to see commands and comments as the command file is executed,
make sure the ECHO option is on.
Performing the Task
The XEQ command allows you to specify a file containing IMAGE/SQL utility
commands as its parameter. To interactively execute commands listed in a
command file, run the IMAGE/SQL utility by typing RUN IMAGESQL.PUB.SYS,
then issue the XEQ command. Note that in this example ECHO is off.
___________________________________________________________________________________
| |
| :RUN IMAGESQL.PUB.SYS |
| |
| HP36385B B.G0.03 IMAGE/SQL Utility FRI, DEC 18, 1994, 11:30 AM|
| (C) COPYRIGHT HEWLETT-PACKARD COMPANY 1992 |
| |
| >> XEQ UPDATYPE |
| Updated information in table CUSTOMER. |
| : |
___________________________________________________________________________________
The SALES database is now attached to the PartsDBE DBEnvironment and data
type mapping information has been updated for the CUSTOMER.CREDIT_RATING
column of the INVENTORY table.
You can also issue XEQ commands in batch mode. The following job stream
file contains XEQ commands that execute the commands in the UPDATYPE
file.
________________________________________________________________________________
| |
| !job JIMSQL,NANCY/KEVIN.ATC/MGR,SERED/ALL |
| !comment************************************************************** |
| !comment* This job executes an IMAGESQL command file. |
| !comment************************************************************** |
| ! |
| !tell NANCY@ATC; /-->Start JIMSQL for SALES |
| ! |
| !run IMAGESQL.PUB.SYS |
| ! |
| !comment************************************************************** |
| !comment* The UPDATYPE command file contains commands that SET |
| !comment* the SALES database and the PartsDBE DBEnvironment. |
| !comment* It then specifies alternative data type mapping for source|
| !comment* data set fields and exits the IMAGE/SQL utility. |
| !comment************************************************************** |
| ! |
| XEQ UPDATYPE |
| ! |
| !tell NANCY@ATC; /-->End JIMSQL for SALES |
| ! |
| !eoj |
________________________________________________________________________________
If an error occurs in batch mode, the job terminates. The remaining
commands are flushed.
Task Reference
* An IMAGE/SQL command file is an unnumbered file containing a list
of IMAGE/SQL commands. If commands span more than one line, use
an ampersand (&) to continue the command to the next line.
* Task 13, "Logging IMAGE/SQL Utility Commands," shows how to use
the IMAGE/SQL utility logging facility to create and save files
containing often-issued IMAGE/SQL utility commands.
* For the syntax of the ECHO command, refer to Chapter 4, "IMAGE/SQL
Utility Commands."
MPE/iX 5.0 Documentation