In this step you see how to access the EDITOR's Process mode panel and to validate and save your query prior to execution.
Completed Example
Here is how the completed query looks, ready to be checked for errors, saved, and executed. Press <PF12> on the EDITOR panel during display of CREATE MODE PF keys to change the PF key display to PROCESS MODE. Note the new PF key display.
=> --------------------------------------------------------------------------DQD10 DATAQUERY: EDITOR ------------------------------------------------------------------------------- NAME: USER-SAMPLE TYPE: QUERY STATUS: PRIVATE DESCRIPTION: TOTAL ORDERS PER CUSTOMER -- AVERAGE PRICE ....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+. .. ================================ T O P ===================================== 01 FIND ALL CAI-DETAIL-TBL ROWS 02 WITH SHIP-QTY GT 0 03 SET SHIP-PRICE(7.2) = UNIT-PRICE * SHIP-QTY 04 SORT BY (CUST-ID) 05 PRINT FROM TITLE1 'FILLED CUSTOMER ORDERS' 06 CUST-ID 07 ITM-ID 08 SHIP-QTY 09 UNIT-PRICE 10 (SHIP-PRICE) PICTURE 'Z,ZZZ,ZZ9.99-' 11 WHEN CUST-ID BREAKS ------------------------------------------------------------------------------- <PF1> HELP <PF2> RETURN <PF3> EXECUTE <PF4> SAVE <PF5> DIALOG DEF <PF6> DELETE <PF7> BACKWARD <PF8> FORWARD <PF9> UPDATE <PF10> VALIDATE <PF11> RIGHT/LEFT <PF12> CREATE MODE
Concepts
These are the major concepts related to this step:
Process Mode
You use the EDITOR: Process Mode panel to execute, save, update, or delete queries. You can also use this panel to access the option to define a dialog.
EXECUTE
When you execute a query, you are asking CA Dataquery to process the requests in your query statements and return the resulting report.
SAVE
If you do not want to re-create a query each time you want to get a report, you can save the query in your private library or the public library. You can execute a query saved in your private library or the public library.
The following provides information about saving queries.
You should save any query you want to use again. If you are creating a complex query and spending a lot of time on it, you may want to save it before you are finished. If you do, you can use the <PF9> UPDATE PF key to save it again. You can save without validating first.
CA Dataquery saves everything written in the text area of the EDITOR panel. The item must have a name, type (query or dialog) and status (public or private) before it can be saved.
A query or dialog resides in the active query area until you access another query or dialog. You can recall an active query to the EDITOR panel with the EDIT * command.
When you no longer need a saved query, you can delete it from your private library or, if you are authorized, from the public library. Once you delete a query, you can only recall it if it is currently in the active query area because you have displayed, validated, or executed it.
Delete queries by pressing <PF6> during directory display. See Selecting a Directory for details.
DIALOG DEFINITION
To make a query more versatile, you can convert a query to a dialog capable of accepting variables, such as different table, column and key names or literal values each time you execute the dialog. For details on creating a dialog, see Creating Dialogs.
DELETE
When you no longer need a saved query, you can delete it from your private library, or if you are authorized, from the public library. Once you delete a query, you can only recall it if it is currently in the active query area because you have displayed or executed it.
UPDATE
After you save a private query, you can still make changes to it as your needs change. You may also update public queries which you authored depending on options selected when CA Dataquery was installed. See your CA Dataquery Administrator for more information.
VALIDATE
Before you execute or save a newly created or updated query, you should validate the query. However, if you do not validate the query, validation will be done at execution time. When you select the VALIDATE option, you are asking CA Dataquery to check the query for correct DQL syntax and to verify that the table, column and key names in your query are spelled correctly or do actually exist.
Procedure
=> --------------------------------------------------------------------------DQD10 DATAQUERY: EDITOR ------------------------------------------------------------------------------- NAME: USER-SAMPLE TYPE: QUERY STATUS: PRIVATE DESCRIPTION: TOTAL ORDERS PER CUSTOMER -- AVERAGE PRICE ....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+. .. ================================ T O P ===================================== 01 FIND ALL CAI-DETAIL-TBL ROWS 02 WITH SHIP-QTY GT 0 03 SET SHIP-PRICE(7.2) = UNIT-PRICE * SHIP-QTY 04 SORT BY (CUST-ID) 05 PRINT FROM TITLE1 'FILLED CUSTOMER ORDERS' 06 CUST-ID 07 ITM-ID 08 SHIP-QTY 09 UNIT-PRICE 10 (SHIP-PRICE) PICTURE 'Z,ZZZ,ZZ9.99-' 11 WHEN CUST-ID BREAKS ------------------------------------------------------------------------------- <PF1> HELP <PF2> RETURN <PF3> EXECUTE <PF4> SAVE <PF5> DIALOG DEF <PF6> DELETE <PF7> BACKWARD <PF8> FORWARD <PF9> UPDATE <PF10> VALIDATE <PF11> RIGHT/LEFT <PF12> CREATE MODE
|
Copyright © 2014 CA.
All rights reserved.
|
|