Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Is it possible to execute the DB2 query from batch

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
nileshp

New User


Joined: 25 Feb 2006
Posts: 31

PostPosted: Thu Aug 02, 2007 10:31 am    Post subject: Is it possible to execute the DB2 query from batch
Reply with quote

Can anyone tell me is it possible to execute the DB2 query from batch?

Thanks & Regards
NIlesh Padwal
Back to top
View user's profile Send private message

saiprasadh

Active User


Joined: 20 Sep 2006
Posts: 154
Location: US

PostPosted: Thu Aug 02, 2007 1:57 pm    Post subject:
Reply with quote

Hi Nilesh,
Yes you can execute a DB2 query from Batch.


Thanks
Sai
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 Aug 02, 2007 2:11 pm    Post subject:
Reply with quote

Hi,

A sample JCL can be like:
Code:
//STEP030 EXEC PGM=IKJEFT01,                               
//             DYNAMNBR=20,                                 
//             REGION=4M                                   
//*                                                         
//STEPLIB  DD  DSN=DB2SYS1.VEND.LOADLIB,                   
//             DISP=SHR                                     
//*                                                         
//SYSREC00 DD  DSN=OUTPUT.FILE.NAME.HERE,
//             DISP=(NEW,CATLG,DELETE),                     
//             UNIT=SYSDA                                   
//*                                                         
//SYSPUNCH DD SYSOUT=*                                     
//*                                                         
//SYSTSPRT DD  SYSOUT=*                                     
//SYSPRINT DD  SYSOUT=*                                     
//SYSUDUMP DD  SYSOUT=*                                     
//SYSTSIN  DD  *                                           
  DSN SYSTEM(DB2G)                                         
  RUN PROGRAM(DSNTIAUL) PLAN(DSNTIAUL) -                   
  PARM('SQL')                                               
/*                                                           
//*                                                         
//SYSIN    DD  *                                             
    YOUR QUERY STATEMENTS
/*                                                           
//*                                                         


You may need bit modification in JCL specific to your site.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Thu Aug 02, 2007 6:42 pm    Post subject:
Reply with quote

You can read more about the sample programs in the fine manual.

O.
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 -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts HEX value search in a DB2 query maxsubrat DB2 2 Wed Oct 04, 2017 3:04 pm
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us