TAA Tools
CHKSPELL        CHECK SPELLING                         TAATXTC

The Check  Spelling command  checks a  source member, generic  members,
or all members  in a file to determine if  any spelling errors exist in
the data portion.  A typical command would be:

         CHKSPELL    FILE(xxxx) MBR(yyy)

If  errors  exist, a  spooled file  is created  with any  statements in
error and a column of words that were found as errors.

You must  have  a dictionary  such  as the  TAADFT dictionary  on  your
system.   The  dictionary  is accessed  by  the QTWCHKSP  API.   Unique
spelling  dictionaries  can  be  created  with  the  CRTSPADCT command.
This is part of the Operating System.

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

The  CHKSPELL2  tool  is  similar to  CHKSPELL.    The  CHKSPELL2  tool
differs  in  that it  checks  a  string of  data  for  spelling errors.
CHKSPELL checks the records in a source member.

Misleading output
-----------------

Because of the way the API  returns errors, the CHKSPELL 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 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.

Performance
-----------

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 CHKSPELL.

The API has  significant overhead to  begin checking.   To improve  the
performance of the  CHKSPELL 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.    The  library   value  defaults  to  *LIBL.
                 *CURLIB may also be specified.

   MBR           The  member  to  be  spell  checked.    *FIRST is  the
                 default to  check  the first  member  in  a file.    A
                 single  member  or  a   generic  member  name  may  be
                 specified.

   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
                 format.

                 The  intention   of  the   CHGDATE  parameter   is  to
                 minimize  the performance  once an entire  source file
                 is checked.   After  that point,  you  may just  check
                 the members that  have changed by specifying  a change
                 date.

   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
                 message.

   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.

   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.   *NO  may be  specified to  retain the spooled
                 file.

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

You must have the Dictionary product (DCT) on your system.

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

Source  created by the Text Management  product cannot be spell checked
due to unique values placed in the source.

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

The following TAA Tools must be on your system:

     CHKJOBCTL       Check job control
     FILEFDBCK       File feedback
     HLRMVMSG        HLL Remove message
     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.

To specify dictionaries other  than US in  QDCT, see the CRTDCTARA  TAA
Tool.

To create unique dictionaries, see the CRTSPADCT command.

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

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

   CHKSPELL      *CMD                   TAATXTC       QATTCMD
   TAATXTCC      *PGM       CLP         TAATXTCC      QATTCL
   TAATXTCR      *PGM       RPG         TAATXTCR      QATTRPG
					

Added to TAA Productivity tools May 1, 1996


Home Page Up to Top