HP 3000 Manuals

Logging IMAGE/SQL Utility Commands: Task 12 [ HP IMAGE/SQL Administration Guide ] MPE/iX 5.0 Documentation


HP IMAGE/SQL Administration Guide

Logging IMAGE/SQL Utility Commands:  Task 12 

This task describes how to log IMAGE/SQL utility commands and how to save
frequently used command sequences in different log files so they can
easily be reissued in batch or interactive mode.

Performing the Task 

By default, IMAGE/SQL utility commands are logged to the ASCII file
ATCLOG, which you can read and edit.  You can change log files within the
IMAGE/SQL utility by issuing a file equation for ATCLOG. For example, to
rename and save the IMAGE/SQL utility log file as a permanent file, set a
file equation for the ATCLOG file before ATCUTIL is run:
_____________________________________
|                                   |
|     :FILE ATCLOG = DOATTACH; SAVE |
|     :                             |
_____________________________________

            

When the IMAGE/SQL utility is run, the DISPLAY OPTIONS command confirms
that commands are being logged to DOATTACH.
________________________________________________
|                                              |
|     >>DISPLAY OPTIONS                        |
|     Current Turbodb     :                    |
|     Current SQLDBE      :                    |
|     Echo                : ON                 |
|     Command Logging     : ON                 |
|      Log File            : DOATTACH.SERED.ATC|
|                                              |
|     *** Database is not attached.            |
|     >>                                       |
________________________________________________

            

The SALES database is then attached to the PartsDBE DBEnvironment:
______________________________________
|                                    |
|     >>SET TURBODB SALES.SERED.ATC  |
|     >>SET SQLDBE PARTSDBE.SERED.ATC|
|     >>ATTACH                       |
|     >>                             |
______________________________________

            

After the attach, the contents of the log file DOATTACH look like this:
_____________________________________
|                                   |
|     DISPLAY OPTIONS               |
|     SET TURBODB SALES.SERED.ATC   |
|     SET SQLDBE PARTSDBE.SERED.ATC |
|     ATTACH                        |
_____________________________________

            

To close this log file and write to a new one, issue another MPE XL FILE
command from within the IMAGE/SQL utility.  For example:
_____________________________________
|                                   |
|     >>:FILE ATCLOG=UPDATYPE;SAVE  |
|     >>                            |
_____________________________________

            

The DISPLAY OPTIONS command confirms that commands are now being logged
to UPDATYPE:
____________________________________________
|                                          |
|     >>DISPLAY OPTIONS                    |
|     Set Turbodb     : SALES.SERED.ATC    |
|     Set Sqldbe      : PARTSDBE.SERED.ATC |
|     Echo            : ON                 |
|     Command Logging : ON                 |
|      Log File        : UPDATYPE.SERED.ATC|
|                                          |
|     *** Database is attached.            |
____________________________________________

            

Any IMAGE/SQL utility commands now issued are written to UPDATYPE. For
example, when the following command is issued,
__________________________________________________________
|                                                        |
|     >> UPDATE TYPE IN CUSTOMER.CREDIT_RATING TO CHAR(4)|
|     Updated information in table CUSTOMER.             |
|     >>                                                 |
__________________________________________________________

            

the log file UPDATYPE contains the following commands:
_______________________________________________________
|                                                     |
|     DISPLAY OPTIONS                                 |
|     UPDATE TYPE IN CUSTOMER.CREDIT_RATING TO CHAR(4)|
_______________________________________________________

            

Using this technique, you can create several files containing often-used
IMAGE/SQL utility commands.  The commands in these files can then be
executed using the XEQ command (see Task Reference).

Log files can be edited with a text editor.  (Be sure to keep the edited
file unnumbered or it cannot be used as a command file.)


NOTE Many editors automatically insert an end-of-file marker at the end of the text in an edited file. This prevents the file from having log records appended to it. For this reason, if the original file is to be used as a log file, you should keep the edited file under a different name.
Task Reference * Task 11, "Setting IMAGE/SQL Utility File Equations," contains more information about issuing IMAGE/SQL utility file equations. * Task 13, "Using IMAGE/SQL Utility Command Files," contains more information about using the IMAGE/SQL utility XEQ command interactively or in batch to execute IMAGE/SQL utility commands. * When an IMAGE/SQL utility session begins, logging is on. The temporary file ATCLOG is created (if it does not already exist) and opened in the user's logon group and account. If the log file already exists as a temporary or permanent file, log records are appended to it. * If you want to save the temporary file, either save the file before ending your current MPE XL session or specify ;SAVE as a part of the FILE equation. * The FILE command can be used to override default ATCLOG file attributes, such as size and file domain. However, the log file must remain an unnumbered ASCII file.


MPE/iX 5.0 Documentation