The Compare Output Queue command compares the major attribute
information from each spooled file in one or more output queues to
the same information created on another system. The CAPOUTQ command
must be used on both systems/partitions to capture the spooled file
information. The two libraries containing the spooled file
information must exist on the same system when CMPOUTQ run. A
spooled file is displayed or output with the differences. This is
not a complete comparison, but is a good sanity check.
You must have *ALLOBJ special authority to use CMPOUTQ.
CMPOUTQ will check for missing spooled files in both sets of
information.
The intent of CMPOUTQ is to allow a check that all spooled files have
been moved from one system to another such as when a new system is
being converted to. Because the save and restore of spooled files
will change the job name and the open date/time, a complete
comparison cannot be made.
CMPOUTQ compares the information for the following data:
- Output queue and library
- User name
- User data
- Number of pages
Because the key cannot include the same job name and open date/time,
there may be duplicates. An additional pass is made of the From and
To information and any duplicates are summarized in both files. This
may assist in determining any problems.
Because this is not a complete guaranty that the spooled file
information is the same, it should be considered only as a sanity
check.
Getting started
---------------
** Assume you want to convert spooled files in LIBA and LIBB from
an existing system to a new system. You want to ensure that
the save and restore of spooled files has been done properly.
** Use a special library for CAPOUTQ. The library could include
other objects that you want to compare by your own code or
other TAA Tools.
** As a user with *ALLOBJ special authority, use the CAPOUTQ
command on the existing system such as:
CAPOUTQ LIB(LIBA LIBB) OUTLIB(OUTQINFO1)
The library will contain:
OUTQP - The file created by the TAA CVTOUTQ command.
** The library should then be transmitted to the new system. The
TAA Tools SAVSNDL and RSTSNDL could be used.
** CAPOUTQ would then be run on the new system for the same
libraries:
CAPOUTQ LIB(LIBA LIBB) OUTLIB(OUTQINFO2)
The OUTQP file will be created in the library.
** Run CMPOUTQ for the comparison:
CMPOUTQ FROMLIB(OUTQINFO1) TOLIB(OUTQINFO2)
A spooled file would be displayed with any differences.
How CMPOUTQ operates
--------------------
CAPOUTQ ensures the OUTLIB exists. The TAA command CVTOUTQ is used
for each output queue in the specified libraries. One record is
written for each spooled file to the OUTQP file in the named library.
Any output queues in the library named for OUTLIB are never included.
CMPOUTQ begins by checking the files in the From and To libraries to
ensure they exist and have the proper format names.
The OUTQP file in the From library is copied to the TAAFRQ file
QTEMP. This is a keyed version of OUTQP. CPYF is also used for the
OUTQP file in the To library to copy to a different keyed file
(TAATOQ) in QTEMP. This is required to allow unique file names to be
used in the RPG program for the files. Overrides are used for all
files.
The key structure for file is:
- Output queue
- Output queue library
- User name
- User data
- Number of pages
CMPOUTQ begins by reading the spooled file records in the From
library and attempts to randomly access the same record key in the
corresponding file in the To library. If the same key does not
exist, the record is flagged and listed.
Note that the only checking is that the same key exists. None of the
other spooled file attributes are compared.
When all spooled file records in the From library have been read, the
spooled file records in the To library are read beginning with the
first record. An attempt is made to randomly access the same key in
the in the From library file. If the same key does not exist, the
record is flagged and listed.
Both the From file and To file are read again from the first record
and a listing is made of the duplicates found in each file. If the
same number of duplicates exist for each spooled file in the From and
To libraries, you can be reasonably assured that the duplicates are
the same.
CMPOUTQ escape messages you can monitor for
-------------------------------------------
None. Escape messages from based on functions will be re-sent.
CAPOUTQ Command parameters *CMD
--------------------------
LIB A list of up to 300 libraries (generic names are
valid) that will be captured or the special values
*ALL or *ALLUSR. The special values have the same
definition as defined by the SAVLIB command.
The libraries QTEMP and the library named for the
OUTLIB parameter are implicitly bypassed.
OUTLIB The library where the information will be captured
to.
The library will contain the OUTQP file created by
CVTOUTQ. Any output queues in the same library will
not be considered.
REPLACE A *YES/*NO parameter for whether the data in the
OUTQP member should be cleared prior to writing new
data.
*YES is the default to clear the member before
writing.
*NO may be specified to add records to the member.
OMITLIB A list of up to 300 libraries or generic library
names that should be omitted. *NONE is the default.
No check occurs to see if an omit library would have
been selected. For example, if LIB(LIBA*) is
entered with OMITLIB(ABC), no error occurs.
OMITOUTQ A list of up to 50 output queues or generic output
queue names to be omitted. *NONE is the default.
If an output queue name is entered, a fully
qualified library name must be specified.
CMPOUTQ Command parameters *CMD
--------------------------
FROMLIB The library name of the From library to be compared.
The library must have been output by the CAPOUTQ
command.
TOLIB The library name of the To library to be compared.
The library must have been output by the CAPOUTQ
command. The same library names must have been
specified for each CAPOUTQ command.
DIFFONLY A *YES/*NO parameter for whether to list only the
differences between the two files.
*YES is the default to list only differences.
*NO may be specified to list all spooled files.
OUTPUT How to output the results. * is the default to
display the spooled file if the command is entered
interactively. The spooled file is deleted after it
is displayed.
If the command is entered in batch or *PRINT is
specified, the spooled file is output and retained.
Restrictions
------------
You must have *ALLOBJ special authority to use CAPOUTQ.
The same library names must be used on both uses of CAPOUTQ.
Prerequisites
-------------
The following TAA Tools must be on your system:
CHKALLOBJ Check *ALLOBJ special authority
CHKGENERC Check generic
CVTOUTQ Convert output queue
CVTTIM Convert time
DUPTAADBF Duplicate data base file
EDTVAR Edit variable
EXTLST2 Extract list 2
RSNLSTMSG Resend last message
RTVFMT Retrieve format
RTVSYSVAL3 Retrieve system value 3
SNDCOMPMSG Send completion message
SNDESCINF Send escape information
SNDESCMSG Send escape message
SNDLNGMSG Send long message
SNDSTSMSG Send status message
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
CMPOUTQ *CMD TAASPOS QATTCMD
CAPOUTQ *CMD TAASPOS2 QATTCMD
TAASPOSC *PGM CLP TAASPOSC QATTCL
TAASPOSC2 *PGM CLP TAASPOSC2 QATTCL
TAASPOSC11 *PGM CLP TAASPOSC11 QATTCL
TAASPOSC12 *PGM CLP TAASPOSC12 QATTCL
TAASPOSR *PGM RPG TAASPOSR QATTRPG
TAASPOSP *FILE PF TAASPOSP QATTDDS
TAASPOSQ *FILE PF TAASPOSP QATTDDS
Structure
---------
CMPOUTQ Cmd
TAASPOSC CL pgm
TAASPOSR RPG Pgm
TAASPOSC11 CL pgm
CAPOUTQ Cmd
TAASPOSC2 CL pgm
TAASPOSC12 CL pgm
|