TAA Tools
DSPMSGWDW       DISPLAY MESSAGES IN A WINDOW           TAAMSHS

The Display Messages  in a Window  command allows a message  subfile to
be  displayed  as  a window.    The  messages  in  the current  program
message  queue are displayed.  The command is  intended for use in a CL
program or to be executed from a HLL program using QCMDEXC.

A demonstration command exists (see later discussion).

The DSPMSGWDW command has no parameters and would be entered as:

            DSPMSGWDW

If no messages exist, no function occurs.

If at least  one message exists, the  message subfile appears with  the
first message.

If additional  messages exist, a '+'  symbol will appear at  the end of
each message.

F1  or HELP  may be  used in  conjunction with  the cursor  position to
access the second level text of a message.

Any messages that are displayed  will not be re-displayed if  DSPMSGWDW
is  called again  (even  though the  messages may  still  exist in  the
program message queue, DSPMSGWDW will only display a message once).

The  display  file  in  use  when  DSPMSGWDW  is  run,  may  be  either
RSTDSP(*YES) or RSTDSP(*NO).

Note that  you  cannot  test  the function  of  DSPMSGWDW  by  using  a
command  entry line  (because  no  messages  exist at  that  point,  no
action  occurs).   See  the DMOMSGWDW  command discussion  to  test the
function.   The function is designed to work  from a CL or HLL program.

The CRTMSGWDWD  command may be  used to  define options  to be used  by
DSPMSGWDW:

  **   Window  size.    The  number  of messages  that  appear  in  the
       subfile  at one  time.  The  default is  1.  1,  2, or  3 may be
       specified.

  **   Start line.   Where  the subfile  should start  on the  display.
       The default is line 20.  The following must be met:

                 WINSIZ(1)   STRLIN must be between 2-20.
                 WINSIZ(2)   STRLIN must be between 2-19.
                 WINSIZ(3)   STRLIN must be between 2-18.

  **   Remove messages.   The default  is *NO.   *YES may  be specified
       to  cause any messages  to be  cleared from the  program message
       queue after they are displayed.

  **   Omit list of messages.  Up  to 100 message IDs may be  described
       that will be omitted (not appear in the message subfile).

CRTMSGWDWD  uses a  prompt  override program  to  extract the  existing
values  from the  TAAMSGWDW data  area  (if any)  so you  may  view the
current definition.

The  data area  TAAMSGWDW is  automatically created  in QTEMP  to allow
communication  between  CRTMSGWDWD  and  DSPMSGWDW  and  to   hold  the
message key of the last message displayed.

Dummy DDS format required
-------------------------

In  order for  a window  to  operate properly,  you must  have a  dummy
format  defined in the display  file that will  have the window written
over it.

If  you  do  not  already  have  a  dummy  ASSUME  record  format,  the
following code may be copied to your display file DDS:

     A****************************************************************
     A* The dummy assume record allows the window to overlay.
     A*   Without this, the window appears on a blank display.
     A          R ZHDUMMY                   ASSUME
     A                                  1  2' '

Differences with a normal Message Subfile
-----------------------------------------

Normally, a  Message Subfile  is coded  to operate  within the  program
and  display file that require  it.  Separate formats  are used for the
message subfile and an window would not typically be used.

DSPMSGWDW uses  a  'window' for  the  messages which  operates  from  a
separate program.

With either  technique,  the user  can roll  thru  messages and  access
second level text.

With a normal  message subfile, the user may  enter other fields on the
display  as well as  review messages in  the subfile.   The program can
determine what  messages  should be  written  to the  message  subfile.
The same message can  be resent to appear in a another  use of the same
message subfile.

Because  DSPMSGWDW uses a  'window', the end  user must  end the window
format before  any  action can  be  taken on  the  main display.    All
messages  that exist,  are placed  in  the message  subfile and  appear
only once.

Demonstrating DSPMSGWDW
-----------------------

A  demonstration command  (and display  file) are  provided so  you can
try out the function of DSPMSGWDW.  Enter the command as:

           DMOMSGWDW   WINSIZ(n)

where the window size can be 0-5.

A entry  of  0 does  not  cause any  message  to be  sent.    DSPMSGWDW
recognizes that  no messages exist  and no  action occurs (the  message
subfile is  not displayed).   The demonstration program  will display a
line stating that no action has occurred.

The  messages that are sent are just samples.   The first level of text
describes if a second level  exists.  The different number  of messages
allows you to try out the rolling of messages.

Requesting  5 messages,  displays  two messages  (TAA9873 and  TAA9874)
which can be omitted using the CRTMSGWDWD command.

The  CRTMSGWDWD command  lets  you set  one or  more options  that will
vary the size of  the subfile, where it  starts, if messages should  be
removed, and any message IDs to be ignored.

CRTMSGWDWD escape messages you can monitor for
----------------------------------------------

      CPF9898    The WINSIZ and STRLIN values do not allow the
                   window to be displayed.

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

DSPMSGWDW escape messages you can monitor for
---------------------------------------------

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

DSPMSGWDW parameters                                  *CMD
--------------------

None.

CRTMSGWDWD parameters                                 *CMD
---------------------

   WINSIZ        The window  size to use.   The default is 1  meaning a
                 subfile of  1 will be displayed.   This is the typical
                 solution used  by system  displays  such as  the  MAIN
                 menu.   If  additional messages  exist,  a '+'  symbol
                 will appear at the end of each message.

                 An  entry of  2 or  3 may  be  specified to  cause the
                 subfile  to appear with either 2  or 3 lines.  If only
                 one message exists, only  the first line is  used (the
                 other lines will  be blank).  An entry of  2 or 3 must
                 be specified with an appropriate value for STRLIN.

   STRLIN        The  start line  where the  subfile will appear.   The
                 default is line  20.   Using the  WINSIZ default,  the
                 STRLIN value  must be  between 2  and 20.   The  first
                 (or  only  message) in  the  subfile  will appear  one
                 line down from the STRLIN value.

                 If WINSIZ(2) is  specified, the STRLIN  value must  be
                 between 2 and 19.

                 If WINSIZ(3)  is specified, the  STRLIN value  must be
                 between 2 and 18.

   RMVMSG        Whether  to  remove  the  messages  from  the  program
                 message  queue after they  are displayed.   *NO is the
                 default meaning  the messages  remain  in the  program
                 message  queue.  If  no other  action occurs  to clear
                 the  program message  queue, the messages  will appear
                 in the job log.

                 *YES may  be specified  to cause  the  messages to  be
                 removed after they are displayed.

                 DSPMSGWDW   will   only   display   a   message   once
                 regardless of the value specified for RMVMSG.

   OMITMSGID     A  list of up to  100 message IDs to  be omitted.  The
                 default is *NONE.

                 If a  message ID  is identified  and is  received,  it
                 will be  omitted and  will not  appear in the  message
                 subfile.

DMOMSGWDW parameters                                  *CMD
--------------------

   WINSIZ        The window  size to use.   The default is  1 meaning a
                 subfile  of 1 will be displayed.   This is the typical
                 solution used  by  system displays  such  as the  MAIN
                 menu.   If  additional  messages exist,  a '+'  symbol
                 will appear at the end of each message.

                 An  entry of  2  or 3  may be  specified to  cause the
                 subfile to appear with either  2 or 3 lines.  If  only
                 one message exists,  only the first line  is used (the
                 other lines will be blank).

   RMVMSG        Whether  to  remove  the  messages  from  the  program
                 message queue after  they are displayed.   *NO is  the
                 default meaning  the  messages remain  in the  program
                 message  queue.  If  no other  action occurs  to clear
                 the  program message  queue, the  messages will appear
                 in the job log.

                 *YES may  be specified  to  cause the  messages to  be
                 removed after they are displayed.

                 DSPMSGWDW   will   only   display   a   message   once
                 regardless of the value specified for RMVMSG.

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

The  dummy window format  described earlier must appear  in the display
file where the window is to be  placed if you do not already have  such
a format.

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

     EXTLST2         Extract list 2
     SNDCOMPMSG      Send completion message
     SNDESCMSG       Send escape message
     SNDPGMMSG2      Send program message 2

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

None, the tool is ready to use.

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

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

   DSPMSGWDW     *CMD                   TAAMSHS       QATTCMD
   CRTMSGWDWD    *CMD                   TAAMSHS2      QATTCMD
   DMOMSGWDW     *CMD                   TAAMSHS3      QATTCMD
   TAAMSHSC      *PGM       CLP         TAAMSHSC      QATTCL
   TAAMSHSC2     *PGM       CLP         TAAMSHSC2     QATTCL
   TAAMSHSC3     *PGM       CLP         TAAMSHSC3     QATTCL
   TAAMSHSC12    *PGM       CLP         TAAMSHSC12    QATTCL
   TAAMSHSR      *PGM       RPG         TAAMSHSR      QATTRPG
   TAAMSHSD      *FILE      DSPF        TAAMSHSD      QATTDDS
   TAAMSHSE      *FILE      DSPF        TAAMSHSE      QATTDDS
   TAAMSGWDW     *DTAARA

The TAAMSGWDW  data area  is automatically created  in QTEMP  by either
DSPMSGWDW or CRTMSGWDWD and is used for communication.


Structure
---------

DSPMSGWDW  Cmd
  TAAMSHSC   CL
    TAAMSHSR   RPG
      TAAMSHSD   DSPF

CRTMSGWDWD  Cmd
  TAAMSHSC2  CL
    TAAMSHSC12  CL for Prompt Override program

DMOMSGWDW   Cmd
  TAAMSHSC3  CL
      TAAMSHSE   DSPF
					

Added to TAA Productivity tools February 28, 2000


Home Page Up to Top