TAA Tools
SNDPGMMSG2      SEND PROGRAM MESSAGE 2                 TAAMSHT

The Send Program  Message 2 command allows  you to send a  message with
both  first and second  level text using  an impromptu form  of message
text.   Standard  message IDs  (TAA9871 - TAA9878)  must be  used.  Two
different jobs may use the same  ID at the same time and the  text will
be unique to their individual jobs.

This allows for  impromptu text to be used in a  situation where a long
string  of second level text  is needed.  The  message type defaults to
*INFO.  *DIAG  or *COMP  types may  also be sent.   To  send an  escape
message in the same manner, see SNDESCMSG3.

SNDPGMMSG2 may be used with other TAA Tools such as DSPMSGWDW.

A typical command would be:

            SNDPGMMSG2   MSGID(TAA9871) MSG('...') SECLVL('...')

The message IDs exist in the TAAMSGF message file in TAATOOL.

The message  is then  sent using  the QMHSNDPM API  to the  2nd program
higher  in the  stack.  This  allows the  message to  be sent as  if it
were sent by the program that ran SNDPGMMSG2.

If SNDPGMMSG2 is used  from an ILE program,  the message is still  sent
to  the previous  program.   Note  that in  a  complex situation  where
several  modules  exist for  the  current ILE  program  in the  program
stack,  the message  is not  sent to  the previous  module, but  to the
previous program.

Both the first and second level  text can be read by the user  and will
be in the job log.

Both  the MSG  and SECLVL  parameters may  contain an  expression where
you concatenate variables into the message such as:

         MSG('You are missing the ' *CAT &FILE *TCAT ' file.')

SNDPGMMSG2 escape messages you can monitor for
----------------------------------------------

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

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

   MSGID         The  message  ID  to  be sent.    It  must  be  one of
                 TAA9871, TAA9872 -  TAA9878.   The messages should  be
                 considered unique within your program.

                 That  is,  the same  message  IDs  can be  re-used  in
                 another  program  within  your  job,  by another  job,
                 etc.

                 Two independent  jobs may  both use  the same  message
                 ID at the same time and the text will be unique.

   MSG           The first  level text that  will appear in  the escape
                 message.    Up  to  512  bytes  may be  entered.    An
                 expression may be used.

   SECLVL        The  second level text that  will appear in the escape
                 message.    Up to  512  bytes  may  be  entered.    An
                 expression may be used.

   MSGTYPE       The message  type to be  sent.  The default  is *INFO.
                 *COMP or *DIAG may also be specified.

   TOPGMQ        The  program  queue  to  send  the  message  to.   The
                 default is  *PRV meaning  the program  that is  higher
                 in the stack than the current program.

                 *SAME may  be used  to send  the message  to the  same
                 program that used SNDPGMMSG2.

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

None.

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

None.

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

None, the tool is ready to use.

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

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

   SNDPGMMSG2    *CMD                   TAAMSHT       QATTCMD
   TAAMSHTC      *PGM       CLP         TAAMSHTC      QATTCL
					

Added to TAA Productivity tools February 28, 2000


Home Page Up to Top