Check your queries (and dialogs) for syntax errors and naming errors before they are saved. To do this, you press a key to have CA Dataquery validate the query.
Once the query is validated, it should be saved if it is to be reused.
Results
The following is a sample of how the text area of the EDITOR panel appears after completing the procedures in the previous step:
.. ================================ T O P ===================================== 01 SELECT REP_ID, ORD_AMT, NAME 02 FROM GLS_CUST_TABLE, GLS_ACCTS_TABLE 03 WHERE GLS_CUST_TABLE.CUST_ID = GLS_ACCTS_TABLE.CUST_ID AND ORD_AMT > 1000.00 04 ORDER BY REP_ID, ORD_AMT, NAME .. =========================== B O T T O M ==================================
Facts
The following provides information about the validation process.
A query resides in the active query area until you use a command or selection to activate another query. You should save any query you might want to work on later or execute more than once. Once you save a query, you can change it and press <PF9> UPDATE in Process Mode to save the changes. If you have already created a report format, you should determine whether it is necessary to alter the format as well. If you have not saved a query you are working on and you leave the EDITOR panel to perform another function, you can use the EDIT * command to recall it if another query has not been activated.
You can validate a query or dialog at any point during construction. While CA Dataquery checks for errors, it does not check to see whether a query is complete.
CA Dataquery checks that the user is authorized to do the function, for example, SELECT, DROP, CREATE. CA Dataquery then passes the query to CA Datacom/DB which checks the syntax. If a syntax error is found, CA Dataquery displays a message beginning with the letters DQ. You correct the error and validate again. CA Dataquery then passes the query to CA Datacom/DB.
CA Datacom/DB returns a message with a code that begins with DQ093 and that describes the error (like DQ093 ILLEGAL TABLE NAME). You correct the error and validate again. Ask your CA Dataquery Administrator for assistance with CA Datacom/DB errors if you need it.
Consider saving and updating queries as they grow to avoid losing your work if you make a mistake.
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, consider saving 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.
Steps
These are the steps for validating and saving the sample query.
Press <PF10> in either mode during display of the query.
Correct errors, if any and repeat step 1 until the QUERY VALIDATION WAS SUCCESSFUL message appears.
If in Create Mode, press <PF12> PROCESS MODE to change the PF key menu.
In Process Mode, press <PF4> SAVE, if the query has not been saved before. If the query already exists, press <PF9> UPDATE to save the changes.
|
Copyright © 2014 CA.
All rights reserved.
|
|