TAA Tools
DSPRPGHLP       DISPLAY RPG HELP                       TAARPHP

The Display  RPG Help tool  provides help text  and samples for  1) RPG
III  operation codes  and 2)  RPG IV  operation  codes (both  fixed and
free  form), Built-in functions, and H/F/D  keywords.  Help text may be
displayed when  using the Source  Entry Utility  (SEU) by entering  'H'
or  %  in  any  column  of  the  sequence  number  or  by  the  command
DSPRPGHLP.   An exit program  must be specified for  SEU.  In addition,
the F7 command key can be used to split a line or join 2 lines.

The typical solution for DSPRPGHLP is  to enter an 'H' in the  sequence
columns during SEU such  as is shown in the  following on line 0077.00.

0071.00      C****************************************************
0072.00      C*                                                  *
0073.00      C*     End of program                               *
0074.00      C*                                                  *
0075.00      C****************************************************
0076.00      C           ENDPGM    TAG
H077.00      C                     ADD  1         TOTAL   30
0078.00      C                     EXCPTFINAL
0079.00      C                     SETON                     LR

After pressing Enter, the following help display would appear:

******************************************************************

                  Display RPG Help - TAA                   TAASYS11
                                                 12/22/09  20:26:54
       ADD            Add                                      *RPG

  The ADD operation does either:

    a) Adds "Factor 1" to "Factor 2" and places the result in the
       "Result field".

    b) Adds "Factor2" to the "Result field".

  "Factor 1" and/or "Factor 2" may be literals or field names.

Samples:           Factor1+++OpcdeFactor2+++ResultLenDHHiLoEq
  1.               100       ADD  200       TOTAL

     The TOTAL field would be equal to 300.

  2.               FIELDA    ADD  200       TOTAL

                                                             More...
 F3=Exit     F6=Samples    F7=All RPG Op Codes     F8=All RPG Help
 F10=Move to top     F12=Cancel

******************************************************************

To  make the Sequence  column entries  operative, you must  register an
exit program to the  Source Entry Utility  (see the later  discussion).

You can demonstrate the function with the command:

             DSPRPGHLP

A menu is  displayed and you  may select a type.   A list of  the items
is displayed for  the type and the specific  details may be accessed by
entering  a '5' for  display.  You  can access the  menu by entering an
'*' into any column of the sequence number.

You may directly  request the detail  information by entering  commands
such as:

             DSPRPGHLP     KWD(SCAN) TYPE(*RPG)

             DSPRPGHLP     KWD(DATFMT) TYPE(*RPGLEH)

             DSPRPGHLP     KWD('%ADDR') TYPE(*RPGLEBIF)

Operation  codes,  Built-in  functions,  and keywords  are  all  termed
'keywords'.   Note that  a Built-in function keyword  must be specified
in quotes when entered via command.

To use  the  'H',  '%' or  '*'  functions  during SEU,  see  the  later
section on 'Identifying the DSPRPGHLP exit program to SEU'.

F6 and F10 Keys during the detail help display
----------------------------------------------

Assume you entered:

             DSPRPGHLP     KWD(SCAN) TYPE(*RPG)

The  first  page  describes  the  operation   code.    If  you  already
understand  the operation  code, but need  samples of  how it  is used,
press F6.  This will position the display to the samples section.

If you  are reading  a section  of text  or a  sample, you  may want  a
specific  section to  appear  at  the top  of  the  display.   You  may
position  the  cursor  to  the  line  on  the  display  that  you  want
displayed  at  the  top  and  press F10.    This  will  re-position the
display.   This is  the same function  as exists  when viewing  command
help.

Registering the DSPRPGHLP exit program to SEU
---------------------------------------------

There  are two  choices for  registering the  RPG exit  program  to SEU
(Source Entry Utility):

  **   System  wide.  The  system Program  Registration Facility allows
       you to register the  TAA program for all  users.  As an  *ALLOBJ
       user, enter:

             STRRPGHLP

       If  no   other  exit  program   has  been  registered   for  the
       QIBM_QSU_LCMD  exit point, the TAASEUAR  program in TAATOOL will
       be added.  Once  this is done,  any user on  the system will  be
       able to  use the H,  %, or *  functions within SEU  (some people
       assume that  PDM is the editor,  but it is a front  end to SEU).

       If  you already have  an exit point  program specifying PGMNBR =
       1, an  error message will  occur.  See  the later discussion  of
       Multiple Exit Programs.

       If you are  not sure whether you have an  exit program that will
       is being used by SEU, do the following:

         --   Enter WRKREGINF

         --   Rollup to QIBM_QSU_LCMD

         --   Use Option 8 'Work with exit programs'

         --   Any existing exit programs will be identified.

  **   Individual user.  As an individual user, enter:

         --   STRSEU for some source member

         --   Use F13 and rollup to the second display

         --   The   default  for  'User  exit   program'  is  '*REGFAC'
              meaning  the   system   Registration  Facility   with   a
              'Program selection filter' of '*ALL'

         --   Enter  TAASEUAR  as  the 'User  exit  program'  name  and
              press Enter.

         --   A  'Library' prompt will  appear instead  of the 'Program
              selection filter' prompt.  Enter TAATOOL.

Source Entry Utility (SEU) Help Request using 'H', '%' or '*'
-------------------------------------------------------------

Once the  DSPRPGHLP  program  is  registered,  you  may  enter  special
characters  into any  of  the columns  of  the source  sequence  number
during SEU.

  **   RPG III Source

         --   The 'H' character may only be used on a C spec.

         --   The '*' character may be used anywhere.

  **   RPG IV Source

         --   The H character may be used for H, F, D, or C specs.

         --   The % character may be used on D or C specs.

         --   The * character may be used anywhere.

Entering   one  of  the   special  characters  invokes   the  DSPRPGHLP
function.

An  RPG  III C  spec can  contain a  single  operation code.   However,
multiple keywords or  Built-in functions may exist  on the same RPG  IV
statement.    If  multiples  exist,  the cursor  position  is  used  to
determine  where to  scan  from.   By positioning  the cursor,  you may
request help on a specific keyword or built-in function.

Free form RPG IV  is supported by scanning the  line of source for  the
operation code.

If an  operation code cannot  be determined  for fixed form,  a special
display  appears to  allow  you to  correct the  name.   For  free form
operation  codes  or  any  other  keywords  that  cannot  be  found  or
determined, an error message will appear.

F7 Split and Join line function
-------------------------------

The Source Entry  Utility allows F7 to  be defined by an  exit program.
The TAA supplied  exit program defines F7 to allow  you to split a line
during an update session or to join a line from two statements.

Splitting  a  line can  be useful  when using  EVAL, when  writing text
comments,  UIM help  text,  or  with text  to  be  printed by  the  TAA
PRTSEUTXT command.

For example, assume you keyed a comment such as:

       C* This is the best line of documentation ever written.

Assume  you  want  to  split  this  line  between  'documentation'  and
'ever'.   You would place the cursor on  the first letter of 'ever' and
press F7.

The line would split to two lines as:

       C* This is the best line of documentation
       C* ever written.

You can now add additional words as required.

F7 can  also be  used to  join two  lines.   In  the preceding  example
where  the  line  ends  with   'documentation,  place  the  cursor  two
positions  after  'documentation' and  press  F7.   If  there  are only
blanks following  the cursor  position,  the two  lines would  be  made
into one  as  it was  originally.   You cannot  join a  comment with  a
non-comment line.

The F7  function may be used on  many source types, not just  RPG.  For
RPG  III,  only  comment lines  are  supported.   For  RPG  IV, comment
lines,  free  form   comments,  extended  Factor   2,  and  free   form
calculations are supported.

Supported RPG types
-------------------

RPG syntax is either RPG or RPGLE.  The following are supported:

  **   RPG types = RPG, RPG38, SQLRPG, RPT, RPT38

  **   RPGLE types = RPGLE (either free or fixed form), SQLRPGLE

Multiple Exit Programs for QIBM_QUS_LCMD
----------------------------------------

If you  already have one or  more exit programs defined  for the Source
Entry   Utility,  you  may   still  register  the   RPG  program  using
STRRPGHLP.   The PGMNBR  value  determines the  sequence in  which  the
exit programs  will be  called (also  see the  next section on  Program
Selection Filter).

Regardless  of the PGMNBR value,  the SEU functions such  as 'C' or 'M'
are processed before any exit programs.

If the  TAA program  is not  first, it  is possible  that another  exit
program may also define  the use of 'H', '%',  or '*'.  If so,  the TAA
function  will not  be operable.   If  a  lower sequenced  PGMNBR value
defines  a program that  does not define  the use of  'H', '%', or '*',
it is probable that the TAA function will occur.

If  the TAA  program  occurs  before  another exit  program,  the  only
characters that are  processed by the TAA program will  be 'H', '%', or
'*'.   If a different character exists,  the TAA program ignores it and
an additional exit program will probably process it.

Any exit  program may  use  the F7  function  allowed by  SEU.   It  is
probable  that if  multiple exit  programs defined  a use  for F7  that
each would be performed.

Program Selection Filter for Multiple Exit Program Control
----------------------------------------------------------

In the  previous discussion of 'Registering  the DSPRPGHLP exit program
to SEU'  the F13  prompt was  described.   If  you have  multiple  exit
programs, an individual user  can control which exit program  should be
used for his sessions by entering a 'Program selection filter'.

This  would be necessary  if the TAA  exit program  was not first  on a
system  wide basis, but an individual user  wanted to make it his first
choice.

To do this use  SEU and the F13 prompt  and rollup to the second  page.
To ensure  the TAA function is  processed first, ensure  the 'User exit
program'  prompt  is *REGFAC.    Enter the  'Program  selection filter'
value as 'TAA'.

Another  alternative for  the  individual  user  is  described  in  the
section on 'Registering the the DSPRPGHLP exit program to SEU'.

DSPRPGHLP escape messages you can monitor for
---------------------------------------------

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

DSPRPGHLP command parameters                          *CMD
----------------------------

   KWD           The keyword  to enter.   The default  is *ALL  and may
                 be  used with any  of the  RPGTYPE entries.   Op codes
                 and BIFs are considered keywords.

                 A   Built-in    Function    may   be    entered    for
                 TYPE(*RPGLEBIF).   Because  the %  sign  is not  valid
                 when using  the prompter with  a value such  as %ADDR,
                 you must quote the value such as '%ADDR'.

   RPGTYPE       The type of RPG help.

                 *ALLRPG  is  the default,  but may  only be  used when
                 KWD(*ALL) is specified.

                 If the  entry is  other  than *ALLRPG,  the KWD  value
                 entered must  be found in the appropriate  group.  For
                 example,  KWD(ADD) may  be entered  for an  RPGTYPE of
                 *RPG or *RPGLEOP,  but is not valid  for *RPGLEF.   If
                 the  keyword  cannot  be   found,  a  special  display
                 appears and allows an entry of a correct value.

                 *RPG  may  be entered  for  the  Source Entry  Utility
                 types of RPG, RPG38, SQLRPG, RPT, and RPT38.

                 *RPGLEOP  should  be   entered  for  RPGLE   operation
                 codes.

                 *RPGLEBIF  should   be  entered  for   RPGLE  Built-in
                 functions.

                 *RPGLEH should be entered for H Spec keywords.

                 *RPGLEF should be entered for F Spec keywords.

                 *RPGLED should be entered for D Spec keywords.

STRRPGHLP command parameters                          *CMD
----------------------------

   PGMNBR        The number  assigned to specify the  sequence in which
                 multiple  exit programs  for the same  exit point will
                 be invoked.  The default is 1.

                 A specific number  is only  of importance if  multiple
                 exit  programs are used.   If  you have  multiple exit
                 programs  for the  QIBM_QSU_LCMD  exit point,  see the
                 previous documentation.

PRTRPGHLP command parameters                          *CMD
----------------------------

   RPGTYPE       The type of RPG help.

                 *RPG may  be  entered  for the  Source  Entry  Utility
                 types of RPG, RPG38, SQLRPG, RPT, and RPT38.

                 *RPGLEOP  should   be  entered  for   RPGLE  operation
                 codes.

                 *RPGLEBIF   should  be  entered   for  RPGLE  Built-in
                 functions.

                 *RPGLEH should be entered for H Spec keywords.

                 *RPGLEF should be entered for F Spec keywords.

                 *RPGLED should be entered for D Spec keywords.

   KWD           The keyword to  enter.   The default is  *ALL and  may
                 be used  with any of  the RPGTYPE  entries.  Op  codes
                 and BIFs are considered keywords.

                 A    Built-in   Function    may    be    entered   for
                 TYPE(*RPGLEBIF).    Because the  %  sign is  not valid
                 when using the  prompter with a  value such as  %ADDR,
                 you must quote the value such as '%ADDR'.

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

None.

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

The following TAA Tools must be on your system:

     CHKALLOBJ       Check *ALLOBJ special authority
     EDTVAR          Edit variable
     SNDCOMPMSG      Send completion message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message
     TRNVAL          Translate value

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

The DSPRPGHLP command may be used immediately.

To use the  'H', '%', or '*' function in the  Source Entry Utility, you
must register an Exit program as described previously.

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

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

   DSPRPGHLP     *CMD                   TAARPHP       QATTCMD
   STRRPGHLP     *CMD                   TAARPHP2      QATTCMD
   PRTRPGHLP     *CMD                   TAARPHP3      QATTCMD
   TAARPHPC      *PGM       CLP         TAARPHPC      QATTCL
   TAARPHPC2     *PGM       CLP         TAARPHPC2     QATTCL
   TAARPHPC3     *PGM       CLP         TAARPHPC3     QATTCL
   TAARPHPR      *PGM       RPG         TAARPHPR      QATTRPG
   TAARPHPR2     *PGM       RPG         TAARPHPR2     QATTRPG
   TAARPHPR3     *PGM       RPG         TAARPHPR3     QATTRPG
   TAASEUAR      *PGM       RPGLE       TAASEUAR      QATTRPG
   TAARPHPD      *FILE      DSPF        TAARPHPD      QATTDDS
   TAARPHPE      *FILE      DSPF        TAARPHPE      QATTDDS
   RPGHLPP       *FILE      PF

The  RPGHLPP file contains the  detail help text in  a compressed form.

Structure
---------

DSPRPGHLP   Cmd
   TAARPHPC   CL pgm
     TAARPHPR   RPG Pgm  - For individual help text
       TAARPHPD   - Dsp file
     TAARPHPR2  RPG Pgm  - For list of all keywords
       TAARPHPE   - Dsp file

STRRPGHLP   Cmd
   TAARPHPC2  CL pgm

PRTRPGHLP
   TAARPHPC3  CL pgm
     TAARPHPR3  RPG Pgm
					

Added to TAA Productivity tools February 1, 2005


Home Page Up to Top