July 2003 Technical Tip – DB2's LOAD Utility
The tables used in our DB2 courses tend to be very small, with ten to twenty rows per table. Under these conditions, it is appropriate to use the INSERT command to add rows to a table. For example,
The problem with the INSERT command is that it can only insert one row at a time. Clearly, this is not realistic for most production databases. But there is an alternative: the LOAD utility. This utility allows you to specify a sequential data set and its layout, then the records of that data set are inserted as rows in the table.
For example, given the following data set named BQ01.TRAINING.DATA(EMPL):
the following JCL could be used to load the data into DB2 table BQ01.EMPL:
For more information, check the web. A Google® search on "DB2 LOAD UTILITY" will provide you with plenty of information.
This article was written in response to a question from a client. If you have a question, please feel free to call us.