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 Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm
No new posts Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am


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