SPELL edit macro

Macro name. SPELL Edit macro SPELL
users. PDF EDIT users Author: David McRitchie
type. Edit Macro resides in SYS1.TSOCLIST for use with TSO
SPELL Checks spelling in non-SCRIPT documents
Related MSPELL (invokes SPELL NOCTL)
Related MSDSDICT (undocumented for use by MSDS writer on TSO)
    probably same as ===> spell noctl
Related @SPELLS (similar to SPELL but uses SAS instead of SCRIPT/VS)

This macro will check for spelling errors and will flag them using NOTELINE and MSGLINE.  This edit macro does not require your input to have been saved, no changes will be made to your input.

Lines that have spelling errors will be reset if X ALL was invoked before use.

The best use of this macro in on text documentation information.  How- ever running any material through it such as JCL, clists, etc.  can prove useful in correcting spelling errors in comment text.

The NOTELINE and MSGLINE containing misspelled word information can be removed by simply typing in RESET on the command line.

ISREDIT  SPELL  [DICT(dict) | EAM]  [EDIT | BR | BROWSE]  [NOCTL] [PROFILE(profile)]  [NX | X]

           COMMAND ===> SPELL
           COMMAND ===> SPELL   DICT(EAM)
NOCTL Eliminate '.' and ':' in col 1 from spell test.  This will happen by internally changing them to a numeric (9) which will eliminate them from consideration when spell checking.  Good op- tion to use when working with a non SCRIPT file or a SCRIPT file that uses macros that will not be defined as invoked.  Normally you would not use this option if you are working with a real SCRIPT/VS input.
DICT(dict)Specify another dictionary, ours defaults to IS03.  For addi- tional information refer to internal aspects.  The default is set using .DL IS03 in macro invoked within DSMPROF4.
EAM Restrict dictionary to the DCF shipped default English American dictionary.  Equivalent to DICT(EAM).
DEBUG Used for tracing internal logic -- debugging usage only.
EDIT Edit the SCRIPT output -- debugging usage mainly, normally not seen.  May be abbreviated to first two letters.
BROWSE Browse the SCRIPT output -- debugging usage mainly, normally not seen.  May be abbreviated to first two letters.
PROFILE(profileUse profile other than default DSMPROF4.
NOCTL Special usage for MSDS file without macros available.  The NOCTL option will ignore macros beginning in column 1 and all tags. The macros and a check of the word is eliminated by changing col 1 from a period to a nine.  The use of tags is ignored by chang- ing colons(:) to a nine.  The actual text is not touched -- only the temporary file.
NX Spell check only NX lines, other lines as comments.
X When showing words, treat as if originally a undisplayed lines (X).  Only needed in combination with NX option so that only lines with spelling errors will be viewed.

Normal usage without any parameters

No lines displayed (X all), SPELL check all lines, listing misspelled words below actual line.  Lines in error reset.  Use of (X ALL) before in- voking SPELL is my preference

At least some lines shown (NX all), SPELL will list lines and words at the beginning of the list.

To use the SPELL edit macro

  1. Get into edit on your document, and enter the command as above.  There are two basic ways to use this macro.
    1. Invoking after undisplaying all lines (X ALL), in which case lines with spelling errors will be reset.
    2. Invoking otherwise (such as after RESET), in which case line numbers with misspellings will appear in note lines at the top and will include at least some of the words misspelled on those lines.
      In either case lines with misspelled words will appear under the lines con- taining them.  To see only the note lines you can undisplay lines (X ALL ' ') file in edit.
  2. No changes have actually been made to your data.  You may remove the NOTELINE and MSGLINE text by typing RESET on your command line.

Internal Aspects:

[TSO code] 

Macro: SPELL

Obtained from "CBT" tape 103 -- TECH.CBT.FILE103.PDS(SPELL).  Created by William R. Horton of Tennessee Eastman Company of Kingsport, TN, this macro does not require the member in edit to be saved, nor will it cause the mem- ber to be saved.  Major revisions have been made by D.McRitchie to provide support for SCRIPT documents since Bill Horton's original SPELL macro.  The use of PREFIX and NOPREFIX is supported for the two datasets created for temporary usage.  Lines that have spelling errors will be reset if X ALL was invoked before use.  If all lines were originally displayed the data will be treated as if all lines are originally undisplayed to provide the most effective results.  As an initial test this macro may be applied against itself.  Error words can be located with LOCATE SPECIAL.  Note lines will be created, which can be eliminated by typing RESET or RESET SPECIAL on the command line.

Modifications have been made to support SCRIPT, documents wider than 80 columns, dictionary selection, and users that use ISPF with TSO PREFIX turned off.  OBC modifications also include conversion to REXX and all of the options.

  1.   A new dataset is created which contains some SCRIPT/VS cards and then copies your current dataset with your changes.

    Added cards include extra word delimiters, some words added to the addenda dictionary (.DU) mainly so that SPELL can be run on itself at OBC leaving only limited spelling errors as an example.  Some additional OBC only usage.

  2.   A test is made for JCL.  If the first two bytes of data in the file con- tain "//" then then a DCF translate input (.TI) will change them to 9's to prevent stepnames and ddnames from being checked for spelling errors. This translation only affects the intermediate file not the original data.

  3.   Our default dictionary is DICT(IS03) has an additional 7,485 words (4/11/91) added to the basic EAM or English American dictionary of 10,000 words (plus prefixes and endings).  To see how your text might be checked without our additions try DICT(EAM) or simply EAM as on option.

  4.   SCRIPT is run against the intermediate file.  Another dataset is created which contains misspelled words, which going to the bottom looks some- thing like the following:
    WORDS NOT FOUND: Horton Eastman Kingsport TN
    'SPELL' LINE 6: /*  William R. Horton of Tennesse
    e Eastman Company of Kingsport, TN*/
    'SPELL' LINE 29: to add NOTELINEs
    For whatever reason error lines consist of 120 characters but are folded after printing 60 characters.  The macro reappends continued information for use on the WORDS NOT FOUND note lines, but not for the sample 11 lines shown at the top.

  5.   Notelines and Message lines are created based on spelling errors found by DCF.


Source:  CBT tape file 103, provided by William R. Horton of Tennessee Eastman Company of Kingsport, TN.

This Edit Macro invokes SCRIPT/VS with the SPELLCHK option to identify mis- spelled words in the current data being edited.  Each line containing a mis- spelled word will have an error message, which lists the misspelled word(s), inserted after the line.  Entering the RESET command will delete all lines inserted by the SPELL macro.


Sort of a letter to SHARE78 user's who might get this text.

I found Bill Horton's SPELL edit macro to be useful, but thought it would be a lot more useful if it would also handle SCRIPT text in some fashion.  So I have made some modifications.

I had experimented with translating ampersands (&) to a "9" to eliminate spelling check on symbols in clists, JCL and SCRIPT.  Also by changing left parenthesis to eliminate a check on member names.  This was abandoned when I decided there was no real reason to not to include SCRIPT.  Since the data- set is SCRIPTed from a different file and the result is not normally viewed, it would have been perfectly legal to change the input or the way that the output looks.

The record length of prefix.SPELL.MACRO was increased to 200 bytes, the or- iginal 80 is far too limiting and would have resulted in a lot of misspelled words clobbered by being split at column 80, in addition to not checking words after column 80.

In the original form there was no profile, so I had to add our dictionary into the clist.  Even though use of a profile now makes this no longer nec- essary, it provides a dictionary override which has been useful in reducing our dictionary size.  First I made a separate dictionary made up of only lowercase words, then I checked a word list from the original user diction- ary using SPELL, all words that were still in X status among the non- lowercase only words were removed.  So multiple dictionary support served a purpose.

I had tried to eliminate imbed (.IM) by defining an empty macro, so that spelling errors would only be for the member in edit, and to eliminate scripting of unnecessary imbeds.  This did not work out for us as it re- sulted in too many DCF errors.  So actual SCRIPT/VS profile will be used. The NOCTL option was added later which would effectively remove use of con- trol words and macros for non-script documents.

A few people work with PROFILE NOPREFIX, so a modification was made to ac- commodate these individuals.

Lines will be reset if the all lines were undisplayed (X ALL) at the invoca- tion of SPELL; otherwise, they will be left alone.

Our own dictionary covers most of our production JCL, I have included the lowercase portion of our dictionary which you might see how it compares against your own by first using "X ALL" and then invoking "SPELL".  One thing that annoys me is that the supplied dictionary is so sparse it doesn't even have state names, major cities, nor compass points (NE,SE,SW,NW) which means hardly anyone can type in an address without an error on each line even though much of it may be rather common names.  So much for 10,000 word dictionaries.

I have included the words added in our dictionary.  For what it's worth we have never had very many SCRIPT users not in data processing (information systems).  In order to conserve disk space our dictionary words and the DSMDMJCL are maintained in a single PDS member in a library of variable length records (VB 84 ...).  The words on the diskette have be reworked. Anyone wishing to incorporate these words would have to change "=" to "--" and add HP in front of anything with a "--" and AP in front of the others. Use of text flow (TF i.e. TF2) will put the words back into a single column. My Text editor on the PC could not handle the dataset had there been only one word per line.

In the two examples below the words Washington Pittsburgh Pennsylvania and Maple are in our regular dictionary but not in the default EAM dictionary. Either dictionary can be examined as shown.

EDIT ---- IS03.LIBR.CLIST(EEEE) - 01.01 --------------------------------------
COMMAND ===> spell      (starting with all lines X status)
****** ******************************************************* TOP OF DATA ***
==MSG> Misspelled words were found on 2 lines (see below).
000001 Washington Lincoln Cleveland Cincinatti Pittsburgh Pennsylvania Kentuck
=NOTE= WORDS NOT FOUND: Lincoln Cleveland Cincinatti Kentucky
- - -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - -    1 LINES(s) NOT DISPLAY
000003 Street avenue place circle pike lincoln highway

EDIT ---- IS03.LIBR.CLIST(EEEE) - 01.01 --------------------------------------
COMMAND ===> spell eam edit    (starting with all lines visible)
****** ******************************************************* TOP OF DATA ***
==MSG> Misspelled words were found on 3 lines (see below).
=NOTE= Line 1: Washington Lincoln Cleveland Cincinatti Pit
=NOTE= Line 2: Maple
=NOTE= Line 3: lincoln
==MSG> -- up to 11 lines shown above -- all misspellings appear below --
000001 Washington Lincoln Cleveland Cincinatti Pittsburgh Pennsylvania Kentuck
=NOTE= WORDS NOT FOUND: Washington Lincoln Cleveland Cincinatti Pittsburgh Pen
000002 Maple
000003 Street avenue place circle pike lincoln highway

EDIT ---- IS03.SPELL.MACRO.LIST ----------------------------------------------
000025  WORDS NOT FOUND: Lincoln Cleveland Cincinatti Kentucky
000026  'MACRO' LINE 12: Washington Lincoln Cleveland Cincinatti Pit
000027  tsburgh Pennsylvania Kentucky
000028  WORDS NOT FOUND: lincoln
000029  'MACRO' LINE 14: Street avenue place circle pike lincoln hig
000030  hway
****** ****************************************************** BOTTOM OF DATA *

EDIT ---- TSOMODEL.PUBLIC.TEXT(ZZ) - 01.00 ------------------------
****** ********************** TOP OF DATA *************************
000001 Synonyms, supersede, receivable, spelling, thanks
000002 SYnonyms, supercede, recievable, spellling, thanx
NOTE= WORDS NOT FOUND: SYnonyms recievable spellling thanx
****** ********************** BOTTOM OF DATA **********************

M(ID TRACE) BIND(0 0) INDEX DEV(1403W8)      1995/04/01 Saturday, April 01, 1995
06:54 1403
NOTE:  Occasionally some non SCRIPT (DCF) documents will contain what appears to be bad tags or substitutions.  For these extreme cases you may have to invoke SCRIPT yourself to find the misspellings.
  ===> @SCRIPT Q
and then go to the bottom and make a note of the words that are mispelled.

Comments and Related Information

You are visitor  ctr since count started Jan 15, 1998.

Please send your comments concerning my pages or materials to:  David using send email comments

Disclaimer and site usage:  Material at The REXX Macros Toolbox is available without warranty of any kind.  Redistribution of source, coding and documentation other than from this site is prohibited.

Copyright © 1995 - 2006, F. David McRitchie, All Rights Reserved