TAA Tools
PMTOPR2         PROMPT OPERATOR 2                      TAADSPQ

The  Prompt Operator  2 command  is  a simpler  version  of PMTOPR  and
DSPWINDOW.   It allows a CL program to  display a window and optionally
allow  an F12 for Cancel and/or  a Y/N return value.   Up to 6 lines of
text may  appear plus a  title.   PMTOPR2 provides a  simple method  of
communicating with an operator.

A typical command would be:

             DCL        &RESPONSE *CHAR LEN(1)
              .
             PMTOPR2    TITLE('Zero Out YTD Fields') TYPE(*YESNO12) +
                          RTNVAL(&RESPONSE) LINE1('Do you +
                          want to zero out the') LINE2('  YTD +
                          fields?') STRPOS(20)
             IF         (&RESPONSE *EQ 'C') DO /* Cancel */
              .
             ENDDO      /* Cancel */
             IF         (&RESPONSE *EQ 'Y') DO /* Yes */
              .
             ENDDO      /* Yes */
             IF         (&RESPONSE *EQ 'N') DO /* No */
              .
             ENDDO      /* No */

The window would appear over the current screen as:

    xxxxxxxxxx  ..................................... xxx
    xxxxxxxxxx  :        Zero Out YTD Fields        : xxx
    xxxxxxxxxx  :                                   : xxx
    xxxxxxxxxx  :  Enter Y/N and press Enter,       : xxx
    xxxxxxxxxx  :     or F12 to cancel.             : xxx
    xxxxxxxxxx  :                                   : xxx
    xxxxxxxxxx  :  Do you want to zero out the      : xxx
    xxxxxxxxxx  :    YTD fields?                     : xxx
    xxxxxxxxxx  :                                   : xxx
    xxxxxxxxxx  :                                   : xxx
    xxxxxxxxxx  :                                   : xxx
    xxxxxxxxxx  :                                   : xxx
    xxxxxxxxxx  :                                   : xxx
    xxxxxxxxxx  :  Choice . . . . .  _  Y=Yes, N=No : xxx
    xxxxxxxxxx  :                                   : xxx
    xxxxxxxxxx  :  F12=Cancel                       : xxx
    xxxxxxxxxx  :                                   : xxx
    xxxxxxxxxx  :                                   : xxx
    xxxxxxxxxx  :...................................: xxx

The 'xxxx' values  would be whatever was on  the display before running
PMTOPR2.   The border  of the  window will be  a solid line  (blue on a
color display).

The TYPE parameter can be:

  **   *INFO Information is  displayed.  Only the  Enter key is  valid.

  **   *INFO12 Information is  displayed.  Either the Enter  key or F12
       is valid.   The RTNVAL variable will be blank,  or C (if F12 was
       pressed).

  **   *YESNO Information is displayed and  the user must respond  with
       Y or N.   F12 is  not valid.  The  RTNVAL variable will be  Y or
       N.

  **   *YESNO12  Information is  displayed  and the  user  must respond
       with  Y, N, or F12.   The RTNVAL variable will be  Y, N or C (if
       F12 was pressed).

The text that says 'Choice .  .  ' may be changed.

PMTOPR2 escape messages you can monitor for
-------------------------------------------

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

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

   TITLE         The title  of  the window.    Up to  32  bytes may  be
                 entered.      The   title   will   be   centered   and
                 highlighted.

   TYPE          The type of display.

                 *INFO  may  be entered  to  provide  information only.
                 Only the Enter  key is valid.   No RTNVAL variable  is
                 required (if specified  it will not be  changed within
                 PMTOPR2).

                 *INFO12  may be entered  to provide  information.  The
                 user must  respond with  the Enter  key or  F12.   The
                 RTNVAL   variable  is   required   and  will   contain
                 blank=Enter or C=F12.

                 *YESNO  may  be  specified  meaning a  response  field
                 will  appear on the  display and a  RTNVAL variable is
                 required.   F12 is  not  valid.   The RTNVAL  variable
                 will contain Y=Yes or N=No.

                 *YESNO12  may be  specified meaning  a response  field
                 will  appear on the  display and a  RTNVAL variable is
                 required.  F12  will be  valid.   The RTNVAL  variable
                 will contain Y=Yes, N=No, or C=F12.

   RTNVAL        If  required, it  must  be declared  as *CHAR  LEN(1).
                 See  the TYPE  parameter for when  it is  required and
                 what will be returned.

   LINE1         Up to 32 bytes of text for line 1 of the window.

   LINE2         Up to 32 bytes of text for line 2 of the window.

   LINE3         Up to 32 bytes of text for line 3 of the window.

   LINE4         Up to 32 bytes of text for line 4 of the window.

   LINE5         Up to 32 bytes of text for line 5 of the window.

   LINE6         Up to 32 bytes of text for line 6 of the window.

   CHOICE        The  text  for  the  'Choice'  line  before  the   one
                 character  entry  field.    Up  to  16  bytes  may  be
                 entered.     The  default  is   'Choice'  followed  by
                 periods.   The 'Choice'  line only appears  if TYPE is
                 *YESNO or *YESNO12.

   STRLIN        The line where the  window should start.   The default
                 is 2.  A number between 1 and 6 may be specified.

   STRPOS        The  position  on the  line  where  the window  should
                 start.   The  default  is 43  meaning the  window will
                 appear on the  right edge  of the display.   A  number
                 between 2 and 43 may be specified.


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

None.

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

The following TAA Tools must be on your system:

     ADJVAR          Adjust variable
     RTVVALA         Retrieve value attributes
     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
   ------        ----    ---------      ----------    ----------

   PMTOPR2       *CMD                   TAADSPQ       QATTCMD
   TAADSPQC      *PGM       CLP         TAADSPQC      QATTCL
   TAADSPQD      *FILE      DSPF        TAADSPQD      QATTDDS
					

Added to TAA Productivity tools January 15, 2009


Home Page Up to Top