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 Sorting group data rajella DFSORT/ICETOOL 1 Sun Jan 22, 2017 11:32 pm
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm


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