Generate DB2 Load Card



IBM's flagship relational database management system

Generate DB2 Load Card

Postby Prasanna G » Mon Oct 19, 2015 5:23 pm

Hi

I am trying to create a Load card while doing BMC Unload of my table. I am using the below unload card.
//SYSIN DD *                                             
     UNLOAD                                               
     FORMAT CSV TERMINATEDBY ';' ENCLOSEDBY ''           
     NULLSTRING ''                                       
     UNICODE                                             
     TSFMT('YYYY-MM-DD HH:MM:SS.NNNNNN')                 
     UNLOADDN SYSREC ACTIVE NO                           
     SHRLEVEL CHANGE                                     
     SORTDEVT SYSDA                                       
     SORTNUM 4                                           
     SELECT *,X'0A'                                       
     FROM WCC12.XLOCATIONPREF;                           
//SYSREC DD DSN=MBTT.UNLOAD.XLOCPREF.TAPE.WCC12.OCT05,   
//         UNIT=CARTG00,VOL=(,,,10),                     
//         DISP=(NEW,CATLG,DELETE)                       
//*                                                       
//SYSCNTL DD DSN=MBTT.UNLOAD.XLOCPREF.CNTL.WCC12.OCT05,   
//         DISP=(NEW,CATLG,CATLG),                       
//         SPACE=(TRK,(1,1),RLSE),                       
//         UNIT=SYSDA                                     


But the control card data set is created with Invalid block size and I am not able to use the same for load purpose. Can someone please let me know how to create a load card to load data back to DB2 using BMC?

Thanks
Prasanna G.
User avatar
Prasanna G
 
Posts: 71
Joined: Tue Apr 12, 2011 9:49 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Generate DB2 Load Card

Postby NicC » Mon Oct 19, 2015 5:58 pm

You appear to have an instream control card so that will default to 80 bytes LRECL but I don't know the blksize without looking up the manuals. Are you sure that it is the SYSIN that is being complained about? How about posting the error message.
Why not create a dataset with correct attributes and put your control cards in there?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Generate DB2 Load Card

Postby Prasanna G » Mon Oct 19, 2015 6:07 pm

Hi NicC,

I tried to remove the TSFMT from my unload card and ran the unload job. The SYSCNTL card is now getting created.

Thanks
Prasanna G.
User avatar
Prasanna G
 
Posts: 71
Joined: Tue Apr 12, 2011 9:49 pm
Has thanked: 1 time
Been thanked: 0 time


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post