IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Want to Submit a SQl Query via JCl though instream


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
hmurali
Warnings : 1

New User


Joined: 08 Mar 2005
Posts: 17

PostPosted: Wed Jul 12, 2006 11:54 am
Reply with quote

Could somebody give we the JCl code to submit a SQl query through instream.

i require the code..
Back to top
View user's profile Send private message
Hanfur

Active User


Joined: 21 Jun 2006
Posts: 104

PostPosted: Wed Jul 12, 2006 12:07 pm
Reply with quote

Hmurli,
Try executing DSNTIAUL program using TMP as given below.Here you should point to the library where DSNTIAUL prog is available and should refer the correspodning PLAN failing to do so would ends up in -818.Also need to mention the SYSTEM properly.

//STEP1 EXEC PGM=IKJEFT1B,DYNAMNBR=20,TIME=120,REGION=3072K
//STEPLIB DD DSN=DBP8.DB2.SDSNLOAD,DISP=SHR
//ISPPROF DD UNIT=SYSDA,SPACE=(TRK,(9,1,4)),
// DCB=(LRECL=175,BLKSIZE=27825,RECFM=FB,DSORG=PO)
//SYSUDUMP DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//REPORT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(DB2T)
RUN PROGRAM(DSNTIAUL) PLAN(DSNTIB71) PARMS('SQL') -
LIB('DBPT.DB2.RUNLIB.LOAD')
/*
//SYSPRINT DD SYSOUT=*
//SYSPUNCH DD DUMMY
//SYSREC00 DD DSN=UNLOADFILENAME,
// DISP=(NEW,CATLG,KEEP),
// SPACE=(CYL,(200,200),RLSE),
// UNIT=SYSDA,STORCLAS=SCNORMAL
//SYSIN DD *
SELECT NAME,EMPID FROM TABLE1
WHERE NAME='NAME'
/*

You can put your query inside SYSIN card.


-Han.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts RC query -Time column CA Products 3
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
No new posts Submit multiple jobs from a library t... JCL & VSAM 14
Search our Forums:

Back to Top