Previous Topic: Planning the DialogNext Topic: Other Things You Could Do


Defining the Dialog

When dialog is the TYPE, you have access to <PF5> DIALOG DEF. This PF key accesses the panels you use to define the panels that appear during execution, along with your definitions of each variable you created on the EDITOR.

The following steps show the sequence of panels that appear when you choose <PF5> DIALOG DEF during EDITOR panel Process Mode.

This particular set of panels defines the preceding sample dialog.

Step 1

Create or select a query to be made into a dialog.

Step 2

Enter dialog as the Type.

Step 3

Move the cursor to DEPT in the ORDER BY clause, press the insert key, and type 1?.

Step 4

Save the dialog.

Step 5

Press <PF5> DIALOG DEF.

Step 6

Complete DEFINE DESCRIPTIVE TEXT (DQDP0) as shown following:

--------------------------------------------------------------------------DQDP0 DATAQUERY: DEFINE DESCRIPTIVE TEXT NAME: SALARY_INFO ------------------------------------------------------------------------------- DESCRIPTION: STATUS: INCOMPLETE ------------------------------------------------------------------------------- ENTER THE DESCRIPTIVE TEXT TO BE USED AS A TITLE AND SAVE IT The report created by this dialog gives you salary, department, name and ID ___ data. You can sort the data by any one of these items.________________________ _______________________________________________________________________________ _______________________________________________________________________________ ------------------------------------------------------------------------------- <PF1> HELP <PF2> RETURN <PF3> CONTINUE <PF4> SAVE <PF5> NOT USED <PF6> NOT USED <PF7> LAST VARIABLE <PF8> FIRST VARIABLE

Step 7

Press <PF4> SAVE to save this part of the dialog definition. Then, press <PF8> FIRST VARIABLE to define the 1? variable.

Step 8

Complete the DEFINE VARIABLE (DQDV0) panel as shown following:

--------------------------------------------------------------------------DQDV0 DATAQUERY: DEFINE VARIABLE NAME: SALARY_INFO ------------------------------------------------------------------------------- DESCRIPTION: STATUS: INCOMPLETE NAME, FROM STAFF ORDER BY 1?DEPT____________ VARIABLE ID: 1 ? ENTER THE PROMPT TO BE DISPLAYED FOR THIS VARIABLE: SELECT A COLUMN NAME FROM THE ALLOWED NAMES OR LEAVE DEPT AS THE DEFAULT.______ VARIABLE TYPE: c C - CHARACTER N - NUMERIC A - ALPHABETIC VARIABLE LENGTH: 16 VARIABLE DEFAULT VALUE: DEPT____________ ------------------------------------------------------------------------------- <PF1> HELP <PF2> RETURN <PF3> CONTINUE <PF4> SAVE <PF5> RANGE/LIST <PF6> DELETE <PF7> PREV VARIABLE <PF8> NEXT VARIABLE

The prompt text indicates the information that identifies the variable being defined.

Step 9

Press <PF4> SAVE and then press <PF5> RANGE/LIST. Defining a range or list is optional.

Step 10

Complete the DEFINE VARIABLE LIST panel (DQDL0) as shown following:

=> ENTER THE VALID VALUES FOR THE VARIABLE BELOW --------------------------------------------------------------------------DQDL0 DATAQUERY: DEFINE VARIABLE LIST ------------------------------------------------------------------------------- NAME SALARY_INFO VARIABLE ID: 1 ? PROMPT FOR VARIABLE: SELECT A COLUMN NAME FROM THE ALLOWED NAMES OR LEAVE DEPT AS THE DEFAULT. DEPT____________ SALARY NAME ID ________________ ________________ ________________ ________________ ________________ ________________ ________________ ------------------------------------------------------------------------------- <PF1> HELP <PF2> RETURN <PF3> DELETE <PF4> SAVE <PF5> NOT USED <PF6> NOT USED <PF7> BACKWARD <PF8> FORWARD

You can define a list or a range (if the data is numeric) for each variable in the dialog or you can allow users to enter any valid names.

Press <PF4> SAVE to save the list and press <PF2> RETURN to go back to the DEFINE VARIABLE panel. Note that the status of the dialog is now complete.

Step 11

Press <PF4> CONTINUE. When the last dialog panel is saved, CA Dataquery redisplays the EDITOR panel and a message telling you to validate.

Step 12

Validate the dialog. Follow these steps:

  1. Complete the dialog definition.
  2. Return to the EDITOR.
  3. Press <PF10> VALIDATE.
  4. View dialog prompt panel and check it for accuracy.
  5. Display any range or list definitions and check them for accuracy.
  6. Make selections from the range and list panels.
  7. Change values on the prompt panels you designed.
  8. Press <PF4> CONTINUE to complete the validation.
  9. If you are satisfied with the results of validation, your dialog is complete and ready to execute <PF3>. If you are not satisfied, you can return to the dialog definition, delete saved panels that you do not like, and change all or part of the definition.