it would be better to define what You mean by <unload>
Online Database Image Copy utility (DFSUICP0)
Use the Online Database Image Copy utility (DFSUICP0) to create an as-is image copy of the database while it is being updated by the online system. The image copy is used for recovery purposes.
I always write a small COBOL program to do what you're doing. As long as it's reading sequentially through the primary database, it should run quickly.
IMS has a nice feature called OSAM sequential buffering (OSSB) that will gobble up huge chunks of data for each EXCP (assuming a few things). You enable it by adding a DD to the IMS step:
//DFSCTL DD DSN=WTSO.PROD.PARM(DFSCTL),DISP=SHR
That contains this line:
This is safe to put in ANY program because it will check the access to the database and see if it's sequential. If not, it goes to sleep. if it activates, it will take up some memory, so give it some to play with.