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

Need Help on BATCH SQL JCL.


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

New User


Joined: 05 May 2006
Posts: 12
Location: Pune

PostPosted: Thu Nov 09, 2006 10:50 am
Reply with quote

Hi,

Can any one give model JCL for batch sql execution.

I created JCL i gaven db2 subsystem at SYSTIN DD * and SQL in SYSIN DD * ...........is it mandatory to give remaining run program and lib parms. if yes please let me know what is that LIB? how can i find that library name in my system.
Back to top
View user's profile Send private message
shreevamsi

Active User


Joined: 23 Feb 2006
Posts: 305
Location: Hyderabad,India

PostPosted: Thu Nov 09, 2006 11:39 am
Reply with quote

Hi this is what ur looking for ??

Code:
//STEP0001   EXEC PGM=IKJEFT01,REGION=4096K,DYNAMNBR=100
//STEPLIB   DD DSN=SYS1.DB2X.SDSNLOAD,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSPUNCH DD DUMMY
//SYSREC00 DD DSN=KBY@V1.OUTPUT.RESULT, <<SPECIFY OUTPUT DS
//            DISP=(NEW,CATLG,DELETE),
//            SPACE=(CYL,(100,100),RLSE)
//*
//SYSTSIN  DD *
     DSN SYSTEM(DB2)
     RUN PROGRAM(DSNTIAUL) LIB('SYSDB2.RUNLIB.LOAD') -
        PARMS('SQL') PLAN(DSNTIAUL)
     END
/*
//SYSIN    DD *
     SELECT COUNT( DISTINCT(A) )FROM
     QUALIFIER. TABLE NAME A
/*
Back to top
View user's profile Send private message
ramsfm

New User


Joined: 05 May 2006
Posts: 12
Location: Pune

PostPosted: Thu Nov 09, 2006 1:55 pm
Reply with quote

Thanks for your reply.

//SYSTSIN DD *
DSN SYSTEM(DB2)
RUN PROGRAM(DSNTIAUL) LIB('SYSDB2.RUNLIB.LOAD') -
PARMS('SQL') PLAN(DSNTIAUL)
END

The above systax
RUN PROGRAM(DSNTIAUL) LIB('SYSDB2.RUNLIB.LOAD') -
PARMS('SQL') PLAN(DSNTIAUL)
END

These parms are mandataory if yes will it change for system to system or common for all. especially LIB parm?
Back to top
View user's profile Send private message
ramsfm

New User


Joined: 05 May 2006
Posts: 12
Location: Pune

PostPosted: Thu Nov 09, 2006 2:29 pm
Reply with quote

when gave those parameters the following run time error message i am getting....

------------------------------------
READY
DSN SYSTEM(XTD1) RUN PROGRAM(DSNTIAUL) LIB('SYSDB2.RUNLIB.LOAD') PARMS('SQL'
IKJ56712I INVALID KEYWORD, RUN
IKJ56712I INVALID KEYWORD, PROGRAM(DSNTIAUL)
IKJ56712I INVALID KEYWORD, LIB('SYSDB2.RUNLIB.LOAD')
IKJ56712I INVALID KEYWORD, PARMS('SQL')
IKJ56712I INVALID KEYWORD, PLAN(DSNTIAUL)
READY
END
READY
END
-------------------------------
Can you explain me about that LIB? what it exactly ?
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 How to get a stack trace on a looping... ABENDS & Debugging 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Help in Automating Batch JCL jobs mon... JCL & VSAM 3
No new posts Batch install term/printer CICS 2
No new posts File Aid Batch IBM Tools 7
Search our Forums:

Back to Top