How to run a CA Fast Unload Job to unload two tables in same JCL from an image copy?.

Document ID : KB000010396
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

CA Fast Unload Job got PFU0135E error message when there are two FASTUNLOAD ... SELECT statements when attempted to unload two tables from an image copy. 
 
The two image copies are concatenated in same SYSIMG DD.
 
//SYSIMAG DD DISP=SHR,DSN=PREFIX.IMAGE.COPY.IC1
//              DD DISP=SHR,DSN=PREFIX.IMAGE.COPY.IC2

Then there are two SELECT statements.
FASTUNLOAD
INPUT-FORMAT IMAGECOPY
INDDN SYSIMAG
...
SELECT * FROM TABLE1;
...
SELECT * FROM TABLE2;
 
CA Fast Unload Job got the PFU0135E error message.
 
PFU0135E - UNLOADING FROM MORE THAN ONE TABLESPACE IS NOT SUPPORTED FOR A COPY 

Instructions:

CA Fast Unload does not support more than one table space for INPUT-FORMAT IMAGECOPY  with a single FASTUNLOAD statement. But can be achieved by using multiple FASTUNLOAD statements. This is a sample JCL. 
 
//PTIMSG    DD  SYSOUT=*
//PTIIMSG   DD  SYSOUT=*
//SYSOUT    DD  SYSOUT=*  
//*INPUT IMAGECOPIES*
//SYSIMG01  DD DISP=SHR,DSN=PREFIX.IMAGE.COPY.IC1
//SYSIMG02  DD DISP=SHR,DSN=PREFIX.IMAGE.COPY.IC1
//* OUTPUT *
//SYREC101  DD DSN=PREFIX.UNLOAD.SYREC101,
//             SPACE=...
//SYREC201  DD DSN=PREFIX.UNLOAD.SYREC201,
//             SPACE=...
//* LOAD control *
//SYCTL101  DD  SYSOUT=*
//SYCTL201  DD  SYSOUT=*
//*
//SYSIN   DD  *
FASTUNLOAD
  LOAD-CONTROL DB2LOAD
  INPUT-FORMAT IMAGECOPY
  DISPLAY-STATUS 1000,T
  IO-BUFFERS 60
  VSAM-BUFFERS 96
  SHRLEVEL REFERENCE
    INDDN  SYSIMG01       -- INPUT IMAGECOPY First table space SYSIMG01
    UNLDDN SYREC1         -- OUTPUT DDNAME Unload first table space SYREC101
    CTLDDN SYCTL1          -- LOAD CONTROL First table SYCTL101
    SELECT * FROM TABLE1; 

FASTUNLOAD
  LOAD-CONTROL DB2LOAD
  INPUT-FORMAT IMAGECOPY
  DISPLAY-STATUS 1000,T
  IO-BUFFERS 60
  VSAM-BUFFERS 96
  SHRLEVEL REFERENCE
    INDDN  SYSIMG02       -- INPUT IMAGECOPY Second table space SYSIMG02
    UNLDDN SYREC2         -- OUTPUT DDNAME Unload second table space SYREC201
    CTLDDN SYCTL2          -- LOAD CONTROL Second table SYCTL201
    SELECT * FROM TABLE2;
 
Note when unloading from an image copy OBID can be changed so it is recommended to run first a SEARCH-OBID report.