TAA Tools
SCNEXTMSGF      SCAN EXTRACTED MESSAGE FILE            TAAMSIX

The Scan Extracted Message  File tool is a series of  commands that let
you build  a file of messages and  then scan for a value.   This can be
helpful  when  you  have seen  a  message  containing a  value  such as
'authenticate', but  no longer have  the message  ID to help  determine
the full text  of the message.   You may scan either the  first or both
the first and second level text.

To  use the SCNEXTMSGF tool, you must  first create the SCNEXTMSGP file
and convert the message files you  want to scan.  Both system and  user
message files are supported.

If you are  only interested in converting the system  messages in QSYS,
there  will be  approximately 40,000 messages  requiring about  130 MB.
However, not  all  system  messages  exist in  library  QSYS  and  each
program product may  have its own  message file.  Other  products (such
as the TAA  Productivity Tools) may have message  files as well as your
own functions.

Message  files may also  contain unique language  values such as French
or German.

Since your requirements  may vary, a CVT  command is provided to  allow
you to tailor  what message files should be converted  so that they may
be scanned.

The file must be refreshed on each system release.

An  outfile named  SCNMSGP  is optional.   The  model file  is TAAMSIXQ
with a format name of SCNMSGR.

Getting started
---------------

  **   Create the SCNEXTMSGP file in a library:

            CRTEXTMSGF    MSGLIB(xxx)

  **   Convert one or more message  files to the SCNEXTMSGP file.   You
       can convert  a specific  message file  or all  message files  on
       your  system.  The  TAA CVTMSGF command  is used to  convert the
       message information which  requires a long  processing time  for
       a large message file  such as QCPFMSG.  Consider  submitting the
       command to batch.

       To convert all messages on your system, enter:

           CVTEXTMSGF    MSGF(*ALL/*ALL) MSGLIB(xxx)

       Depending  on  the  size  of  your  system  and  the  number  of
       messages  to  be  converted,  this  may  require  about  several
       minutes.

Scanning for a value
--------------------

To scan for  a value in  the first level  text such as  'authenticate',
enter:

           SCNEXTMSGF    SCNVALUE('AUTHENTICATE') MSGLIB(xxx)

A display would  appear identifying each message ID,  message file, and
library  where the scan value  was found in the  first level text along
with the first 88  bytes of text.   The data  in the message is  folded
to upper case before the scan occurs.

If a  value such  as 'authentica' is  entered, any  messages containing
'authenticate',  'authenticated', 'authenticating' etc  would be found.

SCNEXTMSGF may also create an  outfile of the information that  appears
in the listing.   A separate tool  DSPMSGUSE2 can be used  to determine
the  command name  for message  IDs that  are  sent as  escape messages
from system commands.

The typical series of commands would be:

           SCNEXTMSGF    SCNVALUE('AUTHENTICATE') MSGLIB(xxx)
                           OUTPUT(*OUTFILE) OUTLIB(QTEMP)
           DSPMSGUSE2

For  the scan value 'authenticate' several  message IDs are listed, but
only 2 are associated with commands.

SCNEXTMSGF escape messages you can monitor for
----------------------------------------------

      TAA9891    No messages exist for the named message file

Escape messages from based on functions will be re-sent.

CRTEXTMSGF command parameters                         *CMD
-----------------------------

   MSGLIB        The  library  where   the  SCNEXTMSGP  file   will  be
                 created.

   SRCLIB        The  source  library  to  use  for  the  QATTDDS  file
                 source.  The default is *TAAARC.

                 A  specific user library may be  named, but the source
                 file must be QATTDDS.

   AUT           The authorization to the created  files.  *USE is  the
                 default to allow  the *PUBLIC user to  read the files.
                 *CHANGE or *EXCLUDE may be specified.

DLTEXTMSGF command parameters                         *CMD
-----------------------------

   MSGLIB        The library  where the SCNEXTMSGP file  exists.  *LIBL
                 is  the  default  for   the  library  qualifier.     A
                 specific library may be named.

CVTEXTMSGF command parameters                         *CMD
-----------------------------

   MSGF          The  message  file  or  files  to  be  converted.    A
                 message file  or *ALL must be specified.   The library
                 qualifier  defaults to  QSYS.   A specific  library or
                 *ALL may  be specified  to convert  all message  files
                 on the system.

   REPLACE       A *YES/*NO  value for whether  to replace the  data in
                 the  SCNEXTMSGP  file before  converting  one  or more
                 message files.    If  *YES is  specified,  the  entire
                 file is cleared.

                 If  you use  multiple CVTEXTMSGF  commands, the  first
                 command  would normally specify  REPLACE(*YES) and the
                 additional commands would specify REPLACE(*NO).

   MSGLIB        The library where the  SCNEXTMSGP file exists.   *LIBL
                 is the default.

SCNEXTMSGF Command parameters                         *CMD
-----------------------------

   SCNVALUE      The value  to be  scanned for.   Both  the scan  value
                 and  the message  text will  be  folded to  upper case
                 before  scanning  the text.   Up  to  20 bytes  may be
                 entered.

                 If  a  value such  as  'authentica'  is  entered,  any
                 messages  containing 'authenticate',  'authenticated',
                 'authenticating' etc would be found.

                 Multiple  words may  be scanned  for such  as 'special
                 authority'.

   MSGFLD        The field to be scanned.

                 *FSTLVL is  the  default  to  scan the  132  bytes  of
                 first level text.

                 *BOTHLVL  may be  specified to  scan  the first  level
                 and  the first  3000 bytes of  the second  level text.
                 If  a  message  has  second  level  text  beyond  3000
                 bytes, it is not considered.

                 If the  value  is found,  a line  is  listed with  the
                 first  88 bytes of  text, the level  of text (1  or 2)
                 where  the  value was  found and  the position.   Only
                 the first  occurrence  of the  value  for a  level  is
                 listed.   If *BOTHLVL was  requested and the  value is
                 found in both levels, two lines appear.

   MSGF          The  qualified   name  of  the  message  file  in  the
                 SCNEXTMSGP file  to  be scanned.   The  messages  must
                 have  already  been  converted  using  the  CVTEXTMSGF
                 command.

                 The   default  is  *ALL   for  all   messages  in  the
                 SCNEXTMSGP file.    A  specific message  file  may  be
                 named.  If a  specific message file is named,  a blank
                 library  qualifier means  *LIBL and  the  message file
                 library  will  be  retrieved using  the  library list.
                 If the  message file is  not on  the library list,  an
                 error  will  occur.     A  library  qualified  may  be
                 entered  if the  message  file is  not on  the library
                 list.

   MSGLIB        The library where the  SCNEXTMSGP file exists.   *LIBL
                 is the default.

   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  SCNEXTMSGF spooled file  is output and
                 retained.

                 *OUTFILE  may be  entered to  create an  outfile.  The
                 file is  named SCNMSGP with  a record  format name  of
                 SCNMSGR.  The model file is TAAMSIXQ.

   OUTLIB        The  library  in  which   the  SCNMSGP  file  will  be
                 placed.   The default  is *LIBL.  If  the SCNMSGP file
                 does not already exist,  a library must be  specified.

                 The SCNVAL  is always placed in  the last 20  bytes of
                 the text description of the SCNMSGP file.

                 See  the  previous  discussion  for  how  to list  the
                 messages in  the outfile  and the  associated  command
                 names  (if they  can  be  found) with  the  DSPMSGUSE2
                 tool.

   OUTMBR        The  member of the  SCNMSGP file to  be used.   If the
                 member  does not exist,  it is added.   The default is
                 SCNMSGP.

   REPLACE       A *YES/*NO  value  for whether  the  member should  be
                 cleared before  writing records into it.   The default
                 is *YES.

                 *NO  may  be  specified  to  add  records to  existing
                 data.


Restrictions
------------

Only the first 3000 bytes  of second level text may  be scanned.  If  a
message has text beyond 3000 bytes, it is not considered.

The SCNEXTMSGP file must be refreshed on each system release.

Prerequisites
-------------

The following TAA Tools must be on your system:

     CHKOBJ3         Check object 3
     CVTMSGF         Convert message file
     EDTVAR          Edit variable
     RSNLSTMSG       Resend last message
     RTVSYSVAL3      Retrieve system value 3
     RTVOBJLST       Retrieve object list
     SNDCOMPMSG      Send completion message
     SNDDIAGMSG      Send diagnostic message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message
     SNDSTSMSG       Send status message

Implementation
--------------

See the  section on  'Getting started'.   The  SCNEXTMSGP file must  be
refreshed on each system release.

Objects used by the tool
------------------------

   Object        Type    Attribute      Src member    Src file
   ------        ----    ---------      ----------    ----------

   CRTEXTMSGF    *CMD                   TAAMSIX       QATTCMD
   DLTEXTMSGF    *CMD                   TAAMSIX2      QATTCMD
   CVTEXTMSGF    *CMD                   TAAMSIX3      QATTCMD
   SCNEXTMSGF    *CMD                   TAAMSIX4      QATTCMD
   TAAMSIXC      *PGM       CLP         TAAMSIXC      QATTCL
   TAAMSIXC2     *PGM       CLP         TAAMSIXC2     QATTCL
   TAAMSIXC3     *PGM       CLP         TAAMSIXC3     QATTCL
   TAAMSIXC4     *PGM       CLP         TAAMSIXC4     QATTCL
   TAAMSIXR4     *PGM       RPG         TAAMSIXR4     QATTRPG
   TAAMSIXP      *FILE      PF          TAAMSIXP      QATTDDS
Structure
---------

CRTEXTMSGF  Cmd
   TAAMSIXC   CL pgm

DLTEXTMSGF  Cmd
   TAAMSIXC2  CL pgm

CVTEXTMSGF  Cmd
   TAAMSIXC3  CL pgm

SCNEXTMSGF  Cmd
   TAAMSIXC4  CL pgm
     TAAMSIXR4  RPG pgm
					

Added to TAA Productivity tools June 30, 2007


Home Page Up to Top