Verify Spelling Directory

Directory .ZIP

objects?





These source modules make up a User Interface Manager (UIM) Demonstration Application. A Verify Spelling (VFYSPL) command provides the main entry point. The command accepts a word or phrase up to 256 characters and performs spelling verification. If the *SUGGEST option is selected, alternative spellings are listed in a UIM pop-up window. The alternatives may be for misspelled words only or for each word in the phrase.

The UIM panel group (PNLGRP) sources reference a number of 'imbeds' by using the <.IM> tag. These are given in the _IMbeds folder. They can be put directly into your source; but they should be standard in all of your UIM applications, so imbeds help with consistency.

.IMbeds can be placed in the same source file as the rest of your UIM source or elsewhere as long as you name the location on the CRTPNLGRP command. They need no source member type. The panel group source itself can have a member type of PNLGRP so that PDM knows what you're compiling; there is no other significance to the member type that I'm aware of.

One imbed -- @HEADERPNL -- refers to a message in a message file. The text of this message becomes a copyright message on the first instance of a panel from the UIM application. Create whatever message you wish to see how the text appears (and of course modify the source to point to it).

This should NOT be considered a full application by any means. This is purely for demonstration. I've found problems with the AS/400 spelling APIs on every release I've used them on and PTFs have always been required. Further, this is presented as a "UIM Demo", not a spelling API demo. If you do not have the dictionaries that are assumed to exist, you must alter the source accordingly. As far as I know, the app. will continue to work even if you only have user spelling-aid dictionaries, but I'm not about to claim so.

The effort involved in making this source available was enough to introduce errors. Please use the e-mail links to notify me and I'll try to correct them.

Note that there is an inconsistent naming standard for these. Various parts were developed at different times and I pulled them all together for this demo app. Don't try to make sense of it. Maybe someday I'll fix that, but I doubt it. This app. just isn't worth it. Further, the names of most of the imbed members had to be changed so that the initial character is '_' (underline) instead of '@' (at-sign). This was due to a restriction on names in either the FTP client I use or the host where these are stored. You must rename the members before compiling the UIM source.

Please read the @GENERAL DISCLAIMER document for any items you should be aware of if you download any of these items.


CLPs

LSTALTSPL -- List Alternative Spellings:

This program presents a UIM pop-up window containing a list of words that are candidate alternative spellings for a given word. The given word may be spelled correctly or incorrectly. This makes a quick and handy AS/400 command-line spell-checker all by itself.

SYSPA -- Spelling Aid API driver:

This program provides a CL shell for the Aid Spelling (QTWAIDSP) API. The API returns a mess in its parameters, so this CLP does some work to break things out and make it a little neater.

Because I failed to include this CL program when I uploaded this directory, it is not currently included in the directory .zip file. Until I get it all restructured correctly, this program source code must be downloaded separately. You can do a "Save as..." from the directory or when viewing the source. Check back for corrections if you have problems.

VFYSPL -- Verify Spellings:

This program checks the spellings of words in a phrase. It optionally passes words to the LSTALTSPL command to show alternative spellings.

CMDs

LSTALTSPL -- List Alternative Spellings:

The command definition object source for LSTALTSPL encapsulates the LSTALTSPL CLP. It accepts a single word as an input parameter.

SPLAID -- Aid Spelling (QTWAIDSP):

The QTWAIDSP API (or the SPLAID command) returns a list of candidate words that are similar in spelling to the input word. The input word is generally the misspelled word and the candidate words are correctly spelled words that are spelled similarly to the input word. The QTWAIDSP API (or the SPLAID command) returns a maximum of six candidate words per dictionary.

VFYSPL -- Verify Spellings:

The command definition object source for VFYSPL encapsulates the VFYSPL CLP. The command defines the WORD(), VFYOPT(), SUGGESTOPT() and WRDLEN() parameters to specify the word or phrase to verify, the type of verification to perform, the scope of suggestions to make if VFYOPT(*SUGGEST) is requested and the length of the input string to verify.

PNLGRPs

#HSPA -- Spelling Aid Word List -- Help:

The panel group source is used to define help text for specific elements of the 'Spelling Aid' list panel. Items defined here could have been part of the SASPA panel group definition, but this illustrates the UIM <:IMPORT> tag.

SASPA -- Spelling Aid -- List Panel:

This list panel is where the list of alternative spellings is displayed. The application displays this as a pop-up window.

Note that this is not a selection list, but simply a list. It could be modified to be a selection list, thereby making it possible to select a desired spelling from the alternatives.

.IMbeds

@COND -- Conditions:

This imbed includes a set of UIM <:COND> tags that I use over and over.

@HEADERPNL -- Panel Group Header:

This imbed includes a standard (for me) UIM <:PNLGRP> and a <:COPYR> tag.

This imbed forms a complete beginning for a panel group, but it's also inflexible. I use a couple other shorter versions when I need to add attributes to the <:PNLGRP> tag. In those, the imbed does not include the closing period. I place the attributes I want immediately after those imbeds and then put the closing period in the main source immediately following the attributes I've added.

@HELPFKEY -- Standard F-key Help:

This imbed provides standardized help text for function keys that should be part of most panels.

@HELPNFKEY -- Standard Non-F-key Help:

This imbed provides standardized help text for non-function keys (keys other than F1 through F24) that should be part of most panels.

@STDKEYPLL -- Standard PNLGRP Key List Header:

This imbed provides a standard <:KEYL> tag for a list of keys for a panel group.

@STDKYPL1 -- Standard Key Item for F1:

This imbed provides a standard <:KEYI> tag for the F1-key.

@STDKYPL12 -- Standard Key Item for F12:

This imbed provides a standard <:KEYI> tag for the F12-key.

@STDKYPL3 -- Standard Key Item for F3:

This imbed provides a standard <:KEYI> tag for the F3-key.

@STDNFKEYS -- Standard Key Items for Non-F-keys:

This imbed provides a standard set of <:KEYI> tags for non-F-keys.

@VARPNL -- Panel Variables:

This imbed provides a standard set of <:VAR> tags for variables that I use commonly.