SNDLNGMSG       SEND LONG MESSAGE                      TAAMSIT

 The Send Long  Message command is intended  as a debugging aid  to send
 one or more  messages from a large variable.   This allows the value of
 the  variable to be more  easily seen on a  command entry display or in
 the job log.   The message length may be  between 10 and 512.   A ruler
 is optional.

 A typical series of commands would be:

              DCL        &CMD *CHAR LEN(3000)
               .
              CHGVAR     &CMD (' ... ')
              SNDLNGMSG  MSG(&CMD)
              CALL       QCMDEXC PARM(&CMD 3000)

 After building  up the  command, SNDLNGMSG sends  one or  more messages
 to  the  program  message  queue  (by  default)  of  the program  using
 SNDLNGMSG.   If  the  CALL  to  QCMDEXC  fails,  the  complete  set  of
 messages  that were  sent will  exist  in the  job  log.   If the  CALL
 completes normally,  a RMVMSG CLEAR(*ALL) may be  used to clear out the
 job log messages.

 The length of the  message defaults to 512  bytes (the largest  message
 that can be sent).   A shorter length is often  desirable if attempting
 to keep each  message on one line of text  for either the command entry
 display or in the job log.

 A  special value  *FMT exists  for the  MSGLEN parameter.   This allows
 formatting of  the text  (words are  not split  over 2  lines) and  the
 length of each line is constrained as follows:

   **   If the command  is run in an interactive  job, messages designed
        for  a  command entry  display  with a  length of  73  bytes are
        used.

   **   If the command is  run in a batch  job, messages designed for  a
        job log with a length of 58 bytes are used.

 If  you do  not  want  the 'non'splitting'  function,  but  do want  to
 specify a length of the line, typical lengths would be:

         Command entry line  = 73   Max on one line of a display
         Job log             = 58   Max on job log message

 A  ruler  may be  requested  to assist  in  finding  specific positions
 within the message.   If a  ruler is needed,  a typical message  length
 would be 50.  This will allow you to more easily count positions.

 The full  message value is  examined and  only those segments  (defined
 by  the  MSGLEN parameter)  will  be  sent as  a  message  if they  are
 non-blank

 SNDLNGMSG escape messages you can monitor for
 ---------------------------------------------

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

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

    MSG           The  message to  be split up  by the  MSGLEN value and
                  sent as separate  messages.  Up  to 5000 bytes may  be
                  entered.

                  The  full message  value  is examined  and only  those
                  segments  (defined by  the  MSGLEN parameter)  will be
                  sent as a message if they are non-blank

    MSGLEN        The message length  to be  sent.  The  default is  512
                  which  is  the  maximum  length message  that  can  be
                  sent.  The length must be between 10 and 512.

                  If  you just need  to see the  message text, 512  is a
                  good choice.

                  *FMT should be  specified if you  want formatted  text
                  (words are not  split between two lines).   The length
                  of  the  line  will  be  73  if  the  command  is  run
                  interactively  and 58 if the  command is run in batch.

                  If  you  want  words  to  be  split  over  the  lines,
                  typical  choices are  73 for  a command  entry message
                  and 58 for a job log message.

                  If  RULER(*YES) is specified, the  message length must
                  be between 20 and  80.  A typical  choice would be  50
                  to assist  you in  counting specific  positions within
                  the text.

    RULER         A  *YES/*NO  value for  whether  a  'ruler' should  be
                  sent as the first  message identifying the  positions.

                  *NO is the default to not send a 'ruler' message.

                  *YES may be specified  to send a 'ruler' as  the first
                  message.    If *YES  is  specified,  the MSGLEN  value
                  must be between 20 and 80.

                  A   typical   length   is  50   to   allow   a  simple
                  determination  of  the  exact  positions   within  the
                  message text.

    TOPGMQ        The  program message  queue  to send  the message  to.
                  The  default  is *SAME  meaning the  message  queue of
                  the  program  using  SNDLNGMSG.     This  allows   the
                  program  to clear  out  the  messages if  the  program
                  completes normally by using RMVMSG CLEAR(*ALL).

                  *PRV  may be entered to  have the message  sent to the
                  program prior in the call stack.

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

 None.

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

 The following TAA Tools must be on your system:

      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
    ------        ----    ---------      ----------    ----------

    SNDLNGMSG     *CMD                   TAAMSIT       QATTCMD
    TAAMSITC      *PGM       CLP         TAAMSITC      QATTCL

Added to TAA Productivity Tools November 15, 2005


Home Page

Powered by AS/400Powered by AS/400 Last modified on July 15, 2010 © 1995, 2010 - Jim Sloan, Inc.