TAA Tools

The Check  RPG Spelling  command checks  the literals in  any RPG  type
source.  A spooled file is created if any spelling errors exist.

You  must  have a  dictionary  such  as TAADFT  on  your  system.   The
QTWCHKSP  API  is  used  which  is  part  of  i5/OS.    Unique spelling
dictionaries can be  created with the  CRTSPADCT command which is  part
of the Operating System.

Special  dictionaries are  supplied  with the  TAA Productivity  Tools.
See the discussion with the TAADCT TAA Tool.

The  command operates  on either a  single member  or all  members in a
file such as:


If MBR(*ALL) is requested,  a summary spooled  file is output with  one
line per member.

The  spelling dictionaries  used may  be  specified on  the command  or

Literals  (those  beginning  with an  apostrophe  in  position 45)  are
checked.  An option exists to check the array data.

A source member  can be up  to 240 bytes  in record length.   Only  the
first 97  bytes of  the source statement  field will  be printed  if an
error occurs.

If MBR(*ALL) is  specified, a change date may  be entered so only those
members  which  have  been  changed  after  the  change  date  will  be

Misleading output

Because of  the  way the  API returns  errors,  the CHKRPGSPE  function
will not always  identify the proper statement where  the error exists.

For  example, you  may have  spelled the  word 'for  ' as  'fo '.   The
first scan occurs  for the word  in error followed  by a  blank.  If  a
match is not  found, a period is  added and the scan  occurs for 'fo.'.
If  a match  is  not found,  a  ' (apostrophe)  is added  and  the scan
occurs for 'fo''.   If  a match  is not found,  a scan  occurs for  the
exact length of the word in error.

Because of  this technique,  the spell  checking will  find the  error,
but  when  it attempts  to  identify the  statement  that contains  the
error, it may indicate the wrong statement.

If  this occurs, position to the statement  shown and scan for the word
that is incorrect.  You should come to it within a few statements.


The performance of the spell check  API is not as good as that  used by
the  Office Editor or  Text Management.   You  should not  expect great
performance from CHKRPGSPE.

The  API has significant  overhead to  begin checking.   To improve the
performance of the CHKRPGSPE command,  a block of 2000 bytes is  passed
by combining source  records.  If you  have an 80 byte  statement area,
up to  25 records are checked each time the  spell check API is called.

While spell checking is occurring, the CPU is very busy.

Command parameters                                    *CMD

   SRCFILE       The qualified  file  name of  the  source file  to  be
                 checked.  QRPGSRC  is the default.  The  library value
                 defaults to *LIBL.  *CURLIB may also be specified.

   MBR           The member  to be spell checked.   *ALL is the default
                 to check all members in the file.

   SRCTYP        The  source  type  to  be  checked.    *ANYRPG  is the
                 default to check  any source types  of RPG, RPG38,  or
                 RPGLE.    An individual  type  may  be  named for  the
                 types  RPG, RPG38,  or RPGLE.   The RPGLE  type checks
                 in different source positions for literals.

   CHKARRDTA     An optional parameter  that can  be specified as  *YES
                 to cause any array data to be checked.

                 To  avoid  having  numbers   appearing  as  misspelled
                 words,  any  leading digits  in  the  source statement
                 are  blanked  out  until  a  non-blank  character   is

   DLTSPLF       Determines  if the  spooled  file  is deleted  if  the
                 correct  spelling   exists.    *YES   is  the  default
                 meaning  to  delete  the  spooled  file  if  no errors
                 exist.   The current  implementation  does not  output
                 the spooled file unless spelling errors occur.

                 *NO  may  be  specified  to retain  the  spooled  file
                 whether spelling errors exist or not.

   CHGDATE       If  MBR(*ALL) is specified,  any date  entered will be
                 checked against the last  change date of each  member.
                 If  the member  was  changed on  or  after the  change
                 date,  it will  be checked.   Members which  were last
                 changed before  the  change  date  will  be  bypassed.
                 The change  date  (if any)  should be  entered in  job

   ESCAPE        A  *YES/*NO  value for  whether  to  send the  TAA9893
                 message  as an  escape type if  spelling errors exist.
                 *YES is the default.

                 *NO  may   be  specified   to  receive  a   completion

   DICT          The qualified  name of  the spelling dictionary  to be
                 used.   The  default is  *DFT which  means to  use the
                 DCTARA parameter.

                 A list  of  up to  8 dictionaries  may  be named.    A
                 dictionary must  be created by the  CRTSPADCT command.

   DCTARA        An   optional  parameter   that   allows  a   list  of
                 dictionaries to  be specified  by naming  a data  area
                 in  library  TAADCT  that  contains  the  list.    The
                 default  is *DFT.   A data area  may only be  named if
                 DICT(*DFT) is used.

                 The  list  of dictionaries  must be  entered according
                 to  the  CRTDCTARA   TAA  Tool   and  the  data   area
                 containing the  dictionaries must exist  in the TAADCT
                 library.   Up  to 8 dictionaries  may be  named in the
                 data area.

                 If both  DICT(*DFT)  and DCTARA(*DFT)  are  specified,
                 the following rules exist.

                 1) If  the library TAADCT  does not exist,  the TAADFT
                 dictionary in TAATOOL is used.

                 2)  If the TAADCT library  exists, a data  area by the
                 name of  the  user  of  the job  is  searched  for  in
                 TAADCT.   If it  does not  exist, a data  area by  the
                 name of SYSTEM is searched for in TAADCT.

                 3)   If   neither  data   area   exists,  the   TAADFT
                 dictionary in TAATOOL is used.


You  must  have valid  RPG  specifications.   No  ending quotes  may be

In some  cases the wrong  statement will be  identified because of  the
way  in  which   the  API  returns  information.     See  the  previous

See the previous discussion on checking of array data.


The following TAA Tools must be on your system:

     EDTVAR          Edit variable
     FILEFDBCK       File feedback
     HLRMVMSG        HLL Remove message
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDESCMSG       Send escape message
     SNDSTSMSG       Send status message


None, the tool is ready to use.

Objects used by the tool

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

   CHKRPGSPE     *CMD                   TAATXTG       QATTCMD
   TAATXTGC      *PGM       CLP         TAATXTGC      QATTCL
   TAATXTGR      *PGM       RPG         TAATXTGR      QATTRPG
   TAATXTGR2     *PGM       RPG         TAATXTGR2     QATTRPG

Added to TAA Productivity tools May 1, 1996

Home Page Up to Top