TAA Tools

 DSPMSGDTA       DISPLAY MESSAGE DATA                   TAAMSGN

 The  Display Message  Data  command  is  intended to  assist  you  when
 working with  messages that have  multiple message data  fields and you
 want to access a field from within the message data.

 When  the  system command  DSPMSGD is  used, the  layout of  the fields
 within the message data is shown,  but it is not easy to  determine the
 starting position of  the field you are interested in.   It is also not
 convenient  to determine which field you want  from the message data as
 the information is not presented on the same display.

 The DSPMSGDTA  command  displays  or  prints  the  message  information
 (first  and   second  level)  followed   by  the  message   data  field
 descriptions including the starting and ending position.

 Assume you  want to access the  number of records copied  by CPYF.  You
 would first determine the CPYF completion message as CPC2955.

 You would then use DSPMSGDTA as follows:

         DSPMSGDTA   MSGID(CPC2955)

 The first and second level text would  be displayed.  You can see  that
 you want  field &7 by  reading the  first level text.   The display  of
 the message data  fields shows &7 as being a  *BIN 4 field beginning in
 position  75  of the  message  data.   To  access the  data,  you would
 specify:

         DCL         &DEC9 *DEC LEN(9 0)
          .
          .
         CHGVAR      &DEC9 %BIN(&MSGDTA 75 4)

 DSPMSGDTA is  implemented by the  use of  DSPMSGD, CPYSPLF and  reading
 the spooled output.

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

    MSGID         The message ID to be displayed.

    MSGF          The  qualified name  of the  message file.    *LIBL is
                  the default for the library.

    OUTPUT        Whether  to display or print the output.   An * is the
                  default and  means to  display if  used  interactively
                  or  print if  used in  batch.   *PRINT causes  spooled
                  output.   The interactive display is  done by printing
                  the output and  then the use  of DSPSPLF and  DLTSPLF.

    PRTFILE       The qualified  name of  the printer  file to be  used.
                  QPRINT is the default.

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

   **   Because  the   DSPMSGD  output  is  copied   with  CPYSPLF,  the
        DSPMSGDTA  function is  release dependent.   Only  the lower and
        upper case  English language  versions  are supported.   If  the
        format  of   the  DSPMSGD  printed   output  is  changed   on  a
        subsequent release, the program must be modified.

   **   In  some  cases a  type  of *VARY  does not  describe  the exact
        message data  layout.   For  example,  some messages  include  a
        variable length  field that  is only  determined by  the program
        when  it needs to send  the message.  For  these cases, you must
        operate with the specific program message that is sent.

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

 The following TAA Tools must be on your system:

            RTVSYSVAL3     Retrieve system value 3
            SNDCOMPMSG     Send completion message
            SNDESCMSG      Send escape message
            SNDSTSMSG      Send status message

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

 None, the tool is ready to use.

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

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

    DSPMSGDTA     *CMD                       TAAMSGN       QATTCMD
    TAAMSGNC      *PGM           CLP         TAAMSGNC      QATTCL
    TAAMSGNR      *PGM           RPG         TAAMSGNR      QATTRPG

Added to TAA Productivity Tools April 1, 1995


Home Page

Last modified on November 19, 2014 © 1995, 2014 - TAA Tools, Inc.