IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

JCL for copying the data from DB2 tables to the Dataset


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vinay249

New User


Joined: 18 Apr 2007
Posts: 13
Location: Bangalore

PostPosted: Thu May 24, 2007 2:12 pm
Reply with quote

Hi,

Please provide me the JCL for copying the data from DB2 tables to the Dataset.







Thanks in Advance,
Back to top
View user's profile Send private message
Naresh Kumar Reddy P

New User


Joined: 24 May 2007
Posts: 8
Location: Bangalore

PostPosted: Thu May 24, 2007 2:53 pm
Reply with quote

Vinay,

You can use IKJEFT01 utility for copying the data from a DB2 table to mainframe dataset. You can give the DB2 query in SYSIN as the input, and the output dataset with the DD name SYSREC00.
Let us know for any issues.

Thanks
Reddy
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu May 24, 2007 4:01 pm
Reply with quote

Vinay,

You may use below JCL, with a little modification.
JCL is written with IKJEFT01, as stated earlier.

Code:
//JOBCARD
//*                                                         
/*ROUTE XEQ DB2P                                             
//*                                                         
//STEP000  EXEC UCC11RMS,PARM=F                             
//*                                                         
//STEP030 EXEC PGM=IKJEFT01,                                 
//             DYNAMNBR=20,                                 
//             REGION=4M                                     
//*                                                         
//STEPLIB  DD  DSN=DB2SYS1.VEND.LOADLIB,                     
//             DISP=SHR                                     
//*                                                         
//SYSREC00 DD  DSN=HLQ.OUT.FILE
//             DISP=(NEW,CATLG,DELETE),                       
//             UNIT=SYSDA                                   
//*                                                         
//SYSPUNCH DD SYSOUT=*                                         
//*                                                           
//SYSTSPRT DD  SYSOUT=*                                       
//SYSPRINT DD  SYSOUT=*                                       
//SYSUDUMP DD  SYSOUT=*                                       
//SYSTSIN  DD  *                                               
  DSN SYSTEM(DB2P)                                             
  RUN PROGRAM(DSNTIAUL) PLAN(DSNTIAUL) -                       
  PARM('SQL')                                                 
/*                                                             
//*                                                           
//SYSIN    DD  *                                               
   
YOUR QUERY STATEMENT
/*
//*
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts SCOPE PENDING option -check data DB2 2
Search our Forums:

Back to Top