Previous Topic: Debugging the ApplicationNext Topic: SQL Trace Facility


Command Facility

The Command Facility is a tool for a user to issue ad hoc SQL statements in an interactive online environment or in batch mode.

You can use this facility to test SQL statement syntax and to test conditions of the database both when you are designing the application and, if necessary, while debugging.

Note: You can use CA OLQ to access CA IDMS with SQL. For more information, see the CA OLQ Reference Guide.

This example shows a query submitted online to the Command Facility and the result table returned. A successful SELECT statement, such as the one shown here, can be declared as a cursor with no change to the syntax.

OCF nn.n ONLINE IDMS NO ERRORS 1/16 SELECT PROJ_ID, EST_START_DATE, PROJ_DESC FROM DEMOPROJ.PROJECT WHERE EST_START_DATE > CURRENT DATE ORDER BY 2; *+ *+ PROJ_ID EST_START_DATE PROJ_DESC *+ ------- -------------- --------- *+ C203 1998-02-01 Consumer study *+ C240 1998-06-01 Service study *+ C200 1999-01-15 New brand research *+ D880 1999-11-01 Systems Analysis *+ P634 2000-02-01 TV ads - WTVK *+ P200 2000-09-01 Christmas media *+ *+ 6 rows processed

Note: For more information about using the Command Facility, see the CA IDMS Common Facilities Guide.