The control file contains a group of SQL statements and Database Services Utility commands to be executed. Grouping these commands in one file gives you the option of saving the file for periodic execution of the sequence of commands in it; you do not have to retype these commands. Use a control file when running a batch job, testing statements or commands, or when you expect to use the same or similar utility commands again.
Create a control file by using an editor program as follows.
SELECT * FROM SQLDBA.DEPARTMENT; SELECT * FROM SQLDBA.PROJECT;
Note: | Always end SQL statements with a semicolon. |
Note: | This step sets the record length of the control file to a fixed length. If the default of the editor is set to variable length record format, you must repeat this step each time you edit the file. |
For more information on Database Services Utility commands, see Chapter 8, "Command Reference". For more information on SQL statements, see the DB2 Server for VSE & VM SQL Reference.