Lately I have had to compare complete message files looking for
single/various message differences. I have had to:
For each message file:
1. Use DSPMSGD to output all messages to a spool file.
i.e. DSPMSGD RANGE(*FIRST *LAST) MSGF(<Library>/<Message File>))
DETAIL(*BASIC) OUTPUT(*PRINT)
2. Create a physical file.
i.e. CRTPF FILE(QTEMP/MSGSOURCE) RCDLEN(199)
3. Copy to contents of the spool file into the physical file.
i.e. CPYSPLF FILE(QPMSGD) TOFILE(QTEMP/MSGSOURCE)
JOB(99999/USERID/QPADEV0000)
4. Repeat steps 1 through 3 to create MSGDEST (Second message file)
5. Use SQL (command line or STRSQL) to remove extra records:
i.e. DELETE FROM QTEMP/MSGSOURCE WHERE MSGSOURCE NOT LIKE ' SLC%'
6. Repeat step 5 for second message file.
7. Use QUERY/400 to compare the files.
Is there any easier way (aside from creating a CL with the same steps)?
Thanks,
Paul
> <<SNIP>>
> Is there any easier way (aside from creating a CL with the
> same steps)?
Why not write a program which does retrieve message <API QMHRTVM> from
*FIRST to *LAST by *NEXT, of each message reporting <or correcting>
differences <to include missing messages> which are of concern.?
Regards, Chuck
-- Comments provided "as is" with no warranties of any kind whatsoever.
I do not know if you think that it may be easier your you but you may
make use of the QMHRTVM API. With this API you can read through a
message file, retrieve the message description and write it to an
outfile. You can compare the outfiles with QUERY/400, then.
Just a thought. Let me know if you need some further information or some
example code.
Thomas Raddatz, Germany.
> Lately I have had to compare complete message files looking for
> single/various message differences. I have had to:
>
> For each message file:
> 1. Use DSPMSGD to output all messages to a spool file.
> i.e. DSPMSGD RANGE(*FIRST *LAST) MSGF(<Library>/<Message File>))
> DETAIL(*BASIC) OUTPUT(*PRINT)
>
> 2. Create a physical file.
> i.e. CRTPF FILE(QTEMP/MSGSOURCE) RCDLEN(199)
>
> 3. Copy to contents of the spool file into the physical file.
> i.e. CPYSPLF FILE(QPMSGD) TOFILE(QTEMP/MSGSOURCE)
> JOB(99999/USERID/QPADEV0000)
>
> 4. Repeat steps 1 through 3 to create MSGDEST (Second message file)
>
> 5. Use SQL (command line or STRSQL) to remove extra records:
> i.e. DELETE FROM QTEMP/MSGSOURCE WHERE MSGSOURCE NOT LIKE ' SLC%'
>
> 6. Repeat step 5 for second message file.
>
> 7. Use QUERY/400 to compare the files.
>
> Is there any easier way (aside from creating a CL with the same steps)?
--
*=====================================================*
e-mail Adresse:
Thomas....@Online-Club.de
Peek/400:
Der ultimative Datenbankbrowser für Ihre AS/400
Homepage:
http://www.online-club.de/~Thomas.Raddatz/
*=====================================================*
Orangtang <oran...@aol.com> wrote in article
<19981019191317...@ng26.aol.com>...