Logging IMAGE/SQL Utility Commands [ Getting Started with HP IMAGE/SQL ] MPE/iX 5.0 Documentation
Getting Started with HP IMAGE/SQL
Logging IMAGE/SQL Utility Commands
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 an ASCII file,
ATCLOG, which you can read and edit. You can change log files within
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 the IMAGE/SQL utility 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 base : |
| Current SQLDBE : |
| Echo : ON |
| Command Logging : ON |
| Log File : DOATTACH.PUB.TURBONM|
| |
| *** Database is not attached. |
| >> |
__________________________________________________
The MUSIC database is then attached to the MusicDBE DBEnvironment:
________________________________________
| |
| >>SET TURBODB MUSIC.PUB.TURBONM |
| >>SET SQLDBE MUSICDBE.PUB.TURBONM|
| >>ATTACH |
| >> |
________________________________________
After the attach, the contents of the log file DOATTACH look like this:
______________________________________
| |
| DISPLAY OPTIONS |
| SET TURBODB MUSIC.PUB.TURBONM |
| SET SQLDBE MUSICDBE.PUB.TURBONM|
| ATTACH |
______________________________________
To close this log file and write to a new one, issue another MPE/iX FILE
command from within 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 : MUSIC.PUB.TURBONM |
| Set Sqldbe : MUSICDBE.PUB.TURBONM |
| Echo : ON |
| Command Logging : ON |
| Log File : UPDATYPE.PUB.TURBONM|
| |
| *** 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 ALBUMS.DATERECORDED TO CHAR(20)|
| Updated information in table ALBUMS. |
| >> |
________________________________________________________
the log file, UPDATYPE, contains the following commands:
_____________________________________________________
| |
| DISPLAY OPTIONS |
| UPDATE TYPE IN ALBUMS.DATERECORDED TO CHAR(20)|
_____________________________________________________
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
* The section "Setting IMAGE/SQL File Equations" in this chapter
contains more information about issuing IMAGE/SQL file equations.
* The section "Using IMAGE/SQL Utility Command Files" in this
chapter 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/iX 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