Joined: 05 Oct 2005 Posts: 309 Location: Vizag / US
the jcl depends from shop to shop...
image copy means : take a back up of the database, by givin the tablespace info and schema name into a dataset.
This dataset has the complete info and data of the database for which u have taken a backup.
similarily there will be a restore jcl for having the dataset as input to load all the data into the database.
One is to copy the content of a table/tables directly using the DB2 UNLOAD utility onto a dataset and the other is by taking an IMAGE COPY using the DB2 COPY utility.
COPY utility copies the image of the table (meaning it uses an compression algorithm to store the data of a table) and if one opens the output dataset of COPY, the details would not be in a human readable format. Input for this is the table itself. It is basically executed for taking a back-up. When COPY is executed, an entry is made available in the SYSIBM.SYSCOPY table which could be useful for recovery purposes.
UNLOAD on the other hand, copies the content of a table directly onto a dataset (you can actually c the values of non-numeric columns) so that it could be used by the LOAD utility to load into a table. This could be one of the areas where UNLOAD could be used.
Also the input for UNLOAD could be a table or the Output of COPY utility.