The Check Field Spelling command checks a single field in a data base
file for spelling errors. Unique spelling dictionaries can be
created with the is part of the Operating System.
Special dictionaries are supplied with the TAA Productivity Tools.
See the discussion with the TAADCT TAA Tool.
A typical command would be:
CHKFLDSPE FILE(xxxx) SPECHKFLD(xxxx) IDFIELD(yyy)
The default for the SPECHKFLD parameter is *PROMPT. Using the
default you would see a subfile of the fields in the named file and
would select the field to be spell checked. It must be a character
fields with a length between 3 and 5000 bytes.
The default for the IDFIELD parameter is *PROMPT. Using the default
you would see a subfile of the fields in the named file and would
select up to 3 fields to help identify any records in error. For
example, if a unique key existed on the CUST field, you would want to
specify CUST as an ID field. If any errors occur, the value of CUST
for the record would be printed along with the misspelled words.
When the command completes, a message is sent stating whether errors
were found or not. If one of the *PROMPT functions was requested, a
request message is sent and received for the command that is
executed. This includes any field names that were entered for the
*PROMPT function. Thus you can easily dup the command and re-enter
different field to check.
A spooled file is written with the command parameter information and
any records where spelling errors were found. A separate line is
printed for each word in error.
CHKFLDSPE escape messages you can monitor for
TAA9894 Spelling errors occurred
Only with ESCAPE(*YES)
Escape messages from based on functions will be re-sent.
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 CHKFLDSPE.
The API has significant overhead to begin checking. While spell
checking is occurring, the CPU is very busy.
If you want to spell check the data in a source file, use CHKSPELL
instead for better performance.
Command parameters *CMD
FILE The qualified file name of the file. The library
value defaults to *LIBL. *CURLIB may also be used.
For the fastest processing technique, specify the
physical file (not a logical file). If a keyed
physical file is named, it will be processed in
SPECHKFLD The field to be spell checked. It must be a
character field with a length between 3 and 5000
The default is *PROMPT. Using the default, you
would see a subfile of all the fields in the file
and may select a single field to be checked.
IDFIELD A list of up to 3 fields to help identify any
records with spelling errors.
The default is *PROMPT in which case you will see a
subfile of all the fields in the file and may select
up to 3 fields to help identify the record in error.
For example, if a unique key existed on the CUST
field, you would want to specify CUST as an ID
field. If any errors occur, the value of CUST for
the record would be printed along with the
Only a character, packed, or zoned field may be
MBR The member to be processed. The default is *FIRST.
DICT The qualified name of the spelling dictionary to be
used. The default is *DFT which means to use the
A list of up to 8 dictionaries may be named. A
dictionary must be created by the system CRTSPADCT
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.
If a dictionary is named, DCTARA(*NONE) must be
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
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.
ESCAPE A *YES/*NO parameter for whether TAA9894 should be
sent as an escape message if spelling errors occur.
*NO is the default meaning a *COMP type message is sent if errors
*YES may be specified to sent TAA9894 if spelling errors exist.
You must have the dictionary product.
The record length of the file cannot exceed 9999 bytes.
The file cannot have more than 998 fields.
A source member created by the Text Editor or Text Management may not
be spell checked.
The following TAA Tools must be on your system:
EXPVAL Expand value
EXTLST2 Extract list 2
HLRMVMSG HLL Remove message
PMTFLD Prompt field
RTVFLDARR Retrieve field array
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
------ ---- --------- ---------- ----------
CHKFLDSPE *CMD TAATXTI QATTCMD
TAATXTIC *PGM CLP TAATXTIC QATTCL
TAATXTIR *PGM RPG TAATXTIR QATTRPG