Compaq ACMS for OpenVMS
Writing Applications

Previous Contents Index

E.3 FMS Sample Application

This section describes the components of the FMS sample application. In general, the FMS sample application uses FMS user request procedures written in FORTRAN to replace the TDMS requests included in the request libraries that are defined in the task group definition. This requires the use of the ACMS$RI_LIB_libraryname logical. All the components listed are in the ACMS$RI_EXAMPLES directory.

E.3.1 FMS Sample Application Source Modules

This section lists the source modules for the FMS sample application.

E.3.2 FMS Sample Application Run-Time Files

This section contains the run-time files for the FMS sample application.

Appendix F
Modifying the FMS Menu Interface

ACMS software includes an FMS-based menu interface to use with the ACMS-supplied RI agent, ACMS$RI_AGENT. The sample FMS form library for the menu interface is in the ACMS$RI_EXAMPLES directory.

This appendix describes how to modify this menu interface to suit the needs of a particular application. To incorporate the modified menu interface into the ACMS$RI_AGENT, see Chapter 14.

There are two FMS menu form definitions:

To modify the supplied FMS menu form, MENU_MAIN_FORM.FRM:

  1. Make a copy of the form. Do not modify the original copy of MENU_MAIN_FORM.FRM; you must modify a copy of the form. The form MENU_MAIN_FORM must stay the same because the menu interface routine uses that name. For example:

    $ COPY MENU_MAIN_FORM.FRM newmenu.frm

  2. Edit the form to make the necessary changes.

    $ FMS/EDIT newmenu.frm

    FMS responds by clearing the screen and displaying the Form Editor Menu, shown in Figure F-1. You use this menu to select an action to perform. Type the name of the phase you wish to enter.

    Figure F-1 Form Editor Menu

    First change the layout of the form. To enter the layout phase, type LAYOUT and press [Return].
    The layout of the ACMS-supplied menu form is similar to the ACMS menu format. The FMS menu form contains a menu header, a selection list, a prompt line, and a message line. The menu header is the name of the menu. The selection list shows the tasks you can run and the menus available.
    Type the number or keyword for the task or menu in the blank space after the prompt. Press [Return] after making your selection.
    The FMS menu form contains only one field, the selection field. The remaining data on the screen is background text. In the layout phase, you can change, delete, or add any background text that is needed for a given application; the selection field name and size, however, must remain the same.
    The selection list is also used by the menu interface routines. The FMS menu interface routine uses the selection list numbers as indexes or the selection list keywords as keywords for FMS-named data calls to retrieve the task and application names.
  3. After modifying the FMS menu form layout, change the Named Data Area of the form. Named Data provides a convenient way for the FMS menu routine to store program parameters with the form instead of coding them into the menu routines. Use Named Data to add additional menu forms and change the existing menu form without changing the menu interface routine.
    Named Data is data that is associated with a form but does not appear on the operator's screen. Named Data exists in the FMS workspace with the form. Define the Named Data to the menu form during the data phase. Enter the data phase by typing PHASE at the form editor menu.
    The data can be any string up to 80 characters and is referenced by either name or index. The FMS menu routine subdivides the 80-character data area into ACMS task name and application name. The task name must be first; the application name follows, with at least one space in between them.
    Table F-1 shows how to define the named data associated with a form.

    Table F-1 Defining the Named Data Associated with the Form
    Index Name Data Area
    Task Name/Application

    The FMS menu interface routine uses the Named Data area to determine the ACMS task name and the ACMS application name by providing the user with two ways to select a task or menu: by number or by keyword. The user can type either the number from the menu (that is used as a index into the Named Data area) or the keyword from the menu (that is used as a keyword into the Named Data area). You can use the short form of a keyword. Use enough letters to make the selection unique.
    The select list numbers and keywords must exactly match the indexes and names in the Named Data area of the menu form. If a user enters a selection that is not contained in the Named Data area, an error message is displayed indicating that it was an invalid selection and to enter another one.
    In addition, the FMS menu interface routines define three keywords that implement some of the ACMS menu functionality. The interface routines keywords must be placed in the task-name field of the Named Data area. The keywords are as follows:

  4. Create a new FMS menu library.
    After modifying the supplied menu form, create a new FMS form library. Use the FMS Form Librarian Utility. Putting forms in form libraries makes the forms available to the Form Driver and the FMS menu interface routine. The create operation makes a new library file and puts one or more binary forms in it, as follows:

    LIBRARY: newmenulibrary.flb
    FORMS:   newmenu.frm,menuhelpform.frm

  5. Link the FMS menu interface routine.
    You can link the FMS menu interface routine directly into the ACMS$RI_AGENT or into a shared image that is activated at run time. See Section 14.5.1 for more information on linking and running the menu interface.

Previous Next Contents Index