View previous topic :: View next topic
|
Author |
Message |
nileshp
New User
Joined: 25 Feb 2006 Posts: 31
|
|
|
|
Can anyone tell me is it possible to execute the DB2 query from batch?
Thanks & Regards
NIlesh Padwal |
|
Back to top |
|
|
saiprasadh
Active User
Joined: 20 Sep 2006 Posts: 154 Location: US
|
|
|
|
Hi Nilesh,
Yes you can execute a DB2 query from Batch.
Thanks
Sai |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
You can read more about the sample programs in the fine manual.
O. |
|
Back to top |
|
|
|