Deleting unwanted utility work files and unload files after execution within RC/Migrator
search cancel

Deleting unwanted utility work files and unload files after execution within RC/Migrator

book

Article ID: 49248

calendar_today

Updated On:

Products

RC/Migrator for DB2 for z/OS

Issue/Introduction

When an RC/Migrator for Db2 for z/OS (RCM) analysis is actually executed there are often utilities being used for unloading and loading data. When the execution
is finished without any problems these datasets should not be left behind to be an annoyance to DASD management when running other jobs.
How do we delete them effectively.

Resolution

RC/Migrator has two Analysis Options that will delete unload datasets and temporary datasets at the end of a successful execution.

 DATASET DELETE OPTIONS
 UNLOAD ==> Y
 TEMPORARY ==> Y

The first is used to indicate whether to delete the datasets RC/Migrator creates to hold the unloaded data for the Unload/Reorg utilities. These datasets are
dynamically allocated as part of the Unload utility process. If they are not automatically deleted, they will need to be deleted manually later.

The second is used to indicate whether to delete the temporary datasets used by the Db2 utilities. If they are not automatically deleted, they will need to be deleted manually later.

What do these options do in practice?

At the end of the load for each table this code can be seen:

.SYNC 40 'LOAD TABLE USERID.TABLE'
.CALL LOADDEL 
.DATA
 DSN(userid.dbname.TID37.DATA) <---------if Y was entered to "UNLOAD ==> Y" this line is generated from the unload.
 DSN(userid.dbname.TID37.DATA.D) <-------the rest of these are to do with the loads.
 DSN(userid.dbname.TID37.DATA.E)
 DSN(userid.dbname.TID37.DATA.M)
 DSN(userid.dbname.TID37.DATA.U)
 DSN(userid.dbname.TID37.DATA.O)
.ENDDATA

The above block is generated for each table. The number of work datasets will vary depending on the vendor utility used. Fast Load and IBM Load use different numbers of work datasets.
The example above is for an IBM load Utility. Some sites have sometimes added the RLSE parm to the unload dataset allocation. This however during a restart operation can cause
trouble when the unload dataset has already been released and Batch processor does not know that this has happened and tries to possibly delete it before starting again.
So, take care when altering a vanilla RC/Migrator model as there can be unexpected consequences.

Additional Information

Analysis Options, Dataset Delete Options