View previous topic :: View next topic
|
Author |
Message |
shchan
New User
Joined: 06 Jun 2007 Posts: 58 Location: Hyderabad
|
|
|
|
Hi,
Can anybody tell me how to run a db2 query in batch.I just have to run a select query which displays all the information in my table.Can you please provide the jcl??
Thanks,
shchan |
|
Back to top |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
DSNTEP2 DSNTEP4 .. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
here is something to start with,
obviously you need to change things that apply to your site.
this is dsntiaul, which you will need to have authority.
try it, if it works you have authority, if not, you don't.
Code: |
//STEP0170 EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*,DCB=BLKSIZE=121
//SYSPRINT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(DB2P)
RUN PROGRAM(DSNTIAUL) -
PLAN(DSNTIB81) -
PARMS('SQL,1,TOLWARN(YES)') -
LIB('DB2P.DSN.RUNLIB.LOAD')
//SYSREC00 DD DSN=TF.MD.GIG.C4600,
// SPACE=(CYL,(3000,2000),RLSE),
// DCB=(RECFM=FB,LRECL=1000,BLKSIZE=26000),
// DISP=(NEW,CATLG,DELETE)
//SYSPUNCH DD SYSOUT=*
//SYSIN DD *
SELECT your select statement here |
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
I just have to run a select query which displays all the information in my table.Can you please provide the jcl?? |
remember the jcl provided are SAMPLES which certainly work in the responder' s environment
but have to be checked and tested in YOUR environment
I have seen countless cases of these kind of dialogs
... Q give me the jcl
... A some jcl is posted
... Q it does not work
... A I tested it works in my environment
... Q please help me
... and so on and so on
for this kind of issues the BEST source is Your organization
( a colleague or a support group )
maybe they have standards and the answers given might not fit
meditate, meditate |
|
Back to top |
|
|
shchan
New User
Joined: 06 Jun 2007 Posts: 58 Location: Hyderabad
|
|
|
|
Thanks Dick Brenholtz |
|
Back to top |
|
|
|