Methods for testing SQL statements
You can test your SQL statements by using SQL Processing Using File Input (SPUFI) or the Db2 command line processor.
Test with SPUFI:You can use SPUFI (an interface between ISPF and Db2) to test SQL statements in a TSO/ISPF environment. With SPUFI panels, you can put SQL statements into a data set that Db2 subsequently executes. The SPUFI Main panel has several functions that enable you to:
- Name an input data set to hold the SQL statements that are passed to Db2 for execution
- Name an output data set to contain the results of executing the SQL statements
- Specify SPUFI processing options
Test with the Db2 command line processor: You can use the Db2 command line processor to test SQL statements from UNIX System Services on z/OS®.
SQL statements that are executed under SPUFI or the
Db2 command line processor operate on actual tables (in this case, the
tables that you created for testing). Consequently, before you access Db2 data:
- Make sure that all tables and views that your SQL statements refer to exist.
- If the tables or views do not exist, create them (or have your database administrator create them). You can use SPUFI or the command line processor to issue the CREATE statements that are used to create the tables and views that you need for testing.