Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

JCL for copying the data from DB2 tables to the Dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: JCL for copying the data from DB2 tables to the Dataset
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    Post subject: Re: JCL
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

Senior Member


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

PostPosted: Thu May 24, 2007 4:01 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Paasing symbolic parameter to instrea... Anirudh Anand JCL & VSAM 1 Thu Jul 27, 2017 1:22 pm
No new posts Passing data from REXX to C programme... chong.zhou CLIST & REXX 3 Wed Jul 26, 2017 9:11 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts copying data without knowing location arunsoods DFSORT/ICETOOL 11 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us