TAA Tools
SNDPGMMSG4      SEND PROGRAM MESSAGE 4                 TAAMSJU

The  Send Program  Message  4 command  is  a subset  front  end to  the
system  SNDPGMMSG  command.    SNDPGMMSG  may  only  be used  in  a  CL
program.    SNDPGMMSG4 allows  any  environment and  supports  only the
capability to  send  a message  to  an external  message queue  from  a
message  file.   SNDPGMMSG4  can  be helpful  when  testing requires  a
message  with an ID  in a message  queue or when  reviewing how message
text will appear with replacement data.

A typical command would be:

             SNDPGMMSG4  MSGID(CPF9898) MSGF(QCPFMSG)
                           TOMSGQ(xxx) MSGDTA('...')

The CPF9898 and CPF9897 messages  allow any message text in the  MSGDTA
parameter to be sent  as the complete text of the message.   This would
be helpful  if you are testing how a message  with an ID will appear in
a message  file (the  system  SNDMSG command  sends  a string  of  text
message without an ID or message file).

You may  also use  SNDPGMMSG4 to  test a  value for  MSGDTA as  typical
replacement  data in  a  message rather  than sending  the  entire text
with CPF9898/CPF9897.

For  example, assume you have  a message that is  similar to the system
CPC2191  message ID  which  is  used by  many  DLT  commands.   If  you
display the CPC2191 message ID in QCPFMSG with DSPMSGD, it reads as:

        Object &1 in &2 type *&3 deleted.

If you review the field data for the message you would see:

           &1   *CHAR  10
           &2   *CHAR  10
           &3   *CHAR   7

A data  structure of 27 bytes must  exist in the message  data to allow
the message  handler to format the proper text.   If you compare the &n
values with the  basic text of the  message, you would  see that &1  is
the object name, %2 is the library, and &3 is the type of object.

Note that the &3 value  in the message is preceded by an  * so that you
would  enter a value  like 'JOBD'  rather than '*JOBD'  when describing
the object type.

Thus you could  test how a message  would appear by  for a DLT  command
by entering replacement data on the SNDPGMMSG4 command.

     SNDPGMMSG4  MSGID(CPC2191) MSGF(QCPFMSG)
                   TOMSGQ(xxx)
                   MSGDTA('MYOBJ     MYLIB     XXX')

The special value of  *DISPLAY for TOMSGQ could be used  to display the
text of  the message instead of sending the  message to a message queue
such as:

     SNDPGMMSG4  MSGID(CPC2191) MSGF(QCPFMSG)
                   TOMSGQ(*DISPLAY)
                   MSGDTA('MYOBJ     MYLIB     XXX')

The  message  text  would  appear  as  the  type  sent  (*INFO  is  the
default).

SNDPGMMSG4 escape messages you can monitor for
----------------------------------------------

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

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

   MSGID         The message ID to be sent.

   MSGF          The message  file  containing  the message  ID.    The
                 library  qualifier  defaults  to  *LIBL.   A  specific
                 library  or the special  value *CURLIB  could be used.

   TOMSGQ        The  message queue  to  send  the  message  to.    The
                 special  value  *DISPLAY  may  be  used  to  send  the
                 message  to  the current  job.   This  can  be helpful
                 when testing how replacement  data will appear in  the
                 message text.

                 The  qualified library  name  defaults  to *LIBL.    A
                 specific  library or the  special value  *CURLIB could
                 be used.

   MSGDTA        The  message data to be used  with the message ID.  Up
                 to 3000 bytes may be entered.

                 The CPF9898  and CPF9897  message IDs  use the  entire
                 MSGDTA as the message text.

                 Many message  IDs allow  for replacement data  to make
                 the actual message text more meaningful.

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

   CCSID         The coded character set  ID to be used.   *JOB is  the
                 default.    A  value  between   1  and  65535  may  be
                 entered.


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

None.

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

The following TAA Tools must be on your system:

     CHKMSGID        Check message ID
     CHKOBJ3         Check object 3
     RSNLSTMSG       Resend last message
     SNDCOMPMSG      Send completion message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message

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

None, the tool is ready to use.

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

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

   SNDPGMMSG4    *CMD                   TAAMSJU       QATTCMD
   TAAMSJUC      *PGM       CLP         TAAMSJUC      QATTCL
					

Added to TAA Productivity tools January 15, 2014


Home Page Up to Top