HPlogo Getting Started with HP IMAGE/SQL: HP 3000 MPE/ iX Computer Systems > Chapter 5 IMAGE/SQL Tasks

Using IMAGE/SQL Utility Command Files

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

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 (see Task Reference). If you create or edit this file with an editor, note that it must be kept unnumbered.

In the following examples, the file UPDATYPE contains the following commands:

   SET TURBODB MUSIC.PUB.TURBONM

   SET SQLDBE MUSICDBE.PUB.TURBONM

   UPDATE TYPE IN ALBUMS.DATERECORDED to CHAR(20)

   EXIT

Note that the commands in this command file assume the TurboIMAGE/XL database is already attached to the DBEnvironment.

If you wish to see commands and comments as the command file is executed, make sure the ECHO option is on (see Task Reference).

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 and then issue the XEQ command. Note that in this example ECHO is off.

   :RUN IMAGESQL.PUB.SYS



   HP36385 B.F0.10            IMAGE/SQL Utility        FRI, DEC 18, 1992, 11:30 AM

   (C) COPYRIGHT HEWLETT-PACKARD COMPANY 1992



   >>XEQ UPDATYPE

   Updated information in table ALBUMS.

   :

The MUSIC database, previously attached to the MusicDBE DBEnvironment, and data type mapping information has been updated for the ALBUMS.DATERECORDED column of the ALBUMS 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 JIMAGESQL,USER2/KEVIN.ATC/MGR,PUB/ALL

   !comment**************************************************************

   !comment*      This job executes an IMAGE/SQL command file.

   !comment**************************************************************

   !

   !tell USER2.ATC;   /-->Start JIMAGESQL for MUSIC

   !

   !run IMAGESQL.PUB.SYS

   !

   !comment**************************************************************

   !comment*      The UPDATYPE command file contains commands that SET

   !comment*      the MUSIC database and the MusicDBE 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 USER2.ATC;   /-->End JIMAGESQL for MUSIC

   !

   !eoj

Note that in batch mode, if an error occurs, 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.

  • The section "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 the HP IMAGE/SQL Administration Guide.

Feedback to webmaster