  -----------------------------------------------------------------
  CHAPTER: Introduction
  -----------------------------------------------------------------

  -----------------------------------------------------------------
  TOPIC: Feature Summary
  -----------------------------------------------------------------

  SPF/SE provides ISPF style EDIT, BROWSE, and file management on
  the PC platform. It is typically used for editing source code in a
  variety of programming languages, such as COBOL, FORTRAN, PL1,
  C++, and JAVA.  SPF/SE can also be used with other programming
  languages and file types.

  SPF/SE has many features designed to make managing and authoring
  source code and manipulating data files easier, such as:

  *  3270 style option menus

  *  Variable and Fixed length record formats

  *  Record lengths to 64000 bytes

  *  File size to 100M bytes.

  *  ASCII and EBCDIC character set support

  *  Hexadecimal display and modify

  *  Program source colorization

  *  Record field colorization with floating header

  *  Color printing

  *  FIND/CHANGE string highlighting

  *  Multiple concurrent edits with tiling

  *  Powerful File Lists

  *  Projects

  *  UNDO file modifications

  *  Merges compiler error messages with source

  *  Multiple line numbering modes

  *  Command and file profile aliasing

  *  User Modifiable Dialogs via Dialog Manager

  *  Edit Macros and Dialogs via "C" Interpreter

  *  Complete documentation online

  *  System commands with file name substitution

  *  and much more ...

  -----------------------------------------------------------------
  TOPIC: Control Files
  -----------------------------------------------------------------

  SPF/SE uses several files during its processing:

  spf (in \spf-install-directory\bin)

     The SPF/SE executable.

  spf.prf (in \spf-install-directory\profiles)

     The SPF/SE global profile. If not already present, a default
     profile is created the first time you execute SPF/SE. It is
     updated whenever you change global profile variables.

  *.fp  (in \spf-install-directory\profiles)

     File profiles are created explicitly when you select the "File
     Profiles" item of the OPTIONS menu. Each "*.fp" file contains
     file format information which applies to all files of a
     particular type. For example, the file profile for program
     source files "*.cbl" would be "cbl.fp".

     The "*.fp" files are found and loaded in the same manner as
     "spf.prf"

  *.clr  (in \spf-install-directory\profiles)

     These are program source colorization files.

     See chapter "Program Source Colorization" for detailed
     information on colorization file content.

     The "*.clr" files are found and loaded in the same manner as
     "spf.prf".

  *.pstl  (in \spf-install-directory\profiles)

     These are SPF/SE Print Style Definitions. (see menu OPTIONS,
     item PRINT STYLE)

  *.ucmd  (in \spf-install-directory\profiles)

     These are SPF/SE User Command Definitions. (see menu UTILITY,
     item USER COMMANDS)

  *.c (in \spf-install-directory\macros)

     These are SPF/SE sample macros.

     See chapter "C Interpreter" for detailed information on how to
     create or modify SPF/SE macros.

  *.mnu  (in \spf-install-directory\menus)

     These are SPF/SE Option Menu Definitions.

     See chapter "Dialog Manager" for detailed information on how to
     create or modify SPF/SE menus.

  *.dlg (in \spf-install-directory\dialogs)

     These are SPF/SE dialogs.

     See chapter "Dialog Manager" for detailed information on how to
     create or modify SPF/SE dialogs.

  *.txt (in \spf-install-directory\help)

     Text files which contain online documentation.

  *.tpl (in \spf-install-directory\templates\...)

     Program source template files organized with a separate
     sub-directory for each programming language type.

     See Edit Primary Command TEMPLATE for detailed information on
     how to create or modify templates.

  -----------------------------------------------------------------
  TOPIC: Starting SPF/SE
  -----------------------------------------------------------------

  The most common method of starting SPF/SE is to click on the
  program icon located on the desktop.

  You can also launch SPF/SE via TTY console dialog.  Specify the
  full path name to SPF and any parameters desired.  This method is
  seldom used and is mainly supported as a diagnostic tool.

  Third party applications can launch SPF/SE by invoking it directly
  as a system command including any desired parameters.

  -----------------------------------------------------------------
  TOPIC: Command Options for SPF.EXE
  -----------------------------------------------------------------

  When SPF/SE is invoked via RUN or called as a system command, the
  following command options are supported.

  SPF.EXE   [/B]
            [/H]
            [/Iimacro-name]
            [/Lline-number[,col-number]
            [/Mmax-record-length]
            [/Pfile-profile-name]
            [/Rerror-msg-file-name]
            [/Sprimary-command]
            [/Xxmacro-name]
            [filenames...]

  /B

     Boolean, specifies that files specified on the command line are
     to be browsed.  File modification is not allowed.  If "/b" is
     not specified, specified files are edited.

  /H

     Boolean, specifies that when file names are specified on the
     command line, after edit of the specified files is complete,
     SPF is to remain active. If "/h" is not specified, SPF
     terminates when the last file edit is complete.

  /I

     Sets the ZIMACRO variable to override the IMACRO setting in the
     file profile.

  ZIMACRO is automatically reset at the end of the session.

  /L

     Specifies line number and optional column number where the file
     is to be positioned after it is loaded.

     If multiple files are specified, line and column positioning is
     applied to the first file only.

  /M

     Sets the ZMAXRECLEN variable to override the file profile max
     record length field.

  ZMAXRECLEN is automatically reset at the end of the session.

  /P

     Sets the ZPROFILE variable to override the file profile name.

  ZPROFILE is automatically reset at the end of the session.

  /R

     The name of a compiler error message file to be merged as NOTES
     into the edit file.  If a file name contains blanks or
     punctuation, it must be enclosed in double quotes.

     If multiple files are specified, the error message file is
     merged with the first file only.

     Compiler messages must conform to what is generally known as
     "Microsoft Format".  Among the compilers that support this
     format are the following:

        Microsoft (all languages)
        Micro Focus COBOL
        CARealia-II COBOL
        Borland C++

  /S

     Queues a primary command string for execution.  If no file is
     specified, the command executes immediately.  If a file is
     specified, the command executes after the file is loaded
     (similar to an IMACRO).

     If multiple files are specified, the command is applied to the
     first file only.
      
     The command must be specified immedaiately after the "/s" with no
     intervening blank (e.g. "/sthecommand").

     If the command contains blanks or punctuation characters, it
     must be enclosed in double quotes (e.g. /s"change this that").

  /X

     Sets the ZXMACRO variable to override the XMACRO setting in the
     file profile.

  ZXMACRO is automatically reset at the end of the session.

  filenames

     Up to eight file names may be specified separated by blanks.
     If a file name contains blanks or punctuation, it must be
     enclosed in double quotes.

     If a directory is specified, a File List is presented for that
     directory.

  Some example command strings follow:

  SPF abc xyz             (EDIT files "abc" and "xyz")
  SPF -b xyz              (BROWSE file "xyz")
  SPF abc -h              (EDIT file "abc", keep SPF active after
                                file edit is complete)
  SPF xyz.cbl -l 25,11    (edit file "xyz.cbl", after loading,
                                position to line 25, column 11)
  SPF xyz.cbl -r xyz.log  (edit file "xyz.cbl", after loading,
                                merge compiler msg file "xyx.log")
  SPF test.txt /s"change this that"  (edit file "xyz.cbl", after loading,
                                      execute change command)

  -----------------------------------------------------------------
  TOPIC: Ending an SPF/SE Session
  -----------------------------------------------------------------

  When you have finished using SPF/SE and are ready to end your
  session, you can:

  *  Press [F3] (END command) repeatedly, backing up through
     previous Edit/Browse tasks, dialogs, and menus until SPF/SE
     terminates.

  *  Click on the close button in the upper right hand corner of the
     SPF/SE window.  (looks like a button with an X in it).  This
     action closes all SPF/SE tasks.


  -----------------------------------------------------------------
  CHAPTER: Getting Started
  -----------------------------------------------------------------

  Welcome to SPF/SE, a software product that provides a familiar
  EDIT and BROWSE environment on the PC platform for MVS
  applications developers.

  SPF/SE provides ISPF style Edit/Browse and file management
  bridging the gap between mainframe computers and personal
  computers allowing new PC users who are coming from the mainframe
  to get up and running quickly.

  We have organized this information beginning with basic
  operational considerations, then moving through individual
  features.

  If you simply want to edit files, we have included "quickstart"
  information which tells you how to open a file and use basic
  editing commands. You can begin using SPF/SE by following the
  quickstart instructions, and then use the full reference to
  progressively expand your knowledge.

  See chapter "Quickstart" for a fast tutorial.

  If you have used ISPF/PDF on the MVS platform, you can install
  SPF/SE, and begin using it right away, performing EDIT/BROWSE
  tasks in a similar fashion to the mainframe.

  Note:  The dialog and edit macro language is "C", not REXX.

  If there is any area where you are likely to run into difficulty,
  it is the difference between mainframe and PC based file formats.
  If you have no exposure to PC based file systems, you should look
  at your operating system reference manual. It contains detailed
  information on available file formats.

  See general command PROFILES for details on file formats.

  -----------------------------------------------------------------
  TOPIC: Keyboard
  -----------------------------------------------------------------

  SPF/SE uses the [3270-Enter] key to activate primary and line
  commands and to commit dialogs.

  If you have a portable PC which does not have a [3270-Enter] key,
  use [CTRL]+[Enter].

  -----------------------------------------------------------------
  TOPIC: Technical Support
  -----------------------------------------------------------------

  See HELP, item ABOUT for phone numbers, e-mail addresses, and web
  site address.

  Free technical support is provided to registered users for 60 days
  after purchase.

  Technical support is available via e-mail only. Please provide the
  following information in your report:

  *  Name, company, address, phone number.

  *  SPF/SE version, build, serial number, and Interface Option.
     (See HELP, item ABOUT for above items.)

  *  A description of the problem or a question.

  *  Send the exact steps that lead to a reproducible case of the
     problem.

  *  Attach any test files that may be necessary to reproduce the
     problem.

  *  If a problem is not initially reproducible, narrow it down to a
     reproducible case before reporting.  .

  Well documented problem reports are usually turned around quickly
  and may include a fix when applicable.


  -----------------------------------------------------------------
  CHAPTER: Command Interface
  -----------------------------------------------------------------

  There are two basic command types in SPF/SE:

  *  Primary commands are typed in the Primary Command Field. These
     commands affect the current file, or your entire session.

  *  Line commands are typed in the input field at the left end of
     List dialog entries, File List entries, or Edit lines in files.
     This input field is called the Line Command Field. In List
     dialogs, these commands affect a single entry. In File List and
     Edit, these commands affect one or more entries or lines.

  General rules for using each type of command are summarized below:

  *  To invoke a primary command, press the [HOME] key to put the
     cursor in the Primary Command Field. Type in the command. If
     the command requires a parameter, type it after the command.
     Press [3270-Enter] to execute the primary command.

  *  In the following discussion, we use "lines" to mean List dialog
     entries, Fil List entries or Edit file lines. To invoke a line
     command, use the mouse or cursor keys to position the cursor to
     the Line Command Field, type in the command; press
     [3270-Enter].

  *  In List dialogs, line commands may only be applied to one entry
     at a time.

  *  In File List or Edit, line commands may be apl,lied to a single
     entry, or a block of entries. To operate on a block of entries:

     -  type the desired line command on the first entry or line in
        the block

     -  move to the end of the block (use [F8] or [PG-DN] if
        necessary)

     -  type the same line command on the last entry or line in the
        block

     -  press [3270-Enter]

     -  for example, DD.../ /...DD to delete a block of entries or
        lines

  *  After you have used SPF/SE for a while and know which commands
     you use regularly, you can assign them to PF keys. Then they
     can be executed with a single keystroke.

     See general command KEYS for details on how to set the PF key
     definitions.

  Line commands can be used from a PF key by prefixing them with
  colon (:).  For example, for "D" line command, put ":D" in the
  function key mapping.

  To invoke multiple related commands, enter the commands separated
  by semicolon (;), then press [3270-Enter]. SPF/SE executes the
  commands in the order in which you typed them.

  -----------------------------------------------------------------
  TOPIC: Command Keys
  -----------------------------------------------------------------

  [HOME]

     Use this key to put the cursor in the Primary Command Field.

  [3270-Enter]

     In EDIT, use this key to commit menu or execute primary
     command, commit dialogs or execute primary command, commit File
     List to execute line commands or primary command, commit
     Edit/Browse to execute line commands or primary command.

     See OPTIONS, item KEYS, item ENTER KEY for assignment of key to
     be 3270-ENTER signal.

  [BACKSPACE]

     Use this key to move the cursor to the left and delete the
     character in that position.

  [DEL]

     Use this key to delete the current mouse selection. If there is
     no selection, the character at the current cursor position is
     deleted; characters to the right of the cursor are shifted left
     one position.

  [CTRL][DEL]

     Use this combination of keys to erase characters from the
     current cursor position to the end of the field or line.

  [INS]

     Use this key to toggle insert mode. If insert is on, characters
     to the right of the cursor are moved to the right as new
     characters are typed. Otherwise new characters overlay current
     characters as they are typed.

  [NUMLOCK]

     Use this key to set the shift state of the numeric keypad.

  -----------------------------------------------------------------
  TOPIC: Traveling Keys
  -----------------------------------------------------------------

  [END]

     Use this key to move the cursor to the end of the current
     field.

  [PG-UP]

     Use this key to scroll up one display frame.  [F7] can also be
     used to scroll up.

  [PG-DN]

     Use this key to scroll down one display frame.  [F8] can also
     be used to scroll down.

  [ARROW-UP]

     Use this key to move the cursor up. When the cursor reaches the
     top edge of the display, and there are undisplayed lines above,
     the display scrolls up one line.

  [ARROW-DOWN]

     Use this key to move the cursor down. When the cursor reaches
     the bottom edge of the display, and there are undisplayed lines
     below, the display scrolls down one line.

  [ARROW-LEFT]

     Use this key to move the cursor left. When the cursor reaches
     the left edge of the display, and there are undisplayed columns
     to the left, the display scrolls left one column position.

  [ARROW-RIGHT]

     Use this key to move the cursor right. When the cursor reaches
     the right edge of the display, and there are undisplayed
     columns to the right, the display scrolls right one column
     position.

  [CTRL][ARROW-UP]

     Use these keys to move the cursor to the top of the Edit/Browse
     display.

  [CTRL][ARROW-DOWN]

     Use these keys to move the cursor to the bottom of the
     Edit/Browse display or the "Bottom of File" line if it is
     visible.

  [CTRL][ARROW-LEFT]

     Use these keys to move the cursor one word to the left (word
     jump).

  [CTRL][ARROW-RIGHT]

     Use these keys to move the cursor one word to the right (word
     jump).

  [TAB]

     In EDIT, use this key to move the cursor to the next tab
     position. In Dialogs, Menus, and File List, use this key to
     move the cursor to the next field.

     See general command PROFILES and line command TABS for details
     on defining tabs.

  [SHIFT][TAB]

     This is the backtab key. In EDIT, use this key to move the
     cursor to the previous tab position. In Dialogs, Menus, and
     File List, use this key to move the cursor to the previous
     field.

  [CTRL][PG-UP]

     In File List, use these keys to scroll to the top of the list
     and leave the cursor in the primary command field.

     In Edit or Browse, use these keys to scroll to the top of the
     file and leave the cursor in the primary command field.

  [CTRL][PG-DN]

     In File List, use these keys to scroll to the bottom of the
     list and leave the cursor in the primary command field.

     In Edit or Browse, use these keys to scroll to the bottom of
     the file and leave the cursor in the primary command field.

  -----------------------------------------------------------------
  TOPIC: Selection Keys
  -----------------------------------------------------------------

  As an alternative to mouse based selection you can use the [SHIFT]
  key in conjunction with the arrow keys to do text selection in
  Edit.  This is a convenient method to use when you are on
  airplanes or in other tight spaces where the use of a mouse would
  be inconvenient.

  [SHIFT]+[ARROW-UP]

     Use these keys to initiate and/or extend the selection upward.

  [SHIFT]+[ARROW-DOWN]

     Use these keys to initiate and/or extend the selection
     downward.

  [SHIFT]+[ARROW-LEFT]

     Use these keys to initiate and/or extend the selection to the
     left by one character.

  [SHIFT]+[ARROW-RIGHT]

     Use these keys to initiate and/or extend the selection to the
     right by one character.

  [CTRL]+[SHIFT]+[ARROW-LEFT]

     Use these keys to initiate and/or extend the selection to the
     left by one word.

  [CTRL]+[SHIFT]+[ARROW-RIGHT]

     Use these keys to initiate and/or extend the selection to the
     right by one word.

  [SHIFT]+[END]

     Use these keys to initiate and/or extend the selection to the
     end of the line.

  There is no keyboard alternative to mouse based rectangular mode
  selection.

  -----------------------------------------------------------------
  TOPIC: Function Keys
  -----------------------------------------------------------------

  [F1]-[F12]

     Base PF keys PF1 through PF12.

  [SHIFT][F1]-[F12]

     The SHIFT form of the base PF keys.

  [CTRL][F1]-[F12]

     The CTRL form of the base PF keys.

  [ALT][F1]-[F12]

     The ALT form of the base PF keys.

  The PF keys can be used to issue SPF/SE commands in a single
  keystroke without typing in the Primary Command Field or the Line
  Command Field. There is a default set of SPF/SE commands assigned
  to some PF keys.

  You can change the PF key settings any time by selecting the KEYS
  item of the OPTIONS menu (or use the KEYS primary command).

  See general command KEYS for details on defining PF keys.

  For keys which have default values, the settings are listed below:

     Key   Value

     PF1   HELP
     PF2   SPLIT
     PF3   END
     PF4   RETURN
     PF5   RFIND
     PF6   RCHANGE
     PF7   UP
     PF8   DOWN
     PF9   SWAP
     PF10  LEFT
     PF11  RIGHT
     PF12  RETRIEVE

     Key         Value

     SHIFT-PF1   CUT
     SHIFT-PF2   COPY
     SHIFT-PF3   PASTE
     SHIFT-PF4   EXPORT
     SHIFT-PF5   EXPORT
     SHIFT-PF6   STOUPPER
     SHIFT-PF7   STOLOWER
     SHIFT-PF8   SXCLUDE
     SHIFT-PF9   DELETE
     SHIFT-PF10  LEFT
     SHIFT-PF11  RIGHT
     SHIFT-PF12  RETRIEVE BACK

  To execute one of these commands simply press the appropriate PF
  key (or combination of [SHIFT] and PF key).

  -----------------------------------------------------------------
  CHAPTER: Using the Mouse
  -----------------------------------------------------------------

  This chapter describes how to use the mouse to:

  *  position the cursor

  *  select a portion of a line

  *  select a single line

  *  select a group of lines

  *  select a rectangular area

  *  cancel selection

  *  cut the selection from the file to the clipboard

  *  copy the selection from the file to the clipboard

  *  paste the selection from the clipboard to the file

  *  columns paste the selection from the clipboard to the file

  *  paste to replace the current selection

  *  type to replace the current selection

  *  delete the selection (does not go to clipboard)

  *  print the selection

  -----------------------------------------------------------------
  TOPIC: Selection Mode
  -----------------------------------------------------------------

  SPF/SE has three selection modes:

  LINE

     In LINE selection mode, you select whole lines within the
     client area of Edit/Browse. The client area is the area where
     text is displayed not including the line command field.

     To select whole lines, position the mouse in the line command
     field then press the left mouse button and move vertically.

     When you drag to the top or bottom edge of the display, the
     file is automatically scrolled to extend the selection in the
     direction of travel. Scrolling continues as long as the mouse
     rests at the edge.  Moving the mouse back toward the interior
     of the client area stops the scrolling. Lifting the left mouse
     button, or dragging the mouse outside the client area ends the
     selection.

  STREAM

     In STREAM selection mode, you select text within the client
     area of Edit/Browse on individual character boundaries. The
     client area is the area where text is displayed not including
     the line command field.

     To select text, position the mouse to any data character, press
     the left mouse button down and hold it while dragging the mouse
     to extend the selection. When you move vertically across lines,
     all the text from the initial selection point to the current
     mouse position is included in the selection.

     Alternatively you can initiate the selection by clicking the
     left mouse button at the starting character position, then the
     [SHIFT] key plus click left mouse button at the end character
     position. All the text between the two points will be selected.
     This method can be used when dragging the mouse would be
     inconvenient.

     Note:  If a stream selection includes all the text in a line or
     includes text from more than one line, it is considered to be a
     "line" selection.  After CUT or COPY, when this selection is
     PASTED, it will be inserted above the current cursor line as an
     individual line or lines.

  RECTANGLE

     In RECTANGLE selection mode, you select text in a rectangular
     block. To select a rectangle, press and hold the left [CTRL]
     key down, then press the left mouse button down and hold it
     while dragging the mouse to extend the selection. This mode is
     primarily useful in manipulating tabular columns in fixed
     length record files. See Edit Primary commands COLSCUT,
     COLSCOPY, COLSPASTE, COLSDELETE for further details.

     Alternatively you can initiate the selection by clicking the
     left mouse button at the starting character position, then the
     [SHIFT] and [CTRL] keys plus click left mouse button at the end
     character position. All the text in columns bounded by the two
     points will be selected. This method can be used when dragging
     the mouse would be inconvenient.

  Note:  On airplanes or in other tight spaces when use of a mouse
  may be inconvenient, you can make STREAM selections using the
  [SHIFT] key in conjunction with the arrow keys.

  There is no keyboard alternative for BLOCK selection mode.

  -----------------------------------------------------------------
  TOPIC: Position the Cursor
  -----------------------------------------------------------------

  You can position the character cursor anywhere on the screen by
  moving the mouse cursor to that position and clicking the left
  mouse button.

  -----------------------------------------------------------------
  TOPIC: Select a Portion of a Line
  -----------------------------------------------------------------

  You can manually select a portion of a line by clicking anywhere
  on it with the left mouse button then drag the mouse left or right
  to extend the selection. After selection click the RIGHT mouse
  button to activate a popup menu of available operations. Apply the
  desired command.

  -----------------------------------------------------------------
  TOPIC: Select a Line
  -----------------------------------------------------------------

  You can manually select a complete line by clicking anywhere on it
  with the left mouse button or you can simply click the RIGHT mouse
  button to activate the popup menu and apply the desired command.
  The current line is implicitly selected.

  -----------------------------------------------------------------
  TOPIC: Select a Group of Lines
  -----------------------------------------------------------------

  A group of lines is two or more complete lines. This is the most
  common form of selection when dealing with program source. In EDIT
  or BROWSE to select a group of lines:

  *  Use the mouse to position the cursor anywhere on the line
     command field.

  *  Press down the left mouse button.

  *  With the left button still pressed drag the mouse to the last
     line in the block. As you drag the mouse, the lines which
     become selected are highlighted.

  *  When you have reached the end of the selection, let the left
     mouse button up. The selection is now complete and all selected
     lines are highlighted.

  -----------------------------------------------------------------
  TOPIC: Selecting a Rectangular Area
  -----------------------------------------------------------------

  *  Press the [CTRL] key. Use the mouse to position the cursor
     anywhere on the line.

  *  Press down the left mouse button.

  *  With the left button still pressed drag the mouse diagonally to
     the opposite corner of the block. As you drag the mouse, the
     area selected is highlighted.

  *  When you have reached the end of the selection, let the left
     mouse button up. The selection is now complete and the selected
     area is highlighted.

  -----------------------------------------------------------------
  TOPIC: Cancel Selection
  -----------------------------------------------------------------

  To cancel the selection, click the left mouse button anywhere in
  the edit area.

  -----------------------------------------------------------------
  TOPIC: Popup Menu
  -----------------------------------------------------------------

  A popup menu is provided as a convenient point and shoot
  activation scheme for frequently used commands which operate on
  the current selection.

  After making a selection, click the right mouse button to activate
  the popup menu. Use the mouse to select the desired command.

  -----------------------------------------------------------------
  TOPIC: Cut Selection
  -----------------------------------------------------------------

  To cut the selection, click the right mouse button; select the CUT
  command.  The selected lines are deleted from the file and put
  into the clipboard.

  -----------------------------------------------------------------
  TOPIC: Copy Selection
  -----------------------------------------------------------------

  To copy the selection, click the right mouse button; select the
  COPY command.  The selected lines are copied into the clipboard.

  -----------------------------------------------------------------
  TOPIC: Paste Selection
  -----------------------------------------------------------------

  Put the mouse cursor on the line where you want the pasted lines
  to be inserted; click the right mouse button; select the PASTE
  command.

  Pasted lines are inserted ABOVE the current line.

  After paste, the clipboard is unchanged so it can be pasted as
  many times as desired.  (The next CUT/COPY operation replaces the
  contents of the clipboard.)

  -----------------------------------------------------------------
  TOPIC: Columns Paste
  -----------------------------------------------------------------

  If the current content of the clipboard is a block selection
  (columnar area), you can do a columnar paste.

  Put the mouse cursor on the line where you want the pasted columns
  to be inserted; click menu EDIT, item COLSPASTE or issue the
  COLSPASTE primary command.

  If you want to add the COLSPASTE command to the Edit popup menu,
  click on menu OPTIONS, item EDIT, dbl-click on field
  "PopupCommands", add COLSPASTE to the primary command set.

  Pasted columns are inserted in lines on a line by line basis.

  After columnar paste, the clipboard is unchanged so it can be
  pasted as many times as desired. (The next CUT/COPY operation
  replaces the contents of the clipboard.)

  -----------------------------------------------------------------
  TOPIC: Paste to Replace Selection
  -----------------------------------------------------------------

  To replace the selection with the current contents of the
  clipboard, simply invoke the paste command at the end of the
  selection process.

  -----------------------------------------------------------------
  TOPIC: Type to Replace Selection
  -----------------------------------------------------------------

  To replace the selection with new text, simply commence typing at
  the end of the selection process.

  -----------------------------------------------------------------
  TOPIC: Delete Selection
  -----------------------------------------------------------------

  To delete the selection, click the right mouse button; select the
  DELETE command.  The selected lines are deleted from the file.
  They are NOT put into the clipboard.

  -----------------------------------------------------------------
  TOPIC: Print Selection
  -----------------------------------------------------------------

  After selecting the lines to be printed, issue the PRINT primary
  command.

  If you want to add the PRINT command to the Edit popup menu,
  invoke menu OPTIONS, sub-option EDITOR, modify field
  "PopupMenuPrimaryCommands".


  -----------------------------------------------------------------
  CHAPTER: Fonts
  -----------------------------------------------------------------

  Fonts come in different faces (Serif vs. Sans Serif), sizes
  (height in printer`s points) and weights (Normal vs. Bold). SPF/SE
  does not support slant (Normal vs. Italic).

  You can set the font independently for display or print.
  Depending on the context only certain fonts are available. Be sure
  to read the "considerations" topic for each font context.

  -----------------------------------------------------------------
  TOPIC: Display Font
  -----------------------------------------------------------------

  The display font is used to display text in Dialogs, Menus, File
  List, and Edit. Normally The default display font is
  "dec-terminal,11". To set the display font, invoke menu OPTIONS
  sub-option FONT, sub-option DISPLAY.

  SPF/SE support font weights "Regular" and "Bold".

  SPF/SE does not support "Italic" or "Bold Italic" choices.

  Depending on screen resolution, some display fonts in weight
  "Bold" may be poor choices.  We don`t make the fonts.  Avoid
  selecting edit fonts that display poorly.

  See further considerations below.

  -----------------------------------------------------------------
  TOPIC: Print Font
  -----------------------------------------------------------------

  The print font is used when files are printed from the File List
  or Edit. The default font for print is "Courier,10". To set the
  print font, invoke "Options", item "Font", sub-item "Print".

  Note: Depending on printer device and printer driver some print
  fonts in weight "Bold" do not render in bold as selected. We don`t
  make the printers or printer drivers. Avoid selecting print fonts
  that do not render faithfully.

  See further considerations below.

  -----------------------------------------------------------------
  TOPIC: Display Font Considerations
  -----------------------------------------------------------------

  In word processors you use a variety of proportional fonts which
  support high quality typographic treatments like letterspacing,
  justification, line leading etc.

  In program source editors you want all characters to have the same
  width and all lines the same baseline for a variety of reasons.

  Accordingly SPF/SE supports only monospace fonts (all characters
  have the same width).

  Monospace fonts come in a limited number of code pages (character
  sets). The following character sets are most common:

  The "ANSI" code page (aka ASCII-ISO8859):

  *  Standard ANSI characters (code points x20 to x7E)

  *  Accented and special punctuation characters commonly used in
     Europe (codepoints xA0 to xFF)

  The "OEM" code page (aka ASCII-IBMPC or "IBM Graphics"):

  *  Graphics and line draw characters (codepoints x01 to x1F)

  *  Standard ANSI characters (codepoints x20 to x7E)

  *  Graphics, line draw, and European characters (codepoints x7F to
     xFF)

  Note:  Character codes which have values from x'00' to x'1F' are
  control characters which have meaning to various system
  interfaces. Control characters are only displayable with fonts
  that use the OEM code page ("Terminal"). Fonts that use the ANSI
  code page display control characters as a black rectangle.

  -----------------------------------------------------------------
  TOPIC: Print Font Considerations
  -----------------------------------------------------------------

  Many printers do not support fonts corresponding to those
  available in your operating system.  Device drivers supplied by
  printer vendors may not support downloading of Adobe or TrueType
  fonts such as "Courier New".  In either of these cases, the
  printer will apply its default font or closest approximation.

  Some general rules to follow when selecting fonts are:

  *  The fact that a font can be displayed does not mean that it can
     be printed.  We use standard print service APIs but some
     printers do not support all character sets available for
     display.  For example, your printer fonts may not support the
     ASCII-IBMPC character set even though it may be displayed.

     If you have trouble printing a particular font:

     a) Check your printer hardware specifications to verify that
     the font, size, and character set selected are available on
     that printer.

     b) Check with your PC or Network administrator to make sure you
     have the latest drivers for that printer type.

     c) Call the printer vendor for assistance.

  -----------------------------------------------------------------
  CHAPTER: Quickstart Tutorial
  -----------------------------------------------------------------

  -----------------------------------------------------------------
  TOPIC: Edit a New Empty File
  -----------------------------------------------------------------

  You can now execute SPF/SE to edit a file. For this exercise we
  will edit a new file named TEST.TXT:

  *  Click on the SPF/SE icon to launch SPF/SE.

     You are now in the SPF/SE session but no edit tasks are active.

     At this point you may want to tailor the SPF/SE operating
     environment. Menu OPTIONS provides access to all SPF/SE
     customization features. See detailed descriptions of these
     features in the General Primary Commands section.

  *  In menu style Legacy (the default), invoke primary option 2 or
     option 3.4.  You are now in the File Open Dialog.  Enter
     "\home\username\temp" (or other suitable test directory) into
     the first input field (Path).  Enter "test.txt" into the second
     input field (Name).  Press [3270-Enter].

  *  In menu style Modern, invoke primary option FILE OPEN. Specify
     the path and file name for the desired individual file (new or
     existing).  Set the BROWSE state as desired. Press
     [3270-Enter].

  The Edit client space is occupied by the Primary Command Field
  followed by multiple data lines. The first seven columns of each
  data line are the Line Command Field where edit line commands are
  entered. The Line Command Field normally displays a six digit line
  number followed by a blank. Columns 8 through 80 display columns 1
  through 73 of each data record.

  The first and last data lines are not part of your file. They are
  created by the editor to indicate that you are at the Top of File
  or Bottom of File respectively.

  You are currently editing new empty file TEST.TXT. The cursor in
  the Primary Command Field. The top display line shows "Top of
  File". The bottom display line shows "Bottom of File".

  *  Use the mouse or arrow keys to move the cursor to the first
     line command field.

  *  Type "i" in the line command field and press [3270-Enter].

  *  You are now in data column 1 of a new empty data line.  Type
     "This is a line of text."

  *  Press [3270-Enter] two times to close out the data entry mode.

  *  Press [ARROW-UP] to position to the start of the data line (the
     Line Command Field of line 000001).

  *  Type "r99" in the Line Command Field.

  *  Press the [3270-Enter] key.

     The file now contains 100 lines of "This is a line of text.".
     We will use this sample file for the remaining exercises.

  -----------------------------------------------------------------
  TOPIC: Moving Around the Screen
  -----------------------------------------------------------------

  Use the cursor keys to move left, right, up and down by one
  position.  When you reach the edge of the display in any
  direction, if there is more data available for display, the
  display is scrolled to display that data. If not, the cursor
  leaves that edge and reappears at the opposite edge.

  The mouse can also be used to position the cursor anywhere on the
  screen. Simply move the mouse pointer to the desired location and
  click the left mouse button one time. More advanced mouse
  capabilities and techniques are described elsewhere.

  The "Enter" key moves you down one line and to the left edge of
  the screen in a single step.

  The [TAB] key moves you from screen column 1 (line command area)
  to screen column 7 (data area) in a single step.

  -----------------------------------------------------------------
  TOPIC: Executing Primary Commands
  -----------------------------------------------------------------

  This section explains how to enter and execute primary commands
  which will be discussed in later sections.

  Press the [HOME] key. Your are now in the Primary Command Field.

  *  Enter the desired primary command.

  *  Press the [3270-Enter] to execute the command.

  *  To end a Dialog, Menu, File List, or Edit press the [F3] key.

  -----------------------------------------------------------------
  TOPIC: Executing Line Commands
  -----------------------------------------------------------------

  This section explains how to enter and execute line commands which
  will be discussed in later sections.

  *  Position the cursor to the Line Command Field of the line you
     want to operate on.

  *  Enter the line command in the Line Command Field.

  *  To execute press [3270-Enter].

  -----------------------------------------------------------------
  TOPIC: Scrolling the Display
  -----------------------------------------------------------------

  To move up or down one full frame in the file use the [PG-UP] and
  [PG-DN] keys respectively.

  Function keys [F7] and [F8] are pre-programmed with the UP and
  DOWN primary commands respectively.

  To go to the top of the file in a single step enter and execute
  primary command:

  top

  To go to the bottom of the file in a single step enter and execute
  primary command:

  bot

  To reveal text not visible on the right enter and execute primary
  command:

  right

  To reveal text not visible on the left enter and execute primary
  command:

  left

  Function keys [F10] and [F11] are pre-programmed with the LEFT and
  RIGHT primary commands respectively.

  -----------------------------------------------------------------
  TOPIC: Summary 1
  -----------------------------------------------------------------

  You now know how to:

  *  Edit a new or existing file.

  *  Travel around the screen using the cursor keys or mouse.

  *  Enter and execute primary and line commands.

  *  Scroll the file vertically using the [PG-UP] and [PG-DN] keys.

  *  Go to the top or bottom of the file in a single step using the
     "top" and "bot" primary commands.

  *  Go to the left or right edge of the data using the "left" and
     "right" primary commands.

  -----------------------------------------------------------------
  TOPIC: Inserting Text in Existing Line
  -----------------------------------------------------------------

  The default text entry mode is "insert". In insert mode the cursor
  is a thin vertical line. Move the cursor to the data portion of
  the record you want to change and type the text you want inserted.

  -----------------------------------------------------------------
  TOPIC: Overtyping Text in Existing Line
  -----------------------------------------------------------------

  To overtype text you must first put the editor into "overtype"
  mode by pressing the [INS] key. In overtype mode the cursor is
  shaped like a box. Simply move the cursor to the data portion of
  the line you want to change and type over the text you want
  replaced.

  -----------------------------------------------------------------
  TOPIC: Insert New Lines in Existing File
  -----------------------------------------------------------------

  To insert a new line:

  *  Type "i" line command in the line above where you want a new
     line inserted.

  *  Press [3270-Enter].

  *  A new line is inserted immediately below the "i" line.  The
     cursor is placed in the first data column.

  *  Type the desired data in the new line.

  If you would like another new line immediately following the
  first:

  *  After entering text on the first new line and without any other
     intervening keystrokes, press [3270-Enter].

  *  Another new line is inserted and the cursor is positioned at
     the first data column.

  *  Continue entering text. Repeat this process as required.

  *  To create a blank line, type one blank at the start of the
     line, then press [3270-Enter].

  After all data is entered, press [3270-Enter] one more time to
  eliminate unused empty lines.

  -----------------------------------------------------------------
  TOPIC: Deleting Lines in Existing File
  -----------------------------------------------------------------

  To delete a single line:

  *  Type "d" line command in the line you want deleted.

  *  Press [3270-Enter].

  *  The line is deleted.

  To delete multiple lines:

  *  Type "dd" line command in the first line of the block of lines
     you want deleted.

  *  Type "dd" line command in the last line of the block of lines
     you want deleted.

  *  Press [3270-Enter].

  *  The block of lines between the first "dd" and last "dd"
     inclusive is deleted.

  -----------------------------------------------------------------
  TOPIC: Summary 2
  -----------------------------------------------------------------

  In the last information set you learned how to:

  *  Insert text in existing lines.

  *  Overtype existing lines.

  *  Insert new lines.

  *  Enter text in an empty file.

  *  Delete existing lines.

  -----------------------------------------------------------------
  TOPIC: Finding Text
  -----------------------------------------------------------------

  If you don`t want to manually search an entire file looking for a
  particular record, you can use the FIND primary command to get
  there in a single step.  For example,

  find line

  finds the first occurrence of the string "line" in upper, lower,
  or mixed case.

  If you want to find the next occurrence of the same string press
  [F5].

  -----------------------------------------------------------------
  TOPIC: Changing Text
  -----------------------------------------------------------------

  You can change the first occurrence of a string to another value
  with the CHANGE primary command. For example,

  change line bit

  changes the first occurrence of string "line" to "bit".

  To change the next occurrence of the same string press [F6].

  change this bit all

  changes all occurrences of string "this" to "bit".

  -----------------------------------------------------------------
  TOPIC: Summary 3
  -----------------------------------------------------------------

  In the last information set you learned how to:

  *  Find the first occurrence of a string of text.

  *  Find the next occurrence of the same string.

  *  Change the first occurrence of a string to another value.

  *  Change the next occurrence of the same string.

  *  Change all occurrences of a string to another value.

  -----------------------------------------------------------------
  TOPIC: Repeat Lines in Place
  -----------------------------------------------------------------

  To repeat a single line:

  *  Type "r" line command in line to be repeated.

  *  Press [3270-Enter]. Line with "r" is repeated in place.

  To repeat multiple lines:

  *  Type "rr" line command in first line of block of lines to be
     repeated.

  *  Type "rr" line command in last line of block of lines to be
     repeated.

  *  Press [3270-Enter]. Block of lines between first line with "rr"
     and last line with "rr" inclusive is repeated in place.

  -----------------------------------------------------------------
  TOPIC: Copy Lines to a New Location
  -----------------------------------------------------------------

  To copy a single line:

  *  Type "c" line command in line to be copied.

  *  Type "a" line command in line preceding desired destination.

  *  Press [3270-Enter]. Line with "c" is copied after line with
     "a".

  To copy multiple lines:

  *  Type "cc" line command in first line of block of lines to be
     copied.

  *  Type "cc" line command in last line of block of lines to be
     copied.

  *  Type "a" line command in line preceding desired destination.

  *  Press [3270-Enter]. Block of lines between first line with "cc"
     and last line with "cc" inclusive is copied after line with
     "a".

  Note: You can use the "b" line command to copy lines BEFORE if
  desired.

  -----------------------------------------------------------------
  TOPIC: Move Lines to a New Location
  -----------------------------------------------------------------

  To move a single line:

  *  Type "m" line command in line to be moved.

  *  Type "a" line command in line preceding desired destination.

  *  Press [3270-Enter]. Line with "m" is moved after line with "a".

  To move multiple lines:

  *  Type "mm" line command in first line of block of lines to be
     moved.

  *  Type "mm" line command in last line of block of lines to be
     moved.

  *  Type "a" line command in line preceding desired destination.

  *  Press [3270-Enter]. Block of lines between first line with "mm"
     and last line with "mm" inclusive is moved after line with "a".

  Note: You can use the "b" line command to move lines BEFORE if
  desired.

  -----------------------------------------------------------------
  TOPIC: Summary 4
  -----------------------------------------------------------------

  In the last information set you learned how to:

  *  Copy a single line from one location in the file to any other
     location.

  *  Copy a block of lines from one location in the file to any
     other location.

  *  Move a single line from one location in the file to any other
     location.

  *  Move a block of lines from one location in the file to any
     other location.

  -----------------------------------------------------------------
  TOPIC: Saving Modified File
  -----------------------------------------------------------------

  At any point in the edit session, to save the file in its modified
  form, enter and execute primary command:

  SAVE

  After the file is saved, editing resumes.

  -----------------------------------------------------------------
  TOPIC: Exit With Save
  -----------------------------------------------------------------

  To end edit and save a modified file, enter and execute primary
  command:

  END

  If the file was modified, and Edit Option "PromptForSaveOnExit" is
  TRUE, the END dialog is presented allowing you to specify whether
  to save or not. You can also CANCEL the dialog.

  Function key [F3] is pre-programmed to invoke the END primary
  command.

  -----------------------------------------------------------------
  TOPIC: Exit Without Save
  -----------------------------------------------------------------

  To exit edit without saving a modified file, enter and execute
  primary command:

  cancel

  -----------------------------------------------------------------
  TOPIC: Summary 5
  -----------------------------------------------------------------

  In the last information set you learned how to:

  *  Save a modified file and continue editing.

  *  Exit a modified file saving all changes.

  *  Exit a modified file without saving changes.

  -----------------------------------------------------------------
  CHAPTER: Find, Change, and Exclude
  -----------------------------------------------------------------

  The FIND, CHANGE, and EXCLUDE commands are generalized and
  powerful.  They allow you to search for, and operate upon, a
  specific character string or pattern throughout an entire file.
  You can make changes stepwise or globally.

  Two other commands repeat the functions. RFIND repeats the last
  FIND using the same parameters. RCHANGE repeats the last CHANGE.

  FIND highlights any string that is found.  CHANGE highlights any
  string that is changed.

  -----------------------------------------------------------------
  TOPIC: Basic Find and Change Format
  -----------------------------------------------------------------

  The basic format of FIND, CHANGE and EXCLUDE commands is:

  FIND     string1             [search-limits]  [direction]  [context]
  CHANGE   string1   string2   [search-limits]  [direction]  [context]
  EXCLUDE  [string1]           [search-limits]  [direction]  [context]

  FIND finds a string. CHANGE changes a string.  EXCLUDE excludes
  the line containing the string from view.

  The STRING1 parameter always specifies the search character
  string. The STRING2 parameter specifies the replacement character
  string. These strings are usually very simple to specify. In
  addition to simple strings, SPF/SE provides functions to handle
  many special situations.

  If asterisk(*) is specified for STRING1, the STRING1 value from
  the last FIND, CHANGE, or EXCLUDE command is used. This notation
  eliminates the need for retyping STRING1 when repeating any of
  these commands with different parameters.

  If asterisk(*) is specified for STRING2, the STRING2 value from
  the last CHANGE command is used. This notation eliminates the need
  for retyping STRING2 when repeating the last CHANGE command with
  different parameters.

  The string parameters may be followed by several parameters that
  tell SPF/SE where the search should begin and how it should
  proceed.  These parameters specify:

  *  Search starting at the top or bottom of the file.

  *  Search forward or backward from the current cursor location.

  *  Limit search to characters between specific columns.

  *  Limit search to lines between specific labels.

  *  Limit string scan to context of prefix, suffix, or word.

  *  Search all lines in the file.

  -----------------------------------------------------------------
  TOPIC: FIND/CHANGE Relationship
  -----------------------------------------------------------------

  The relationship between FIND and CHANGE can be used to solve a
  common problem. Suppose that you want to change all of the
  characters "V1.0" to "V2.0" in your documentation because you just
  changed version numbers. But also assume that you want to leave
  some of the instances of "V1.0" in your file unchanged.

  By using the relationship between FIND and CHANGE you can find
  each instance of "V1.0" and then decide whether to change it or
  leave it alone.

  First, scroll to the top of the file. Then, issue the following
  command:

  FIND V1.0

  You are now at the first occurrence of the string "V1.0".  Now
  issue the following command:

  CHANGE V1.0 V2.0

  The first occurrence of "V1.0" is changed to "V2.0".  This is
  where the useful interaction begins.  The RFIND command uses the
  parameters specified in the last FIND (or CHANGE) primary command.
  The RCHANGE command uses the parameters specified in the last
  CHANGE primary command.

  Press [F5] (RFIND) to find the next "V1.0".  Now having found the
  next instance of "V1.0", if you wish to change it, press [F6]
  (RCHANGE).  If you don`t want to change it, press [F5] again to
  continue to the next "V1.0".

  Note:  This example assumes you have not redefined [F5] or [F6].

  -----------------------------------------------------------------
  TOPIC: FIND/CHANGE/EXCLUDE Relationship
  -----------------------------------------------------------------

  The problem described in the previous sub-section can also be
  solved using the relationship between the FIND and EXCLUDE
  commands.

  This solution uses the FIND command to make excluded lines
  containing the find string visible.

  First, use the EXCLUDE primary command to exclude all lines:

  EXCLUDE ALL

  Note:  You could also use the X or XX edit line commands to
  accomplish the same thing.

  Second, use the FIND primary command the make all "V1.0" lines
  visible.

  FIND V1.0 ALL

  Next, use the CHANGE, RFIND, RCHANGE primary commands to change
  only the desired lines.

  CHANGE V1.0 V2.0

  Finally, use the RESET primary command to make all lines visible.

  RESET

  To review:

  *  All these commands are entered in the Primary Command Field or
     by function key.

  *  To exclude all lines (make them invisible): EXCLUDE ALL

  *  To find all lines with a particular string (make them visible):
     FIND string ALL

  *  To find an instance of a particular string: FIND string

  *  To find the next instance of a particular string: RFIND ([F5])

  *  To alter an instance of a string to a new value: CHANGE string1
     string2

  *  To step through the file considering each instance of a target
     string for possible change: RFIND ([F5]) then RCHANGE ([F6])

  -----------------------------------------------------------------
  TOPIC: Specifying Strings
  -----------------------------------------------------------------

  FIND, CHANGE, and EXCLUDE commands include strings as parameters.

  The first string, STRING1 is a search string.  The second string,
  STRING2 is a replacement string.  SPF/SE provides several flexible
  and powerful methods for specifying these strings.

  -----------------------------------------------------------------
  SUBTOPIC: Simple Strings
  -----------------------------------------------------------------

  If a search string does not contain blanks or semi-colons, it is a
  simple string. By default, simple strings are case insensitive.
  For example:

  FIND AB

  would find any combination of the letters A and B in upper or
  lower case: AB, ab, aB, or Ab.

  -----------------------------------------------------------------
  SUBTOPIC: Delimited Strings
  -----------------------------------------------------------------

  If a string contains blanks or semi-colons, it must be enclosed in
  quotes to insure proper processing. When a string is enclosed in
  single or double quotes, it is a delimited string. For example:

  FIND 'all good men'

  If single or double quotes are part of the string, it must be
  enclosed in the opposite quote type. For example:

  CHANGE  "he said 'yes'"  "he said 'no'" all
  CHANGE  '"hello all"'  '"good-bye all"'

  If you wish to specify an empty string (null), enter two adjacent
  quotes. For instance, if you want to delete all occurrences of
  "FREE" from your file, issue the following command:

  CHANGE  FREE '' ALL

  -----------------------------------------------------------------
  SUBTOPIC: Exact Match Character Strings
  -----------------------------------------------------------------

  Exact match character strings are case sensitive. The comparison
  is made using exactly the string specified and no other. For
  example:

  FIND C'AB'

  finds AB; does not find ab, aB, or Ab.

  -----------------------------------------------------------------
  SUBTOPIC: Hex Strings
  -----------------------------------------------------------------

  If you want to find or change hexadecimal strings, you must
  specify the hex delimiter character X followed immediately by
  hexadecimal digit pairs in quotes. For example:

  FIND X'2C'

  CHANGE x'09' x'20' all

  Also see Edit Primary Commands HEX and HEXIN for display and
  modification of hexadecimal data.

  -----------------------------------------------------------------
  SUBTOPIC: Picture Strings
  -----------------------------------------------------------------

  You can search for generic characters such as "any number", or
  "any non-blank" using picture strings. A picture string is
  specified with the P prefix character followed by the picture
  string in quotes. For example, P"... picture string ...". The
  picture string may contain any combination of picture characters
  and normal text characters.

  As an example let`s say you want to find all references to error
  messages in a particular set of files and that the messages have
  the form "ERRnnn" where "nnn" is any three digit number. To find
  and display exclusively all lines containing an error message:

  EXCLUDE ALL     (make all lines invisible)
  FIND P'ERR###'  (make "ERRnnn" lines visible)

  With the foregoing example in mind, the following picture strings
  may be specified in STRING1:

  P'='

     Any character

  P'^'

     Any non-blank character (all but BLANK)

  P'.'

     Any non-ASCII character (not in set x20..x7E (BLANK to TILDE))

  P'#'

     Any numeric character (in set "0..9")

  P'-'

     Any non-numeric character (not in set "0..9")

  P'@'

     Any alphabetic character (in set "a..z, A..Z")

  P'<'

     Any lower case alphabetic character (in set "a..z")

  P'>'

     Any upper case alphabetic character (in set "A..Z")

  P'$'

     Any punctuation (not in set "0..9, a..z, A..Z")

  When picture strings are used in the CHANGE command, STRING2 must
  conform to the following rules:

  *  STRING1 and STRING2 must be the same length.

  *  STRING2 picture characters are limited to =, <, and >.

  Picture strings may be any combination of picture characters and
  normal text characters. The following command finds any string
  that:

  *  begins with a blank

  *  is followed by two numerics

  *  is followed by a blank character

  *  and ends with a non-numeric

  FIND P' ## -'

  The following command changes all characters in columns 56-60 to
  blanks:

  CHANGE p'=' ' ' 56 60 all

  The following command changes all characters to uppercase:

  CHANGE all p'=' p'>'

  -----------------------------------------------------------------
  TOPIC: Limiting Search and Replace Functions
  -----------------------------------------------------------------

  -----------------------------------------------------------------
  SUBTOPIC: Label Range Search
  -----------------------------------------------------------------

  The search for STRING1 may be limited to a specific range of
  lines. To do this, include the line labels of the first and last
  lines in the range. Both labels must be specified.  If a search is
  to be limited to a single labeled line, enter that label twice, as
  the first and last line of the range.

  Line labels are created using the "." line command.  The system
  provides some built-in labels for commonly used file positions:

  .ZF or .ZFIRST

     The first line of the file.

  .ZL or .ZLAST

     The last line of the file.

  .ZC or .ZCSR

     The cursor line.

  For example, the following command finds all occurrences of the
  word "boy" between the lines labeled .A and .B.

  find boy .a .b all

  The following example changes the first occurrence of "this" to
  "that" between the first line of the file and the line on which
  the cursor is positioned.

  change this that .zf .zc

  -----------------------------------------------------------------
  SUBTOPIC: Column Search
  -----------------------------------------------------------------

  The search for STRING1 may also be limited to specified columns.
  Two numeric operands may be specified. The first specifies the
  column in which the search is to begin; the second specifies the
  column in which the search is to end. The two numbers must be
  separated by at least one blank space.

  *  If neither column1 nor column2 are specified, the search is
     limited to the current BOUNDS setting.

     See general command PROFILES or line command BNDS for details
     on setting BOUNDS.

  *  If only column1 is specified, the search is limited to that
     column for the length of string1.

  For example, the following command finds all occurrences of ABC
  anywhere between columns 1 and 30.

  FIND ABC 1 30 ALL

  The following command finds all occurrences of ABC beginning in
  column 5 exclusively.

  FIND ABC 5 ALL

  The following command changes the next occurrence of ABC in
  columns 8 to 10 to DEF.

  CHG ABC DEF 8 10

  An even more efficient way to specify the same request is

  C ABC DEF 8

  -----------------------------------------------------------------
  SUBTOPIC: Direction of Search
  -----------------------------------------------------------------

  Additional operands are provided to control the starting point and
  the direction of a search:

  FIRST

     Start at the top of data line and search forward to find the
     first string-1 match.

  LAST

     Start at the bottom of data line and search backward until a
     string-1 match is made.

  PREV

     Start at the current cursor location and search backward until
     a string-1 match is made.

  NEXT

     Start at the current cursor location and search forward to find
     the next string-1 match.

  ALL

     Start at the top of data line and search forward to find all
     matches with string-1 until the bottom of data line is reached.

  If the direction of search is forward (NEXT, ALL or FIRST
  specified), then RFIND and RCHANGE ([F5] and [F6]) moves the
  cursor forward from one occurrence of string-1 to the next.

  If the direction of search is backward (LAST or PREV specified),
  then RFIND and RCHANGE ([F5] and [F6]) moves the cursor backward
  from one occurrence of string-1 to the previous.

  If either "TOP OF DATA REACHED" or "BOTTOM OF DATA REACHED"
  messages are displayed, RFIND and RCHANGE ([F5] and [F6]) may be
  used to "wrap around" the file to search through the unsearched
  portion.

  Note: If you want to search for a string that contains one of the
  FIND/CHANGE/EXCLUDE keywords like "next" or "all", the words must
  be enclosed within quotes:

  FIND "all the king`s men"
  CHG "next time" "last time" ALL

  -----------------------------------------------------------------
  TOPIC: Context Constraint
  -----------------------------------------------------------------

  Normally the search string is scanned for "context free", that is,
  it is found without regard to surrounding characters. You can
  constrain the string scan to the following contexts:

  *  PREFIX, only find the string if it is preceded by blank,
     punctuation, or line start, and followed by non-blank or
     non-punctuation.

  *  SUFFIX, only find the string if it is preceded by non-blank or
     non-punctuation, and followed by blank, punctuation, or line
     end.

  *  WORD, only find the string if it is preceded by blank,
     punctuation, or line start, and followed by blank, punctuation,
     or line end.

  -----------------------------------------------------------------
  CHAPTER: Colorization of Program Source
  -----------------------------------------------------------------

  -----------------------------------------------------------------
  TOPIC: Colorization
  -----------------------------------------------------------------

  Colorization of program source is controlled by colorization
  control files which can be bound to the file profile.

  Invoke option OPTIONS, sub-option COLOR, sub-option SOURCE
  COLORIZATION, sub-option MODIFY or CREATE.

  To bind a colorization control file to a file profile, invoke
  option OPTIONS, sub-option FILE PROFILES. In the "File Type"
  dialog select the file type you want to colorize from the file
  type list. In the "File Profile" dialog set field "Color type" to
  the desired color type (e.g. CBL).

  Use the following procedure when creating or modifying a
  colorization control file for normal program source:

  *  For CREATE, invoke sub-option WORD.

  *  Specify the NAME to be associated with this colorization
     specification.

  *  Set delimiters for the programming language in question (e.g.
     semicolon, period, etc). (NOTE: Alternatively, delimiters may
     be specified as "words", see below.)

  *  Specify whether the program source "words" are case sensitive.

     If TRUE is specified, program source "words" must be an exact
     match before colorization takes place (e.g. IF=IF, if!=IF).

     If FALSE is specified, program source "words" may be upper,
     lower, or mixed case (e.g. if=IF, IF=IF, If=IF).

  *  For each word set (up to 8), specify foreground (FG) and
     background (BG) color numbers, then click on the EDIT button to
     add or delete words.

  *  In the WORD LIST dialog, if you want to create a new word or
     words, click on NEW.

  *  In the COLOR WORDS dialog, enter one or more reserved words
     from the programming language you are using.  Click on OK.

  *  In the WORD LIST dialog, if you want to delete a word, enter
     the D line command or click on the entry with the right mouse
     button then click on DELETE.

  *  Click on CLOSE or press F3 to exit the color dialogs.

  You can also colorize the fields of a flat file database and have
  field titles maintained above the edit client window.

  To colorize the fields of a flat file database use the following
  procedure:

  *  For CREATE, invoke sub-option FIELD.

  *  Specify the NAME to be associated with this colorization
     specification.

  *  For each field (up to 8), specify a text header to be displayed
     at the top of the edit display.

  *  For each field (up to 8), specify FROM and TO column numbers
     for the field.

  *  For each field (up to 8), specify foreground (FG) and
     background (BG) colors.

  *  Click on CLOSE  or press F3 to exit the color dialogs.

  The above procedures should provide the desired colorization. If
  the above procedures are unclear or you are unable to get the
  desired results, further discussion below describes the
  colorization process in greater detail.

  When using SPF/SE to write and maintain programs it is helpful to
  colorize reserved words and special characters in the source of
  the programming language being used.  This helps in understanding
  the program providing for more efficient authoring.

  SPF/SE supports a simple generalized method of specifying program
  source colorization which can be applied to the reserved words of
  any programming language.  Some languages that can be easily
  colorized with SPF/SE are COBOL, FORTRAN, PL/1, ADA, "C", "C++",
  JAVA, PASCAL, MODULA, and other similar languages.

  SPF/SE also supports colorization of fixed fields in data records.

  Colorization specifications are bound to file type for easy
  discrimination between program source and data files.

  There are two basic components to colorization:

  *  The color palette consisting of sixteen colors.  To set the
     color palette, select the COLORS item of the OPTIONS menu.
     (You can also use the primary command COLORS.)

  *  A colorization file which binds specific foreground and
     background colors to program source language elements or data
     record fields.

  When a file is colorized by field, each field name is displayed in
  a floating header above the columns of the field in Edit or
  Browse.

  Colorization files are maintained in the
  "\spf-install-directory\profiles" (or wherever you installed
  SPF/SE) sub-directory with name "color-type.CLR".  Color type
  normally corresponds to the file type of the subject program
  source files.  For example, CBL.CLR is the colorization file for
  *.CBL type COBOL source files.

  Each colorization file consists of records. Each record tells
  SPF/SE how to colorize a specific element of the language in
  question.

  SPF/SE supplies default colorization files for a number of
  languages. Feel free to alter them to suit your needs.

  There may be a case where you want to directly edit colorization
  files.  For example, it could be advantageous to create a skeletal

  colorization file using the dialogs and then edit it directly to
  bulk enter all the reserved words.  The specifications for the
  colorization control records follow.  They are subject to change
  without notice.

  COMMENT

  Any line beginning with double forward slash (//) is treated as a
  comment. Do not put comments on the end of control records.

  COLOR_DELIMITERS c [c c c]

  Specifies one or more delimiter characters separated by blank.
  Normally various punctuation characters are specified as
  delimiters. Any character specified as a delimiter may NOT be
  specified in a color word (see COLOR_WORD below).

  NOTE1: BLANK is always treated as a delimiter and thus need not be
  specified.

  NOTE2: Single character words are implicitly delimiters.

  COLOR_CASE_SENSE  YES | NO

  Specifies globally whether color words are to be compared with
  case sensitivity. If YES is specified, COLOR_WORDs and the
  colorized text must match exactly. If NO is specified, the
  colorized text can be in any case as long as the letters are the
  same. If not specified, the default is NO. Example of case sense
  treatment:

  For example, if YES is specified:

  abc = abc, ABC = ABC, ABC != abc, Abc != abc.

  For example, if NO is specified:

  abc = abc, ABC = ABC, ABC = abc,  Abc = abc.

  COLOR_LITERALS fg,bg

  Specifies the foreground color and background color for literals
  (quoted strings) separated by commas. When a literal is found in
  any column, the specified colors are applied to all characters
  within the quoted string.

  When entering text it is a common practice to use the single quote
  character (x27) in place of the apostrophe (x60). To avoid
  ambiguous colorization of possessives and contractions, you must
  not use single quote in place of the apostrophe character. For
  example,

    Incorrect:  don't, Cheryl's
    Correct:    don`t, Cheryl`s

  Quoted string colorization does not span lines.

  Foreground and background colors are specified as integer numbers
  between 0 and 15 corresponding to the sixteen colors in the
  current color palette.  For example, "0,3" corresponds to the
  default text colors: black text on a white background.

  COLOR_TO_END fg,bg,word

  Specifies the foreground color, background color, and start-word
  separated by commas. When the start-word is found in any column,

  the specified colors are applied to it and all characters which
  follow to the end of the line.

  NOTE: normally used to highlight program source comments.

  COLOR_COL_TO_END fg,bg,word,column

  Specifies the foreground color, background color, start-word, and
  column separated by commas. When the start-word is found in the
  specified column, the specified colors are applied to it and all
  characters which follow to the end of the line.

  NOTE: normally used to highlight program source comments.

  COLOR_BEGEND fg,bg,start-word,end-word

  Specifies the foreground color, background color, start-word, and
  end-word separated by commas. If a start-word is found in any
  column, the specified colors are applied to it and all characters
  which follow up to and including the corresponding end-word.

  This form of colorization does not span lines.

  NOTE: normally used to highlight program source comments.

  COLOR_WORD_SET fg,bg

  Specifies the foreground color and background color for the
  COLOR_WORDs that follow separated by commas.

  COLOR_WORD c... [c... c... c...]

  Specifies one or more words separated by blank. Words may be from
  one to 16 characters long. If a color word is found in the source
  file, the current COLOR_WORD_SET colors are applied to it.

  Single character "words" from set "A" to "Z"(alpha) require
  delimiters.

  Single character "words" except "A" to "Z"(non-alpha) do not
  require delimiters.

  A colorization "word" may not consist of all digits(0..9).

  Duplicate "word" entries are not allowed.

  COLOR_FIELD nn,nn,nn,nn,name

  Specifies a color field.  Each color field is comprised of a
  foreground color, background color, start column, end column, and
  name.  The end column number must be equal or greater than start
  column number.  Color fields must be specified in ascending order
  and may not overlap.

  Color fields are mutually exclusive to word sets.  That is, your
  colorization file can describe either word or field colorization
  but not both.  If word sets are specified in the same color map
  file as color fields, they are ignored.

  SPECIAL CHARACTERS

  In some cases a character which you want to specify is not
  typeable or does not display on your computer system. In this
  case, you can specify the character using decimal notation in the
  form "\d..." where "..." is an integer number in the range 1..255.
  Example,

  COLOR_DELIMITER \d...

  Some special character values are reserved for system use and may
  not be specified:

  0  (Null)
  9  (Tab)
  10 (Line feed)
  13 (Carriage Return)
  26 (EOF)


  -----------------------------------------------------------------
  CHAPTER: Dialog Manager
  -----------------------------------------------------------------

  -----------------------------------------------------------------
  TOPIC: Theory of Operation
  -----------------------------------------------------------------

  The SPF/SE Dialog Manager provides support for:

  *  Writing Edit macros to perform repetitive tasks. For example,
     drawing a box around a block of text, centering lines, deleting
     duplicate lines, etc.

  *  In more sophisticated uses, you can present dialogs to capture
     information which modify macro behavior.

  *  Executing external programs to perform specific services.  For
     example, you might call a compiler to compile the current edit
     file, then merge the resulting error messages for review.

  The SPF/SE Dialog and Macro writing language is a subset of "C".
  It is interpretive, that is, it is not compiled and linked but
  rather executes directly. Interpretive languages do not perform as
  well as their compiled equivalents but  do provide flexibility and
  convenience not otherwise available.

  An Edit macro is simply an extension of the Edit Primary Command
  set.  It is not possible for an Editor to anticipate all
  conceivable uses that it may be put to, and economic realities
  limit what can be offered. Also there are many complex functions
  that may be performed outside Edit which have value.

  When a feature which you need is not present you generally can
  write a macro to perform the operation.

  When you enter a primary command which is not recognized, the
  primary command processor passes the command and its parameters to
  the "C" interpreter. The "C" interpreter in turn looks for a
  source file corresponding to the command in the MACROS PATH. Thus
  if you enter the primary command CENTER, the "C" interpreter looks
  for file "center.c". The "C" interpreter then evaluates the
  program statements and executes the first function declared in the
  macro source file.

  SPF/SE sample macros are found in directory:

      \spf-install-directory\macros

  Before proceeding, it is important that you have a working
  knowledge of "C". If you do not, we urge you at minimum to obtain
  the following publication for review and study:

  The C Programming Language
  Brian Kernighan and Dennis Ritchie
  Prentice-Hall
  ISBN 0-13-110163-3

  -----------------------------------------------------------------
  TOPIC: Creating a Macro
  -----------------------------------------------------------------

  Let`s say for example that you want a command to center the
  current line.  We will call our macro CENTER.

  The source for our macro can be developed in any directory.  When
  development is complete macros are placed in
  "\spf-install-directory\macros" for release.  In our example we
  will develop our macro in directory "\home\username\dev\macros".
  Go ahead and make this directory now.

  To make our macro accessible to SPF/SE we need to set the MACROS
  PATH to point to our development directory and also continue
  pointing to the release directory. Invoke primary option OPTIONS,
  sub-option PATHS.  Set field "Macros" to:

      "\home\username\dev\macros;\spf-install-directory\macros"

  This tells SPF/SE to look for macro source first in
  "\home\username\dev\macros", if not found there then it looks in
  "\spf-install-directory\macros".

  When testing macros we need to turn off the Macro Cache. A macro
  is normally loaded and interpreted only once while SPF/SE is
  active.  The resulting internal form is cached for quick access in
  subsequent uses. As we will be changing the macro during
  development we need to turn off the cache. Otherwise we would have
  to exit SPF/SE and re-invoke it to get the test macro loaded.

  In Menu Style "Legacy", invoke primary option DIALOG TEST.

  In Menu Style "Modern", invoke primary option UTILITIES, sub-option
  DIALOG TEST.

   Set field MACRO CACHE to NO.

  Macro program source files are named "macro-name.c", thus our
  macro source file will be "\home\username\dev\macros\center.c".

  The following code fragment shows the CENTER macro function
  declaration:

  void Center(void) {

    ...

  } // Center

  The first thing we need to do is determine if we are in Edit. To
  do that we use an "SPFservice" call. "SPFservice" provides
  numerous "query" and "set" functions to support macro control of
  the Edit environment. In this case we will query to determine if
  any tasks are active and exit if there are none.

  void Center(void) {

    if (SPFservice("query","task_count")) { // any tasks?
      ...
      }
    else {
      Msg("CENTER: not in edit");
    }

  } // Center

  We are also using the "Msg" function to communicate when there are
  no tasks active.

  Notice that we declared our function name as "Center" and we
  called "Msg". The initial capital letter is optional, we use this
  form to improve readability. Function names and variable names are
  held internally in uppercase. Externally (in your source), you can
  enter them in any case which fits your programming style. Thus
  "Msg", "MSG", and "msg" all call the same function.

  The next thing we need to do is determine the BOUNDS and their
  width:

  void Center(void) {

    int bounds_left, bounds_right, bounds_width;

    if (SPFservice("query","task_count")) { // any tasks?
      bounds_left  = SPFservice("query","bounds_left");
      bounds_right = SPFservice("query","bounds_right");
      bounds_width = bounds_right - bounds_left + 1;
      ...
      }
    else {
      Msg("CENTER: not in edit");
    }

  } // Center

  Now we need to fetch the current line and determine its status.
  The cursor might be on a non-data line like TOF, BOF, a NOTE, or
  and EXCLUDE marker line.

  void Center(void) {

    char *line;
    int   bounds_left, bounds_right, bounds_width;

    if (SPFservice("query","task_count")) { // any tasks?
      bounds_left  = SPFservice("query","bounds_left");
      bounds_right = SPFservice("query","bounds_right");
      bounds_width = bounds_right - bounds_left + 1;
      line = SPFservice("query","line_data");
      if (line) {
        ...
        }
      else {
        Msg("CENTER: line empty or non-data line");
      }
      }
    else {
      Msg("CENTER: not in edit");
    }

  } // Center

  Next we need to delete the leading blanks in the current line.

  void Center(void) {

    char *line;
    int   bounds_left, bounds_right, bounds_width;
    int   i;

    if (SPFservice("query","task_count")) { // any tasks?
      bounds_left  = SPFservice("query","bounds_left");
      bounds_right = SPFservice("query","bounds_right");
      bounds_width = bounds_right - bounds_left + 1;
      line = SPFservice("query","line_data");
      if (line) {
        StrStripLeading(line," ");                     // strip leading blanks
        ...
        }
      else {
        Msg("CENTER: line empty or non-data line");
      }
      }
    else {
      Msg("CENTER: not in edit");
    }

  } // Center

  Next we need to center the line within the width of the bounds.

  void Center(void) {

    char *line;
    int   bounds_left, bounds_right, bounds_width;
    int   i;

    if (SPFservice("query","task_count")) { // any tasks?
      bounds_left  = SPFservice("query","bounds_left");
      bounds_right = SPFservice("query","bounds_right");
      bounds_width = bounds_right - bounds_left + 1;
      line = SPFservice("query","line_data");
      if (line) {
        StrStripLeading(line," ");                     // strip leading blanks
        StrCenter(line," ",bounds_width);              // center within bounds
        ...
        }
      else {
        Msg("CENTER: line empty or non-data line");
      }
      }
    else {
      Msg("CENTER: not in edit");
    }

  } // Center

  Finally we need pad the line on the left to reposition the
  centered text to originate at the left bound.

  void Center(void) {

    char *line;
    char *pad;
    int   bounds_left, bounds_right, bounds_width;
    int   i;

    if (SPFservice("query","task_count")) { // any tasks?
      bounds_left  = SPFservice("query","bounds_left");
      bounds_right = SPFservice("query","bounds_right");
      bounds_width = bounds_right - bounds_left + 1;
      line = SPFservice("query","line_data");
      if (line) {
        StrStripLeading(line," ");                     // strip leading blanks
        StrCenter(line," ",bounds_width);              // center within bounds
        i = bounds_left - 1;                           // cols left of left bound
        if (i) {
          pad = StrGenStr(" ",i);                      // generate the pad string
          StrInsSubstr(line,pad,1);                    // insert pad
        }
        SPFservice("set","line_data",line);            // set new line
        SPFservice("set","cursor_column",bounds_left); // put cursor at left bound
        }
      else {
        Msg("CENTER: line empty or non-data line");
      }
      }
    else {
      Msg("CENTER: not in edit");
    }

  } // Center

  -----------------------------------------------------------------
  TOPIC: Presenting a Dialog
  -----------------------------------------------------------------

  Macros may be executed in Edit or outside Edit.

  First we need to specify a "dialog". A dialog is a two dimensional
  display comprised of fields. Any time you interact with a macro
  you are doing it through a dialog. A dialog may contain input
  fields, output fields, lists, and buttons in any combination.

  In SPF/SE we specify dialogs with a Dialog Definition Language
  which describes the elements and their respective positions in the
  dialog space. A detailed specification of this language is offered
  in a later section.

  SPF/SE does not require that dialog elements be positioned in
  "pixels" (units of display space) but rather lets you specify them
  in the more familiar row and column co-ordinate system. This
  process is similar to defining a 3270 panel, something with which
  you may already be familiar.

  The general idea behind dialogs is that all input and output
  fields of the dialog are associated with a variable in SPF/SE.
  Before displaying the dialog you initialize the variables to
  appropriate values. When the dialog ends, you examine the variable
  content and take appropriate action.

  The dialog definition can be developed in any directory. When
  development is complete dialogs are placed in

  "\spf-install-directory\dialogs" for release.  In our example we
  will develop our dialog in directory "\home\username\dev\dialogs".
  Go ahead and make this directory now.

  To make a dialog accessible to SPF/SE we need to set the DIALOGS
  PATH to point to our development directory and also continue
  pointing to the release directory. Invoke primary option OPTIONS,
  sub-option PATHS. Set field "Dialogs" to:

      "\home\username\dev\dialogs;\spf-install-directory\dialogs"

  This tells SPF/SE to look for dialogs first in
  "\home\username\dev\dialogs", if not found there then it looks in
  "\spf-install-directory\dialogs".

  When testing dialogs we need to turn off the Dialog Cache.
  Normally a dialog is loaded and interpreted only once while SPF/SE
  is active.  The resulting internal form is cached for quick access
  in subsequent uses. As we will be changing the dialog during
  development we need to turn off the cache. Otherwise we would have
  to exit SPF/SE and re-invoke it to get the test dialog loaded.

  In Menu Style "Legacy", invoke primary option DIALOG TEST.

  In Menu Style "Modern", invoke primary option UTILITIES, sub-option
  DIALOG TEST.

   Set field DIALOG CACHE to NO.

  Dialog definition files are named "dialog-name.dlg".

  "SPFservice" calls to get and set variables and present the
  dialog.  The Dialog Manager automatically prepends the dialog name
  to any variables that it accesses whether getting or setting. Thus
  the full variable name becomes "dialog-name.varname". This insures
  that you will not have collisions in SPF/SE variable name space.

  At this point you might want to take a look at macros "user1.c",
  "user1commit.c", and dialog "user1.dlg".

  Macros are in "\spf-install-directory\macros".

  Dialogs are in "\spf-install-directory\dialogs".

  As you can see from the sample macros, dialogs require coding two
  macros.  One to initialize and launch the dialog (user1.c), and
  one to handle the dialog commit (user1commit.c).

  The names of the dialog launch and commit macros do not need to
  match the dialog name. We had them match for clarity in the
  example.

  -----------------------------------------------------------------
  CHAPTER: Dialog Definition Language
  -----------------------------------------------------------------

  -----------------------------------------------------------------
  TOPIC: Introduction
  -----------------------------------------------------------------

  SPF/SE Dialogs are analogous in some ways to 3270 panels.

  SPF/SE dialogs are created by specifying dialog objects and their
  properties in an abstract form. SPF/SE dialogs reduce user
  interactions to a simple setting and testing of dialog variables
  by macros which display the dialog and handle the dialog commit
  respectively. The SPF/SE dialog processing model is
  straightforward:

  1. The dialog launching macro sets the initial state of the dialog
     variables and presents the dialog.

  2. The user interacts with dialog transparent to presenter.

  3. On commit ([3270-Enter] key pressed or OK clicked), the commit
     macro retrieves the dialog variables and takes action based
     their content.

  Summary:

  *  SPF/SE dialogs are modal. That is, once a dialog is displayed
     is must be completed before other SPF functions can be
     performed.

  *  Dialogs are defined in clear text using ASCII characters.

  *  Dialogs contain objects which correspond one-to-one with input
     fields, output fields, lists, and buttons.

  *  Dialogs are positioned by row and column relative to the parent
     SPF window.

  *  Dialog objects are declared by type, with position, size and
     other properties.

  *  SPF/SE dialogs end when any of the following occur:

     -  Key [3270-Enter] is pressed, the dialog commits.  The dialog
        commit macro is called.

     -  The "OK" button is clicked, the dialog commits.  The dialog
        commit macro is called.  This is identical to pressing the
        [3270-Enter] key.

     -  Any button except "OK" is clicked.  The primary command
        associated with the button is executed.

     -  Key [F3] is pressed, the dialog is canceled.  The dialog
        commit macro is not called.  Processing resumes at the
        previous dialog (usually the Edit task).

  *  When the dialog commits, the commit macro must determine what
     action if any is to be taken based on the settings of variables
     specified for that dialog.

  -----------------------------------------------------------------
  TOPIC: Language Rules
  -----------------------------------------------------------------

  *  Dialogs are defined with Dialog Definition Statements which are
     stored in clear text files.  The default dialog definition file
     directory is "\spf-install-directory\dialogs".

  *  Only one dialog definition may be specified in a single file.

  *  Dialog files are named "dialog-name.dlg". For example, for
     dialog-name "find", the file name would be "find.dlg".

  *  The DIALOG statement begins a new dialog definition.

  *  The properties of a dialog are enclosed in braces "DIALOG { ...
     }".  A dialog is comprised of "Objects" each representing a
     single dialog element.

  *  The OBJ statement begins a new object definition.

  *  The properties of an object are enclosed in braces "OBJ { ...
     }".

  *  Dialog and Object properties are specified in "KEYWORD=VALUE"
     pairs separated by one or more blanks.

  *  A dialog definition statement may span multiple lines.

  *  Keywords and their respective values must be on the same line.

  *  Keywords may be entered in upper, lower, or mixed case.

  *  Space characters and line ends are ignored so you can indent or
     otherwise horizontally position definitional elements for
     readability.

  *  Variable names and dialog-names must use characters from the
     following set: A..Z, a..z, 0..9, and _(underscore).

  *  System variable names begin with 'Z'. DO NOT name your
     variables with a first character of 'Z' as they could collide
     with system variables causing unpredictable side effects.

  *  Variable names and dialog-names are not case sensitive, that is
     the variable name "abc" is equivalent to "Abc" or "ABC".

  *  Keyword  names are not case sensitive, that is keyword "title"
     is the same as "Title" or "TITLE".

  *  You can use mixed case for improved readability but internally
     all variable names and dialog-names are held in uppercase.

  *  Dialog names are limited to 15 characters.

  *  Variable names are limited to 31 characters.

  *  Any record that starts with double-forward-slash "//" is a
     comment and is ignored. Comments may also be placed on the same
     line to the right of other specifications. In this case, the
     remainder of the line is ignored.

  *  The maximum line length for any single dialog definition record
     is 255 characters.

  -----------------------------------------------------------------
  TOPIC: Variables
  -----------------------------------------------------------------

  Dialog variables are used in a variety of ways:

  *  Before the dialog is displayed, the dialog or edit macro must
     set all dialog variables to appropriate values. The dialog
     variable values are automatically set into the associated
     dialog elements when the dialog is displayed.

  *  When the user interacts with dialog elements, the associated
     dialog variables are automatically set. When the dialog ends,
     the commit macro retrieves and examines the dialog variables to
     determine what if any action is to be taken.

  Variable names are specified at various points in the dialog
  definition.

  Outside the dialog definition (e.g. in dialog macros), variables
  are referenced by specifying the dialog-name, a dot, and the
  variable name.

  This insures that variable names for different dialogs don`t
  collide in the variable name space and allows you to leave your
  dialog variables in place across multiple displays providing a
  memory of the last transaction if desired.

  Dialog variables as described above are specified with keyword
  VAR.  For example, in "user1.dlg" some object specifies:

     VAR=TEXTIN

  In the macro which displays the dialog, the correct setup is:

     spfservice("vput","User1.TextIn","this is some text");

  Some dialog objects have keywords which accept a varname as a
  value (e.g. COLOR, COLWIDTH, POPUP). In this case, the varname is
  independent of the dialog. In this case, the varname is specified
  with a leading ampersand(&) in the dialog definition and is
  refered to directly in dialog macros (i.e. no "dialog-name"
  prefix).

  -----------------------------------------------------------------
  TOPIC: Syntax
  -----------------------------------------------------------------

  ------------------------------------------------------------
  DIALOG { ...properties... }
  ------------------------------------------------------------

  Dialog Properties apply to the entire dialog:

  TITLE = text
  COMMIT_MACRO = macro-name

  Note:  COMMIT_MACRO is only specified when the dialog is launched
  by a dialog macro or edit macro.

  ------------------------------------------------------------
  OBJ { ... properties... }
  ------------------------------------------------------------

  Object properties apply to a specific object:

  ANNOTATE = YES | NO              (optional, INPUT_NUMBER only, default=YES)
  CHOICES  = choice-list | varname (required on INPUT_CHOICE)
  COL      = number                (required ALL, except SEPARATOR and LIST)
  COLOR    = FG,BG | varname       (STATIC only, FG,BG is number pair)
  COMMAND  = primary-command       (required on BUTTON)
  HSCROLL  = YES | NO              (optional, INPUT_TEXT only, default=NO)
  LOWCASE  = YES | NO              (optional, INPUT_TEXT only, default=NO)
  PASSWORD = YES | NO              (optional, INPUT_TEXT only, default=NO)
  POPUP    = verb-list             (optional, LIST only)
  RANGE    = Nmin,Nmax | varname   (required on INPUT_NUMBER)
  ROW      = number                (required ALL)
  SORT     = YES | NO              (optional, LIST only, default=NO)
  TEXT     = "..."                 (required on STATIC and BUTTON)
  TYPE     = object-type           (required ALL)
  UPCASE   = YES | NO              (optional, INPUT_TEXT only, default=NO)
  VAR      = varname               (required ALL, except STATIC, BUTTON, SEPARATOR)
  WIDTH    = number                (required ALL, except LIST, STATIC, SEPARATOR)

  Object types:

  STATIC       - a field with static text
  OUTPUT       - a field with variable text which can not be modified
  INPUT_TEXT   - an input field where text can be entered (H scrollable)
  INPUT_BOOL   - an input field where TRUE or FALSE can be entered (or clicked)
  INPUT_NUMBER - an input field where an integer number can be entered
  INPUT_CHOICE - an input field where a choice from a list of choices can be entered
  BUTTON       - a button which can be pressed (clicked) to cause an action
  LIST         - a list of items (one or more verbs may be applied)
  SEPARATOR    - a full width horizontal line

  Object specifications are normally made in reading order, that is
  the first object in the first row of the dialog is defined first,
  the second object in the first row is defined second, and so on.
  When using the TAB key to position within a dialog, the object
  specification order is followed.

  Where object text comes from:

  STATIC       - from required TEXT parameter
  OUTPUT       - from required VAR  parameter
  INPUT_TEXT   - from required VAR  parameter
  INPUT_BOOL   - from required VAR  parameter
  INPUT_NUMBER - from required VAR  parameter
  INPUT_CHOICE - from required VAR  parameter
  LIST         - from required VAR  parameter (see Notes below)
  BUTTON       - from required TEXT parameter

  NOTES:

  LIST

  The contents of LISTs are derived from their VAR specification.
  The VAR value is a stem with the following members:

        var.0   -  the total number of elements in the control (e.g. 5)
        var.1   -  the first element value
        var.2   -  the second element value
        var.nnn -  the Nth element value
        var.Top -  the index number for the top display line (e.g. 0)

  When the dialog commits, vars are set to reflect any line command
  entered on any entry in the LIST as follows:

        ZLISTLCMD.1 -  line command entered on first list entry
        ZLISTLCMD.2 -  line command entered on second list entry
        ZLISTLCMD.n -  line command entered on Nth list entry

  -----------------------------------------------------------------
  TOPIC: Constraints
  -----------------------------------------------------------------

  When coding dialogs, the following constraints must be observed:

  *  BUTTON width should be specified two characters wider than the
     button text.

  *  There can only be one LIST in a dialog.

  *  LIST must always be the last object in the dialog.

  *  STATICs are given the natural width of their TEXT.


  -----------------------------------------------------------------
  CHAPTER: C Interpreter
  -----------------------------------------------------------------

  This section describes the subset of "C" supported by SPF/SE. In
  some cases we support features that are not available in the
  standard "C" language. These will be noted.

  A formal definition of the "C" language is contained in:

  The C Programming Language
  Brian Kernighan and Dennis Ritchie
  Prentice-Hall
  ISBN 0-13-110163-3

  Items in brackets are optional.

  Items separated by vertical bar are "select one of"

  Formal terms are capitalized.

  -----------------------------------------------------------------
  TOPIC: INCLUDE
  -----------------------------------------------------------------

  [#include "source-file-name"]

  Use this pre-processor statement to include commonly used data
  declarations and/or macro functions which are not part of the
  current macro source. The include statement must be on a line by
  itself. It may be indented with blanks. The file name must be
  enclosed in double quotes or angle brackets "<>".

  Do not specify the path with the file name. The interpreter first
  looks for the included file in the current edit file directory.
  If not found, it then looks in each element of the MACROS path
  (See menu OPTIONS, item PATHS, field MACROS).

  Include merges the specified source file into the current source
  file at the point of the include statement.

  To incorporate a group of frequently used common functions, create
  a source file such as MYLIB.C which has an include statement for
  each function. For example,

  // Include common functions
  #include "function-name1.c"
  #include "function-name2.c"
  #include "function-name3.c"
  ....
  #include "function-nameN.c"

  Now, in the primary macro, place an include statement for MYLIB.C
  at the end. This enables access to the common functions:

  // Include library of common functions
  #include "mylib.c"

  Warning:  Do not place include statements for functions at the
  start of the primary macro. If you do, the first included function
  is executed before the primary macro, in effect replacing it.

  -----------------------------------------------------------------
  TOPIC: PROGRAM
  -----------------------------------------------------------------

  [COMMENT]

  [VAR-DECLARATION]    global scope, repeat as required

  FUNCTION-DECLARATION

  [FUNCTION-DECLARATION]  repeat as required

  STANDARD "C" ALLOWS LOCAL VARIABLE NAMES TO BE IDENTICAL TO GLOBAL
  VARIABLE NAMES, THE INTERPRETER DOES NOT.

  -----------------------------------------------------------------
  TOPIC: COMMENT
  -----------------------------------------------------------------

  //  Double forward-slash is start of a comment which continues
      to the end of the current source line.

  /*  Forward-slash followed by asterisk is the begin-comment sequence.
      The comment ends when the corresponding end-comment sequence
      is encountered. This form of comment may be nested and may span
      multiple lines.

  */  Asterisk followed by forward slash is the end-comment sequence.

  Examples:

    statement;  // comment to end of line
    statement;  /* comment until end-comment sequence */

    /*
    multiline comment
    multiline comment
    multiline comment
    */

  -----------------------------------------------------------------
  TOPIC: VARIABLE DECLARATION
  -----------------------------------------------------------------

  TYPE  [const]  [*]  VAR-NAME[[]]  [= VALUE]  ;

  Where:

    TYPE   is variable type.
    const  is declaring a constant
    *      is "pointer to"
    []     is array
    =      is auto initializer
    ;      is end of statement

  STANDARD "C" ALLOWS LOCAL VARIABLE NAMES TO BE IDENTICAL TO GLOBAL
  VARIABLE NAMES, THE INTERPRETER DOES NOT.

  -----------------------------------------------------------------
  TOPIC: VARIABLE TYPE
  -----------------------------------------------------------------

  The "C" interpreter recognizes the following types ONLY:

  BYTE *   a pointer to a string containing byte values in the range
           x01..xFF. Value x00 indicates end-of-string and may not be
           part of any string.

  char *   same as BYTE *

  int      an integer number (width = 32 bits)

  BOOL     a type having exclusively values from set: TRUE..FALSE

  void     null type, only used to declare:

           1) null function return or
           2) null function parameter list

  Type BYTE and "char" must always be declared as "pointer to".
  STANDARD "C" SUPPORTS INDIVIDUAL BYTE AND "char" VALUES, THE
  INTERPRETER DOES NOT, ALL NON_INTEGER and NON-BOOLEAN VALUES ARE
  STRINGS.

  In assignments type BOOL is automatically constrained to the
  values TRUE or FALSE.  THIS FEATURE IS NOT SUPPORTED IN THE
  STANDARD "C" LANGUAGE.

  -----------------------------------------------------------------
  TOPIC: CONSTANTS
  -----------------------------------------------------------------

  Reserved word "const" indicates that a variable is non-modifiable.
  For example:

  int const MAX_LENGTH = 1024;

  -----------------------------------------------------------------
  TOPIC: POINTER
  -----------------------------------------------------------------

  Asterisk (*) preceding the variable name indicates the variable is
  a "pointer to" something. For example:

  char *pb; // pointer to a string of characters.

  The interpreter only supports "pointer to int" and "pointer to
  BOOL" in function parameter lists when the parameter is passed by
  reference.

  -----------------------------------------------------------------
  TOPIC: ARRAYS
  -----------------------------------------------------------------

  Brackets ([]) following a variable name indicate an array.  The
  interpreter only supports single dimensional arrays.  Interpreter
  arrays are dynamic; DO NOT declare their size.  Array element
  space is automatically allocated when elements are referenced.
  THIS FEATURE IS NOT SUPPORTED IN THE STANDARD "C" LANGUAGE.  For
  example:

  Standard "C":  char *records[50]; // declare a static array of pointers
  Interpreter:   char *records[];   // declare a dynamic array of pointers

  -----------------------------------------------------------------
  TOPIC: INITIALIZERS
  -----------------------------------------------------------------

  "= VALUE" following a variable declaration initializes the
  variable to the value specified. For example:

  BOOL done = FALSE;

  -----------------------------------------------------------------
  TOPIC: VARIABLE VALUES
  -----------------------------------------------------------------

  Variable values may be one of:

  For variables of type "int":     any integer number

  For variables of type "BOOL":    either TRUE or FALSE

  For variables of type "char *":  any value enclosed in single
                                   or double quotes

  -----------------------------------------------------------------
  TOPIC: ESCAPE SEQUENCES
  -----------------------------------------------------------------

  The raw value of some characters may be difficult to enter into
  string values (e.g. backspace), while others may cause undesired
  side effects (e.g. linefeed). The following ANSI escape sequences
  are supported to allow these characters to be specified within a
  quoted string:

    \a   - alert (bell) character
    \b   - backspace
    \f   - formfeed
    \n   - newline
    \r   - carriage return
    \t   - horizontal tab
    \v   - vertical tab
    \x.. - hex character code (two hex digits)
    \\   - backslash
    \?   - question mark
    \'   - single quote
    \"   - double quote


  -----------------------------------------------------------------
  TOPIC: END OF STATEMENT CHARACTER
  -----------------------------------------------------------------

  ;  Semi-colon is the "End of Statement" character and is required
     at the end of each statement.

  -----------------------------------------------------------------
  TOPIC: FUNCTION DECLARATION
  -----------------------------------------------------------------

  "MAIN" FUNCTION

  The first function in any SPF/SE macro is the "main" function
  regardless of its name. The main function receives parameters in
  the following way (and no other way):

   //-------------------------------------------------------------
   // This macro demonstrates the standard method of declaring and
   // accessing parameters in the "main" function of a macro.
   //
   // Parm 1, ARGC, the count of parameters passed.
   //
   // Parm 2, ARGV, an array of character strings
   //               argv[0] = macro`s fully qualified path name
   //               argv[1] = parameter 1
   //               argv[2] = parameter 2
   //               ...
   //               argv[argc-1] = last parameter
   //
   //-------------------------------------------------------------
   void ShowParms(int argc, char *argv[]) {

     char *msg;
     int   i;

     i = 0;
     while (i < argc) {
       msg = StrCompose("argv[",i,"] = ",argv[i]);
       Msg(msg);
       ++i;
     } // while

   } // ShowParms

  OTHER FUNCTIONS

  Any function declared within the macro other than the "main"
  function uses the following protocol:

  RETURN-TYPE  FUNCTION-NAME  (  PARAMETER-LIST  ) FUNCTION-BODY

  RETURN-TYPE is the TYPE for the value returned by the function. If
  the function has no return value, specify "void".

  FUNCTION-NAME is The name of a function which must conform to the
  following rules:

  1) It may not be a reserved word.
  2) It may not contain reserved punctuation.
  3) Its first character may not be numeric.

  For function names you can use any combination of "a-z", "A-Z",
  "0-9", and any non-reserved punctuation characters.

  PARAMETER-LIST is a list of one or more variables declared in the
  form:


    TYPE  VAR-NAME
    [, TYPE VAR-NAME]   repeat as required

  If the function does not take parameters, specify "void".

  Example:

    void DoesntDoMuch(void)

      Declares function "DoesntDoMuch" which returns nothing and takes
      no parameters.

    char *IntToStr(int number)

      Declares function "IntToStr" which returns a pointer to char and
      takes a single parameter of type integer. Local var "number" is
      automatically instantiated to receive the incoming parameter.

    int SpellCheck(char *word)

      Declares function "SpellCheck" which returns an "int" (return code)
      and takes a single parameter of type pointer to char. Local var "word"
      is automatically instantiated to receive the incoming parameter.

  Please see function declarations in example macros provided with
  SPF/SE.  Look in directory:

      \spf-install-directory\macros

  -----------------------------------------------------------------
  TOPIC: FUNCTION BODY
  -----------------------------------------------------------------

  The FUNCTION-BODY is enclosed in braces and is comprised of:

    {

    [VAR-DECLARATION]    local scope, repeat as required

    STATEMENT;

    [STATEMENT;]  repeat as required

    }

  Example:

    //--------
    // tictock
    //--------
    void tictock(void) {

      ...
      ... statements
      ...

    } // tictock

  -----------------------------------------------------------------
  TOPIC: IF
  -----------------------------------------------------------------

  if (CONDITIONAL-EXPRESSION)
    single-statement

  if (CONDITIONAL-EXPRESSION) {
    multiple-statements
    ...
    multiple-statements
  }

  if (CONDITIONAL-EXPRESSION)
    single-statement
  else
    single-statement

  if (CONDITIONAL-EXPRESSION) {
    multiple-statements
    ...
    multiple-statements
    }
  else {
    multiple-statements
    ...
    multiple-statements
  }

  -----------------------------------------------------------------
  TOPIC: WHILE
  -----------------------------------------------------------------

  while (CONDITIONAL-EXPRESSION)
    single-statement

  while (CONDITIONAL-EXPRESSION) {
    multiple-statements
    ...
    multiple-statements
  } // while

  -----------------------------------------------------------------
  TOPIC: SWITCH
  -----------------------------------------------------------------

  switch (VARIABLE | EXPRESSION) {

    case value[,value]:
      statement
      [statement]  repeat as required
      break;

   [case value[,value]:
      ...
      break;]      repeat as required

    default:
      statement
      [statement]  repeat as required
      break;

  } // switch

  Multiple case values separated by comma are allowed.  THIS FEATURE
  IS NOT SUPPORTED IN THE STANDARD "C" LANGUAGE.  The Standard "C"
  feature of fall-through "case" statements is not allowed.

  -----------------------------------------------------------------
  TOPIC: CONDITIONAL EXPRESSION
  -----------------------------------------------------------------

  a == b   TRUE if "a" equal to "b"
  a != b   TRUE if "a" not equal to "b"
  a >  b   TRUE if "a" greater than "b"
  a <  b   TRUE if "a" less than "b"
  a >= b   TRUE if "a" greater than or equal to "b"
  a <= b   TRUE if "a" less than or equal to "b"

  -----------------------------------------------------------------
  TOPIC: COMPOUND CONDITIONAL EXPRESSION
  -----------------------------------------------------------------

  exp1 && exp2   TRUE if "exp1" AND "exp2" are both TRUE
  exp1 || exp2   TRUE if either "exp1" OR "exp2" is TRUE

  -----------------------------------------------------------------
  TOPIC: ARITHMETIC EXPRESSION
  -----------------------------------------------------------------

  a * b   the integer result of "a" multiplied by "b"
  a / b   the integer result of "a" divided by "b"
  a % b   the integer remainder of "a" divided by "b"
  a + b   the integer result of "a" added to "b"
  a - b   the integer result of "a" minus "b"

  -----------------------------------------------------------------
  TOPIC: COMPOUND ARITHMETIC EXPRESSION
  -----------------------------------------------------------------

  The interpreter processes compound arithmetic operations left to
  right regardless of the operator. All operations have equal
  precedence.  STANDARD "C" GIVES MULTIPLY AND DIVIDE PRECEDENCE,
  THE INTERPRETER DOES NOT.

  Example:

  Standard "C":  6 + 10 / 2 becomes 6 + (10 / 2) becomes  6 + 5 = 11
  Interpreter:   6 + 10 / 2 becomes (6 + 10) / 2 becomes 16 / 2 = 8

  To avoid this problem put the operations in the desired left to
  right order. Thus

  Interpreter:  10 / 2 + 6 = 11

  -----------------------------------------------------------------
  TOPIC: DATA TYPE COERCION
  -----------------------------------------------------------------

  The interpreter automatically coerces data types to allow cross
  type comparison. Thus the string "5" would compare equal to the
  integer 5.  THIS FEATURE IS NOT SUPPORTED IN THE STANDARD "C"
  LANGUAGE.

  -----------------------------------------------------------------
  TOPIC: DIRECT STRING COMPARE
  -----------------------------------------------------------------

  The interpreter allows direct comparison of strings.  THIS FEATURE
  IS NOT SUPPORTED IN THE STANDARD "C" LANGUAGE.

  Standard "C":  if (strcmp(name1,name2) == 0) ...
  Interpreter:   if (name1 == name2) ...

  -----------------------------------------------------------------
  TOPIC: ASSIGN STATEMENT
  -----------------------------------------------------------------

  VARNAME = EXPRESSION | CONSTANT | FUNCTION-CALL;

  The interpreter automatically allocates memory for strings and
  deep copies to the left hand side operator.  THIS FEATURE IS NOT
  SUPPORTED IN THE STANDARD "C" LANGUAGE.

   Standard "C":  char *receiver, *source;
                  // assuming "source" already loaded
                  receiver = malloc( ( strlen(source) + 1 ) );
                  strcpy(receiver,source);

  Interpreter:    receiver = source;

  -----------------------------------------------------------------
  TOPIC: RETURN STATEMENT
  -----------------------------------------------------------------

  return(VARIABLE | EXPRESSION | FUNCTION-CALL);

  -----------------------------------------------------------------
  TOPIC: FUNCTION CALL
  -----------------------------------------------------------------

  Most of the heavy lifting in your programs will be done with
  function calls. Function calls have the form:

  FUNCTION-NAME(PARAMETERS);

  Where:

    FUNCTION-NAME  is the name of the function being called

    PARAMETERS     are 0 to N parameters separated by comma. The number
                   of parameters depends on the function being called.

  Function parameters are passed by value. The called function gets
  a copy of the parameter and thus can not alter its original value
  in the calling function.

  Arrays may not be passed as parameters to user written functions.
  To have user written functions share an array, declare it globally
  as described below:

  Example:

    int shared_array_count = 0;
    int shared_array[];

    void test1(void) {

      shared_array[0] = 5;
      shared_array[1] = 10;
      shared_array[2] = 15;
      shared_array_count = 3;
      test2();

    }

    void test2(void) {

      int  i;

      i = 0;
      while (i < shared_array_count) {
        Msg(StrCompose("array[",i,"] = ",shared_array[i]));
        ++i;
      } // while

    }

  The same technique is used if you want to have multiple functions
  sharing access to other variable types:

  Example:

    char *shared_text = "initial text";

    void test1(void) {

      char *msg;
      char *text;
      BOOL  state;

      text  = "still same";
      state = FALSE;

      test2(text,state); // call function "pass by value"
      msg = StrCompose("Expect 'still same' got '",text,
                       "',  expect 'FALSE' got '",state,
                       "',  expect 'modified' got '",shared_text,"'");
      Msg(msg);

    }

    void test2(char *intext, BOOL instate) {

      // "pass by value" vars NOT modified in caller's domain
      intext      = "changed";  // modify private local var
      instate     = TRUE;       // modify private local var
      shared_text = "modified"; // modify shared global var

    }

  Note:  Many Library functions in the "str*" set do modify your
  local parameters and are documented that way.

  -----------------------------------------------------------------
  TOPIC: Non-supported Features of Standard C
  -----------------------------------------------------------------

  1)  Preprocessor directives (except #include)
  2)  Data Structures
  3)  Pointer Arithmetic
  4)  Multi-dimensional arrays
  5)  Arithmetic precedence
  6)  Bitwise operators "&", "|", and " "
  7)  Shift operators "<<" and ">>"
  8)  Unary ones complement operator " "
  9)  Unary logical negation operator "!" in non-conditional expression
      (e.g. assignment)
  10) Function parameter pass by reference
  11) Individual character variables (e.g. 'c', use "c" instead)
  12) Standard "C" allows local variable names to be identical to global
      variable names, the interpreter does not.
  13) Fall-through "case" statements

         Not allowed:

           case "A":  // test for "A"
           case "B":  // or "B"
           case "C":  // or "B"
             ...
             break;

         Use instead:

           case "A","B","C": // test for "A" or "B" or "C"
             ...
             break;

  14) Iterative controls:
        for (expression) { ... }       (will be in next revision)
        do { ... } while (expression)  (will be in next revision)

        ("while" which is supported can be used in the mean time
         to duplicate any "for" or "do while" expression)

  -----------------------------------------------------------------
  TOPIC: Epilogue
  -----------------------------------------------------------------

  If it is not in this specification, it is not currently in the
  interpreter. The interpreter is a tool for writing macros of
  moderate complexity. It is not intended for large complex
  applications development as you would expect from a full compiler.
  It will always be a subset.

  In this context we will continue to improve it. If it does not
  support a feature you need and you can`t program around it, please
  make a request for it.


  -----------------------------------------------------------------
  CHAPTER: C Library Functions
  -----------------------------------------------------------------

  -----------------------------------------------------------------
  TOPIC: DATE
  -----------------------------------------------------------------

  char *date(void);

  Function:

    Get the current local date and time in raw numerical form.

  Parameters:

    None.

  Returns:

    Character string in form: YYYY MM DD HH MM SS

    (See sample macro "dateandtime.c" for example of use.)

  -----------------------------------------------------------------
  TOPIC: FILECLOSE
  -----------------------------------------------------------------

  void fileclose(int hfile);

  Function:

    Close a file which was opened with FileOpen

  Parameters:

    hfile  -  file handle returned by FileOpen

  Returns:

    Nothing

  -----------------------------------------------------------------
  TOPIC: FILECOPY
  -----------------------------------------------------------------

  char *filecopy(char *oldfilespec, char *newfilespec);

  Function:

    Copy a file to a new destination and/or new name.

  Parameters:

    oldfilespec  -  file specification for file or directory to copy.
                    If a directory is specified without a file type,
                    all files in the directory are copied. If a directory
                    is specified with a specific file type, only files
                    of that type are copied (e.g. *.CBL).
                    If a file is specified but no path is specified,
                    the interpreter looks in the current Edit/Browse
                    directory then in the MACRO DATA PATH. See OPTIONS
                    menu, PATHS item.

    newfilespec  -  file specification for destination file or directory.
                    If a directory is specified, do not specify file type.
                    If a file is specified but no path is specified,
                    the interpreter looks in the current Edit/Browse
                    directory then in the MACRO DATA PATH. See OPTIONS
                    menu, PATHS item.

  Returns:

    "OK" or "ERROR"

  -----------------------------------------------------------------
  TOPIC: FILEDELETE
  -----------------------------------------------------------------

  char *filedelete(char *filespec);

  Function:

    Delete a file.

  Parameters:

    filespec  -  file specification for file to delete.
                 If no path is specified, the interpreter looks in
                 the current Edit/Browse directory then in the
                 MACRO DATA PATH. See OPTIONS menu, PATHS item.

  Returns:

    "OK" or "ERROR"

  -----------------------------------------------------------------
  TOPIC: FILEEXIST
  -----------------------------------------------------------------

  char *fileexist(char *filespec);

  Function:

    Check to see if a file exists.

  Parameters:

    filespec  -  file specification for file to be checked.
                 If no path is specified, the interpreter looks in
                 the current Edit/Browse directory then in the
                 MACRO DATA PATH. See OPTIONS menu, PATHS item.

  Returns:

    "TRUE" or "FALSE"

  -----------------------------------------------------------------
  TOPIC: FILEISDIR
  -----------------------------------------------------------------

  char *fileisdir(char *filespec);

  Function:

    Check to see if a file specification is a directory.

  Parameters:

    filespec  -  fully qualified file specification to be checked.

  Returns:

    "TRUE" or "FALSE"

  -----------------------------------------------------------------
  TOPIC: FILEOPEN
  -----------------------------------------------------------------

  int fileopen(char *filespec, char *mode);

  Function:

    Open a file for reading or writing. Files must be of standard PC
    text file format: variable length records with CR/LF terminators.
    Record length may not exceed 1000 characters.

  Parameters:

    filespec  -  file specification for file to read or write.
                 If no path is specified, the interpreter looks in
                 the current Edit/Browse directory then in the
                 MACRO DATA PATH. See OPTIONS menu, PATHS item.

    mode      -  specify "r" to open for read, "w" to open for write,
                 or "a" to open for append.
                 Opening for write resets the file`s length to 0.

  Returns:

    Integer number, the file handle or 0 if file did not open
    successfully.

  -----------------------------------------------------------------
  TOPIC: FILEPRINT
  -----------------------------------------------------------------

  void fileprint(char *filespec);

  Function:

    Print a file.

  Parameters:

    filespec  -  file specification for file to print.
                 If no path is specified, the interpreter looks in
                 the current Edit/Browse directory then in the
                 MACRO DATA PATH. See OPTIONS menu, PATHS item.

  Returns:

    Nothing

  -----------------------------------------------------------------
  TOPIC: FILERECREAD
  -----------------------------------------------------------------

  char *filerecread(int hfile, char *receivebuf);

  Function:

    Read a record from a file. CR/LF or LF-only terminator characters
    are automatically stripped from the incoming record. This function
    is not intended for reading database records. The maximum record
    length allowed is 1000 characters.

  Parameters:

    hfile       -  the file handle returned by FileOpen

    receivebuf  -  a buffer to receive the incoming record

  Returns:

    "OK", "EOF", or "ERROR"

  -----------------------------------------------------------------
  TOPIC: FILERECWRITE
  -----------------------------------------------------------------

  char *filerecwrite(int hfile, char *record);

  Function:

    Write a record to a file. CR/LF or LF-only terminator characters
    are automatically appended to the outgoing record.

  Parameters:

    hfile   -  the file handle returned by FileOpen

    record  -  the record to be written

  Returns:

    "OK" or "ERROR"

  -----------------------------------------------------------------
  TOPIC: GETENV
  -----------------------------------------------------------------

  char *getenv(char *name);

  Function:

    Get system environment variable value.

  Parameters:

    name  -  the name of the system environment variable.

  Returns:

    The string value of the system environment variable or null string.

  -----------------------------------------------------------------
  TOPIC: MSG
  -----------------------------------------------------------------

  void msg(char *msgtext);

  Function:

    Present a message in a popup message box with an OK acknowledgement
    button.

  Parameters:

    msgtext  -  the text of the message

  Returns:

    Nothing

  -----------------------------------------------------------------
  TOPIC: NEGATE
  -----------------------------------------------------------------

  BOOL negate(BOOL state);

  Function:

    Return the negation of the passed boolean state.
    If the passed state is "TRUE", the returned value is "FALSE".
    If the passed state is "FALSE", the returned value is "TRUE".

  Parameters:

    state  -  boolean state

  Returns:

    "TRUE" or "FALSE"

  -----------------------------------------------------------------
  TOPIC: PUTENV
  -----------------------------------------------------------------

  char *putenv(char *name, char *value);

  Function:

    Set the value of a system environment variable.

    This function sets the environment variable in the SPF/SE
    process environment only. It cannot modify the command level
    environment. When SPF/SE terminates, the environment reverts to
    the level of the parent process (normally the operating system).
    Processes spawned by SPF/SE via primary commands SYSTEM or
    USERCMD may inherit the environment values of SPF/SE depending
    on how they are launched.

  Parameters:

    name   -  the name of the system environment variable.

    value  -  the value to set.

  Returns:

    "OK" or "ERROR"

  -----------------------------------------------------------------
  TOPIC: STRCAT
  -----------------------------------------------------------------

  void strcat(char *string1, char *string2);

  Function:

    Concatenate two strings.

  Parameters:

    string1  -  the string to which the concatenation is to be attached

    string2  -  the string to be concatenated

  Returns:

    Nothing

  -----------------------------------------------------------------
  TOPIC: STRCENTER
  -----------------------------------------------------------------

  void strcenter(char *targetstr, char *padchar, int targetlen);

  Function:

    Center a string in place within a specific length.

  Parameters:

    targetstr  -  the string to be centered

    padchar    -  the pad character to be used for centering (used on
                  left AND right)

    targetlen  -  the target length within which the string is to be
                  centered

  Returns:

    Nothing

  -----------------------------------------------------------------
  TOPIC: STRCMP
  -----------------------------------------------------------------

  int strcmp(char *string1, char *string2);

  Function:

    Compare two strings.

  Parameters:

    string1  -  base string for comparison

    string2  -  the string to be compared with the base string

  Returns:

    Integer number, one of:

       0  -  string1 = string2
      >0  -  string1 > string2
      <0  -  string1 < string2

  -----------------------------------------------------------------
  TOPIC: STRCOMPOSE
  -----------------------------------------------------------------

  char *strcompose(char *sourcestr1, char *sourcestr2, ...);

  Function:

    Compose a string from two or more strings.

  Parameters:

    sourcestr1  -  required, string one of N to be catenated

    sourcestr2  -  required, string two of N to be catenated

    ...         -  optional, additional strings to be concatenated

  Returns:

    A composite string

  -----------------------------------------------------------------
  TOPIC: STRCPY
  -----------------------------------------------------------------

  void strcpy(char *string1, char *string2);

  Function:

    Copy one string to another.

  Parameters:

    string1  -  the string to receive the copy

    string2  -  the string to copy

  Returns:

    Nothing

  -----------------------------------------------------------------
  TOPIC: STRDELSUBSTR
  -----------------------------------------------------------------

  void strdelsubstr(char *targetstr, int startcol, int length);

  Function:

    Delete a substring in place within a string.

  Parameters:

    targetstr  -  the base string within which the substring is to be
                  deleted

    startcol   -  the start column for the substring to be deleted

    length     -  the length of the substring to be deleted

  Returns:

    Nothing

  -----------------------------------------------------------------
  TOPIC: STRFINDLAST
  -----------------------------------------------------------------

  int strfindlast(char *sourcestr, char *findstr);

  Function:

    Search a string for the last occurrence of a substring.

  Parameters:

    sourcestr  -  the string to be searched

    findstr    -  the string to be searched for

  Returns:

    Integer number, the column where the last occurrence of
    "findstr" was found or 0 if not found

  -----------------------------------------------------------------
  TOPIC: STRFINDSUBSTR
  -----------------------------------------------------------------

  int strfindsubstr(char *sourcestr, char *findstr, int startcol);

  Function:

    Search a string for a substring.

  Parameters:

    sourcestr  -  the string to be searched

    findstr    -  the string to be searched for

    startcol   -  the start column for the search

  Returns:

    Integer number, the column where "findstr" was found
    or 0 if not found

  -----------------------------------------------------------------
  TOPIC: STRGENSTR
  -----------------------------------------------------------------

  char *strgenstr(char *patternstr, int length);

  Function:

    Generate a string of a specific length by repeating a pattern.

  Parameters:

    patternstr  -  the pattern string to be repeated

    length      -  the desired final length for the generated string

  Returns:

    The generated string

  -----------------------------------------------------------------
  TOPIC: STRGETSUBSTR
  -----------------------------------------------------------------

  char *strgetsubstr(char *sourcestr, int startcol, int length);

  Function:

    Retrieve a substring from a string.

  Parameters:

    sourcestr  -  the string from which the substring is to be
                  retrieved

    startcol   -  the start column for the substring

    length     -  the length for the substring

  Returns:

    The substring

  -----------------------------------------------------------------
  TOPIC: STRINSSUBSTR
  -----------------------------------------------------------------

  void strinssubstr(char *targetstr, char *insertstr, int insertcol);

  Function:

    Insert a substring in place within a string moving characters to
    the right at the insert point.

  Parameters:

    targetstr  -  the string which is to receive the inserted substring

    insertstr  -  the substring to be inserted

    insertcol  -  the column insertion point within "targetstr"

  Returns:

    Nothing

  -----------------------------------------------------------------
  TOPIC: STRISALNUM
  -----------------------------------------------------------------

  BOOL strisalnum(char *checkstr);

  Function:

    Check a string for all characters in set a..z, A..Z, and 0..9

  Parameters:

    checkstr  -  the string to be checked

  Returns:

    "TRUE" or "FALSE"

  -----------------------------------------------------------------
  TOPIC: STRISALPHA
  -----------------------------------------------------------------

  BOOL strisalpha(char *checkstr);

  Function:

    Check a string for all characters in set a..z, A..Z

  Parameters:

    checkstr  -  the string to be checked

  Returns:

    "TRUE" or "FALSE"

  -----------------------------------------------------------------
  TOPIC: STRISDIGIT
  -----------------------------------------------------------------

  BOOL strisdigit(char *checkstr);

  Function:

    Check a string for all characters in set 0..9

  Parameters:

    checkstr  -  the string to be checked

  Returns:

    "TRUE" or "FALSE"

  -----------------------------------------------------------------
  TOPIC: STRISINSET
  -----------------------------------------------------------------

  BOOL strisinset(char *checkstr, char *setstr);

  Function:

    Check to see if string "checkstr" is in set "setstr". Example,

        char *checkstr = "two";
        char *setstr   = "onetwothree";

        if (strisinset(checkstr,setstr)) {
          // tests TRUE because string "two" is in string "onetwothree"
        }

  Parameters:

    checkstr  -  the string to be checked

    setstr    -  the set to be checked

  Returns:

    "TRUE" or "FALSE"

  -----------------------------------------------------------------
  TOPIC: STRISLOWER
  -----------------------------------------------------------------

  BOOL strislower(char *checkstr);

  Function:

    Check a string for all characters in set a..z

  Parameters:

    checkstr  -  the string to be checked

  Returns:

    "TRUE" or "FALSE"

  -----------------------------------------------------------------
  TOPIC: STRISUPPER
  -----------------------------------------------------------------

  BOOL strisupper(char *checkstr);

  Function:

    Check a string for all characters in set A..Z

  Parameters:

    checkstr  -  the string to be checked

  Returns:

    "TRUE" or "FALSE"

  -----------------------------------------------------------------
  TOPIC: STRLEN
  -----------------------------------------------------------------

  int strlen(char *checkstr);

  Function:

    Get the length of a string.

  Parameters:

    checkstr  -  the string whose length is to be determined

  Returns:

    Integer number, the length of the string

  -----------------------------------------------------------------
  TOPIC: STRLWR
  -----------------------------------------------------------------

  void strlwr(char *targetstr);

  Function:

    Convert in place all A..Z characters in a string to a..z

  Parameters:

    targetstr  -  the string to be converted

  Returns:

    Nothing

  -----------------------------------------------------------------
  TOPIC: STRNCMP
  -----------------------------------------------------------------

  int strncmp(char *string1, char *string2, int count);

  Function:

    Compare two strings limited by a count.

  Parameters:

    string1  -  base string for comparison

    string2  -  the string to be compared with the base string

    count    -  the maximum number of characters to compare

  Returns:

    Integer number, one of:

       0  -  string1 = string2
      >0  -  string1 > string2
      <0  -  string1 < string2

  -----------------------------------------------------------------
  TOPIC: STRNCPY
  -----------------------------------------------------------------

  void strncpy(char *string1, char *string2, int count);

  Function:

    Copy one string to another limited by count.

  Parameters:

    string1  -  the string to receive the copy

    string2  -  the string to copy

    count    -  the maximum number of characters to copy

  Returns:

    Nothing

  -----------------------------------------------------------------
  TOPIC: STROVLSUBSTR
  -----------------------------------------------------------------

  void strovlsubstr(char *targetstr, char *overlaystr, int overlaycol);

  Function:

    Overlay a string in place with a substring.

  Parameters:

    targetstr   -  the string to be overlayed

    overlaystr  -  the string to overlay "targetstr"

    overlaycol  -  the column where the overlay should begin

  Returns:

    Nothing

  -----------------------------------------------------------------
  TOPIC: STRPARSE
  -----------------------------------------------------------------

  int strparse(char *array, char *sourcestr, char *parsestr);

  Function:

    Parse a string into individual elements and load those elements
    into the array passed in parameter one.

    Single and double quote characters are given special treatment. If
    you want to ignore single or double quotes in strings, use "strparsex".

  Parameters:

    array      -  address of an array variable to receive the parsed
                  elements

    sourcestr  -  the string to be parsed

    parsestr   -  a string of individual characters which are used to
                  determine the boundaries between parsed elements.

                  Single and double quote characters are automatically
                  treated as an enclosing parse character rather than a
                  separator. Thus quoted strings are parsed as a single
                  element. If a quoted string ends before the close
                  quote is found, the element is considered complete.

  Returns:

    Integer number, the number of elements loaded into "array".

  Example1:

    char *elements[];
    char *line = "This is a line; this is another.";
    int   count;

    count = StrParse(elements,line,";. ");

    Result:

      count = 7

      elements[0] = This
      elements[1] = is
      elements[2] = a
      elements[3] = line
      elements[4] = this
      elements[5] = is
      elements[6] = another

  Example2:

    char *days = "Monday,Tuesday,Wednesday,Thursday";

    count = StrParse(amp.elements,days,",");

    Result:

      count = 4

      elements[0] = Monday
      elements[1] = Tuesday
      elements[2] = Wednesday
      elements[3] = Thursday

  Example3:

    char *DBrecord;

    Given record: "Last Name","First Name","Middle","","SSN"

    count = StrParse(amp.elements,DBrecord,",");

    Result:

      count = 5

      elements[0] = Last Name
      elements[1] = First Name
      elements[2] = Middle
      elements[3] = (null)
      elements[4] = SSN

  -----------------------------------------------------------------
  TOPIC: STRPARSEX
  -----------------------------------------------------------------

  int strparsex(char *array, char *sourcestr, char *parsestr);

  Function:

    Parse a string into individual elements and load those elements
    into the array passed in parameter one.

    Single and double quote characters are not given special treatment.
    If you want to parse text containing quoted strings, use "strparse".

  Parameters:

    array      -  address of an array variable to receive the parsed
                  elements

    sourcestr  -  the string to be parsed

    parsestr   -  a string of individual characters which are used to
                  determine the boundaries between parsed elements.

  Returns:

    Integer number, the number of elements loaded into "array".

  Example1:

    Assume variable "line" has the following literal content:

       MOVE "19" TO WORK-CENTURY

    char *elements[];

    count = StrParseX(elements,line," ");

    Result:

      count = 4

      elements[0] = MOVE
      elements[1] = "19"
      elements[2] = TO
      elements[3] = WORK-CENTURY


  Example2:

    Assume variable "line" has the following literal content:

       Mary took Kiley's toy

    count = StrParseX(elements,line," ");

    Result:

      count = 4

      elements[0] = Mary
      elements[1] = took
      elements[2] = Kiley's
      elements[3] = toy

  -----------------------------------------------------------------
  TOPIC: STRPARSEWORD
  -----------------------------------------------------------------

  char *strparseword(char *sourcestr, int startcol);

  Function:

    Retrieve a "word" from a string. The parse operation first
    scans to the left from the start column until it encounters a
    word delimiter. This position is marked as "start of word". It
    then scans to right from the start column until it encounters a
    word delimiter. This position is marked as "end of word". The
    characters between "start of word" and "end of word" inclusive
    are the "word".

  Parameters:

    sourcestr  -  the string from which the word is to be
                  retrieved

    startcol   -  the start column for the parse operation

  Returns:

    The "word"

  -----------------------------------------------------------------
  TOPIC: STRREV
  -----------------------------------------------------------------

  void strrev(char *targetstr);

  Function:

    Reverse the characters in a string in place.

  Parameters:

    targetstr  -  the string to be reversed

  Returns:

    Nothing

  -----------------------------------------------------------------
  TOPIC: STRSTRIPLEADING
  -----------------------------------------------------------------

  void strstripleading(char *targetstr, char *stripchar);

  Function:

    Strip a specific leading character from a string in place.

  Parameters:

    targetstr  -  the string which is to be stripped

    stripchar  -  the character to be stripped

  Returns:

    Nothing

  -----------------------------------------------------------------
  TOPIC: STRSTRIPTRAILING
  -----------------------------------------------------------------

  void strstriptrailing(char *targetstr, char *stripchar);

  Function:

    Strip a specific trailing character from a string in place.

  Parameters:

    targetstr  -  the string which is to be stripped

    stripchar  -  the character to be stripped

  Returns:

    Nothing

  -----------------------------------------------------------------
  TOPIC: STRUPR
  -----------------------------------------------------------------

  void strupr(char *targetstr);

  Function:

    Convert in place all a..z characters in a string to A..Z

  Parameters:

    targetstr  -  the string to be converted

  Returns:

    Nothing

  -----------------------------------------------------------------
  TOPIC: TRACE
  -----------------------------------------------------------------

  void trace(char *parm);

  Function:

    Trace instructions and variables within the current function.

  Parameters:

    parm  -  "on"  turn continuous tracing on within the current function.

             "off" turn continuous tracing off within the current function.

             N     the number of instructions to trace before tracing
                   is automatically turned off within the current function.


    NOTE1: Prior to each instruction executing a message box is
           presented which displays the instruction and the current
           value of any variables in that instruction.

           At this point you have the choice of executing the
           instruction (click YES), canceling tracing and continuing
           program operation (click NO), or canceling program
           operation (click CANCEL).

    NOTE2: The trace state is maintained independently for each function
           within a particuler macro. If you have multiple functions
           within a macro, specify 'trace("on")' in each function which
           you want traced. The following macro demonstrates this concept:

           void test(void) {

             int i, j, k;

             // this function is traced
             trace("on");
             i = 10;
             j = 12;
             k = 14;
             func1();
             if (i == j) {
               k += 2;
             }

           }

           void func1(void) {

             int i, j, k;

             // this function is not traced
             i = 20;
             j = 22;
             k = 24;
             func2();

           }

           void func2(void) {

             int i, j, k;

             // the first 2 instructions of this function are traced
             trace("2");
             i = 30;
             j = 32;

             k = 34;

           }


  Returns:

    Nothing

  -----------------------------------------------------------------
  TOPIC: TIME
  -----------------------------------------------------------------

  int time(void);

  Function:

    Get the number of seconds elapsed since the reference date
    January 1, 1970.

  Parameters:

    None.

    NOTE: This function is primarily used to generate a unique
          number for timestamp or naming purposes.

  Returns:

    Integer number, the number of seconds elapsed since the reference
    date January 1, 1970.

  -----------------------------------------------------------------
  CHAPTER: SPFservice Function
  -----------------------------------------------------------------

  In Dialog and Edit Macros, it is sometimes necessary to obtain or
  set SPF/SE state information or modify file contents. Additionally
  you will want to execute system commands and Edit primary and line
  commands. All these functions are supported via the "SPFservice"
  interface. A single function with three parameters gives you
  access to all SPF services:

  BYTE *SPFservice(char *selector, char *parm1, char *parm2);

  *  Not all the service calls have a return value.

  *  Not all the service calls specify a value for PARM2.

  *  Individual services are documented in the following sections.

  -----------------------------------------------------------------
  TOPIC: CMD
  -----------------------------------------------------------------

  This service passes a primary command to SPF/SE for execution just
  as if you had typed it in the primary command field.

  Parameters:

    SELECTOR  -  "cmd"

    PARM1     -  the command

    PARM2     -  specify NULL

  Returns:

    Nothing

  -----------------------------------------------------------------
  TOPIC: DIALOG
  -----------------------------------------------------------------

  The "dialog" service presents an SPF/SE dialog.

  Parameters:

    SELECTOR  -  "dialog"

    PARM1     -  the dialog name

    PARM2     -  specify NULL

    NOTE: Your macro`s execution is suspended until the dialog completes.

  Returns:

    Nothing

  If a dialog presentation is unsuccessful because of missing dialog
  definition or error in dialog definition, an error message is
  presented.

  -----------------------------------------------------------------
  TOPIC: QUERY
  -----------------------------------------------------------------

  This service retrieves state information or data from the current
  file.

  Parameters:

    SELECTOR  -  "query"

    PARM1     -  state sub-selector

    PARM2     -  additional parameter where required or NULL

  Returns:

    Nothing

  Query state sub-selectors are:

    BOUNDS_LEFT       - return the left bound (a number)
    BOUNDS_RIGHT      - return the right bound (a number)

    CAPS              - return state of auto capitalization, "TRUE" or "FALSE"

    CHARSET_FILE      - return the file character set
                        (ASCII-ISO8859, ASCII-IBMPC, or EBCDIC)
    CHARSET_DISPLAY   - return the display character set
                        (ASCII-ISO8859 or ASCII-IBMPC)

    COL_NUMBER        - return the data column number where cursor is or 0
    COLS              - return start and end data display column numbers
    CURSOR_ROW        - return the screen row where the cursor is or 0

    DATE              - (see DATE_USA)
    DATE_EUR          - return the date in DD.MM.YYYY HH.MM.SS
    DATE_ISO          - return the date in YYYY-MM-DD HH.MM.SS
    DATE_JIS          - return the date in YYYY-MM-DD HH:MM:SS
    DATE_USA          - return the date in MM/DD/YYYY HH:MM AM|PM

    ENVVAR            - return contents of specified OpSys Environment variable

    FILEMODIFIED      - return whether file was modified, "TRUE" or "FALSE"
    FILESPEC          - return the Edit/Browse file specification

    FIND_STRING_COUNT - return the number of strings found by the last FIND
    FIND_LINE_COUNT   - return the number of lines found by the last FIND

    FONT_FACE         - return current edit font face
    FONT_SIZE         - return current edit font size in points

    LAST_LINE_NUMBER  - return the file line number where the cursor was
                        before the HOME key was pressed
    LAST_COL_NUMBER   - return the data column number where the cursor was
                        before the HOME key was pressed
    LINE_DATA         - return the data from the current line
    LINE_COUNT        - return the total number of lines in the file
    LINE_LABEL        - return the label for the line number specified
                        (Specify line# in PARM2)
    LINE_LENGTH       - return the length of the data in the current line
    LINE_NUMBER       - return the file line number where the cursor is or 0
                        (If 0 is returned, see LAST_LINE_NUMBER)
    SELECT_MODE       - return the select mode
    SELECT_START_COL  - return the select start column number
    SELECT_END_COL    - return the select end column number
    SELECT_START_LINE - return the select start line number
    SELECT_END_LINE   - return the select end line number

    TASK_COUNT        - return the number of Edit/Browse tasks

    XSTATUS           - return whether line is excluded, "TRUE" or "FALSE"
                        (Specify line# in PARM2)

  -----------------------------------------------------------------
  TOPIC: QUEUEMACRO
  -----------------------------------------------------------------

  This service queues a macro name for execution after the current
  macro ends.

  Parameters:

    SELECTOR  -  "queuemacro"

    PARM1     -  macro name

    PARM2     -  specify NULL

  Returns:

    Nothing

  This service should be used when a macro launched by dialog commit
  desires to re-execute the parent macro. This is done to produce
  the effect of "loop until cancelled" on the original dialog.

  When used, this SPFservice call must be the last statement in the
  commit macro.

  See example macros USER1.C and USER1COMMIT.C in
  "\spf-install-directory\macros".

  See example dialog USER1.DLG in "\spf-install-directory\dialogs".

  -----------------------------------------------------------------
  TOPIC: SET
  -----------------------------------------------------------------

  This service sets a particular state variable or alters the
  content of the current file.

  Parameters:

    SELECTOR  -  "set"

    PARM1     -  the state sub-selector to be set

    PARM2     -  the value to be set

  Returns:

    Nothing

  Set state sub-selectors:

    COL_NUMBER  -  set the cursor on a specific data column
    CURSOR_ROW  -  set the cursor on a specific screen row
    LINE_DATA   -  set replacement line data
    TITLE       -  set SPF/SE window title

  -----------------------------------------------------------------
  TOPIC: SLEEP
  -----------------------------------------------------------------

  This service puts the current process in a wait state for a
  specific number of milliseconds. Its primary use is to wait for
  the completion of an external event which was launched by the
  macro (e.g. a compile).

  Parameters:

    SELECTOR  -  "sleep"

    PARM1     -  number of milliseconds to wait

  Returns:

    Nothing

  -----------------------------------------------------------------
  TOPIC: VGET
  -----------------------------------------------------------------

  This service retrieves the current value of the specified SPF/SE
  variable.

  Parameters:

    SELECTOR  -  "vget"

    PARM1     -  the variable name

    PARM2     -  specify NULL

  Returns:

    The variable value

  -----------------------------------------------------------------
  TOPIC: VPUT
  -----------------------------------------------------------------

  This service sets the value of an SPF/SE variable.

  Parameters:

    SELECTOR  -  "vput"

    PARM1     -  the variable name

    PARM2     -  the variable value

  Returns:

    Nothing

  -----------------------------------------------------------------
  TOPIC: VDELETE
  -----------------------------------------------------------------

  This service deletes an SPF/SE variable and frees the resources
  which it was using.

  Parameters:

    SELECTOR  -  "vdelete"

    PARM1     -  the variable name

    PARM2     -  specify NULL

  Returns:

    Nothing

  -----------------------------------------------------------------
  TOPIC: VPERSIST
  -----------------------------------------------------------------

  This service marks a variable as "persistent" so that when SPF/SE
  terminates, the variable is written to disk and is thus preserved
  across SPF/SE sessions.

  The first letter of a persistent variable name must be "Z". To
  avoid collision with system variables a constant prefix value for
  user variables should also be specified. We recommend a prefix of
  "ZUSER." for all user specified persistent variables. For example,
  if you wanted to make a persistent variable with name "MYVAR" you
  would name it "ZUSER.MYVAR".

  Parameters:

    SELECTOR  -  "vpersist"

    PARM1     -  the variable name

    PARM2     -  specify NULL

  Returns:

    Nothing

