ABF Writer Exercise

Objectives:

  1. To familiarise yourself with the basics of the Ingres Application-By-Forms facility
  2. To understand how ABF can be used to combine 4GL, VIFRED, QBF, Reports and SQL to provide a powerful 4GL Application Generator
  3. To create a simple INGRES application giving menu access to the forms and reports that you have already created for the Library Database.

The menu system developed in this exercise is a very simple one designed to show how ABF "pulls together" existing components. You will develop a more sophisticated menu system in subsequent exercises.

You will need to refer to INGRES ABF User Guide p 2.35 - 2.64 before attempting this exercise. It would also be advisable to study the ABF Menu structure (ABF manual pg 2.6)).

Applications cannot be accessed from within Ingres/Menu (this takes you into the Ingres VISION tool in our particular installation). If you have an Ingres/Menu open you can back out of it now.

  1. From a command line prompt type
    abf dbname
    Ingres will open the ABF - Applications Catalog.
  2. Invoke the Create option and enter the name library. Check that the language field is set to SQL then hit OK(f8).

    You will now need to define the frames that will make up this application.

  3. Use the create option to create an application frame, which is a QBF (query) frame.
  4. Call the frame abfauthor. Set the Query Object Type to table, and the Query Object Name, AND the Form Name to author.
  5. Go(f8) the frame to check that it works.

    These steps have added the default QBF frame used to browse the 'author' table to the application. You will remember that we had developed the author QBF frame in an earlier exercise.

  6. Now use the create option to create an application frame that is a report frame.
  7. Call the frame abfreport.
  8. Set the Report Name to borrower_loans and Go(f8) the report.

    These steps have added the default report frame used to show the loans for a particular borrower to the application. You will remember that we had developed the report in an earlier exercise.

  9. Create a user-specified (4GL) frame called abfmenu that will be the menu frame for your abftest application. For this frame you will need to create a FORM in VIFRED(FormEdit) and 4GL code with the system editor (EDIT option), both of which are available from the USER-SPECIFIED FRAME DEFINITION screen. Ref: Ingres ABF Users Guide p2-37 to p2-50 for further details on User-Specified frames.
    1. Using VIFRED create a FORM as shown in Appendix E. This FORM consists of ONE field called choice which has a data component c1. The rest of the form consists of Trim.
    2. Choose the EDIT option to access the system editor. Type in the 4GL code from Appendix E. On saving and exiting from the editor a file called menu1.osq will be created.
    3. Compile the frame by choosing the COMPILE option. This will combine the VIFRED form and 4GL code. You will need to resolve any compilation errors that occur.
  10. Once you have successfully compiled this frame you can test your application by returning to the 'Edit an Application Frame' screen and choosing the GO option.

    Continue with this trainer


    This WWW material is copyright De Montfort University and may only be reproduced or used if this copyright notice is included.
    This page is maintained by John Skelton. Comments or suggestions for improving this material can be emailed to jas@dmu.ac.uk) and will be gratefully received.