Logging ATCUtil Commands: Task 12 [ ALLBASE/Turbo CONNECT Administrator's Guide ] MPE/iX 5.0 Documentation
ALLBASE/Turbo CONNECT Administrator's Guide
Logging ATCUtil Commands: Task 12
This task describes how to log ATCUtil 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, ATCUtil commands are logged to an ASCII file, ATCLOG, which
you can read and edit. You can change log files within ATCUtil by
issuing a file equation for ATCLOG. For example, to rename and save the
ATCUtil log file as a permanent file, set a file equation for the ATCLOG
file before ATCUTIL is run:
_____________________________________
| |
| :FILE ATCLOG = DOATTACH; SAVE |
| : |
_____________________________________
When ATCUtil 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 ATCUtil. 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 ATCUtil 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
ATCUtil 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 ATCUtil File Equations," contains more information
about issuing ATCUtil file equations.
* Task 13, "Using ATCUtil Command Files," contains more information
about using the ATCUtil XEQ command interactively or in batch to
execute ATCUtil commands.
* When an ATCUtil 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, then 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