Creating a QBF Frame
The next option on the Create a Frame or Procedure pop-up frame is the QBF Frame. A QBF frame consists of:
• A database query using the QBF user interface.
• A default form or a form created using the ABF FormEdit operation.
No programming with 4GL is necessary. The Edit a QBF Frame Definition frame is shown in the following figure:
In this frame, you enter the values ABF needs to run QBF. The fields are similar to those on the Edit a USER and Edit a REPORT frames.
Frame Name
Specifies the name of the query target; this name must follow standard object naming conventions.
Short Remark
(Optional) Specifies a brief description of the frame
Query Object Type
Specifies the values are either Table or JoinDef (the default); this name must follow standard object naming conventions
Query Object Name
Specifies the name of database table or JoinDef; this name must follow standard object naming conventions. The default is the frame name.
Form Name
Specifies the name of the form associated with this frame; this name must follow standard object naming conventions. The value is the name of a form or the default (blank), which generates a default form when QBF is run.
Command Line Flags
Specifies the parameters that define the scope of the query.
The only parameter available on this frame is –m. Use –m with an additional parameter to indicate the mode of the form. For example, using –mretrieve automatically puts the form in retrieve mode and not give the user access to update or append mode. If you do not use this parameter, the user must select the form mode from the QBF Execution Phase frame menu.
The following menu operations are similar to those in the Edit a USER or Report frame:
NewEdit
Edits or creates a different frame or procedure. You are prompted for the type of component.
Go
Tests the frame by running QBF on the named Table or JoinDef
Edit
Edits, views, or creates the query or JoinDef:
• If the Query Object Type is a Table, Edit starts the Tables Utility, displaying a list of database tables.
• If the Query Object Type is a JoinDef, Edit starts QBF and goes directly to the Edit a JoinDef frame.
FormEdit
Runs VIFRED to create or edit a form for the current frame. You must specify a form name before using FormEdit.
LongRemark
Displays or edits more information about the frame on the LongRemark pop-up
Print
Prints the definition of the frame
ListChoices, Cancel, Help, End
Perform standard operations
Create a QBF Frame
To create a QBF frame:
1. From the Edit an Application frame, choose Create.
2. Select Frame from the Create a Frame or Procedure pop-up. The Create a Frame or Procedure pop-up figure shows this stage.
3. Select QBF. The Create a QBF Frame pop-up appears. It is identical in format to the Create a USER Frame pop-up.
4. In the Name field enter the name for this QBF frame. Choose OK.
5. The Edit a QBF Frame Definition frame appears, showing the name you selected in Step 3 as the Frame Name and the default Query Name.
Optionally enter a description in the Short Remark field.
6. In the Query Object Name field, type the name of the query target. Indicate whether this object is a table or JoinDef in the Query Object Type field.
7. In the Form Name field, enter a form name. You can specify a form that already exists or create a new one as described below.
8. In the Command Line Flags line, optionally enter parameters for runtime operation of the frame.
Create a Form for the QBF Frame
You can create a form with VIFRED before creating the QBF frame, or you can call VIFRED to create a form from the Edit a QBF Frame Definition frame.
To create a form from the Edit a QBF Frame Definition frame
1. Specify a form name on the Form Name field.
2. Choose FormEdit from the menu on the Edit a QBF Frame Definition frame. If the form does not exist, VIFRED displays the Creating a Form frame.
3. Select one of the form options.
If you specify Blank, ABF places you in VIFRED and displays a blank form. Proceed to step 6.
If you specify Duplicate, Table, or JoinDef, ABF displays a pop-up Creating a Form Based on a Formtype. The figure above shows the pop-up Creating a Form Based on a Formtype where the formtype is the Table option.
The pop-up operates in a similar way for each option.
4. Enter the name of a table, a JoinDef, or an existing form to duplicate. Type in the name, or use the ListChoices operation to see a menu-type list of available tables, JoinDefs, or forms.
If you are creating a form based on a table, enter tablefield or simplefields in the Display Format field.
5. Select OK.
When you edit or create a form for a QBF frame, it is not necessary to specify a QBFName, because ABF sets up the form and the query target in your frame specification. See the Character-based Querying and Reporting Tools User Guide for a description of QBFNames.
6. Create the form by moving elements or creating new ones using VIFRED commands, then choose Save. VIFRED asks you to verify the name under which you are saving the form, and then returns you to the Edit a QBF Frame Definition frame.
If you are creating an application that uses a mouse, remember that the mouse user can click at random around the fields of a form. This affects the way you set up fields and their validations in VIFRED. Form design in VIFRED is covered in more detail in Character-based Querying and Reporting Tools User Guide.
For more information about using QBF, see Character-based Querying and Reporting Tools User Guide.
Testing the QBF Frame
The last step in creating a frame is testing. You can test a QBF frame without compiling the application by choosing Go from the QBF frame itself.
You can also test the entire application at any time during development by selecting Go from the Edit an Application frame. For more information, see
Testing Incomplete Applications.