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
 
Need Help on BATCH SQL JCL.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Need Help on BATCH SQL JCL.
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    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts batch cobol/db2 paragraph fall thru a... alois eisshofer COBOL Programming 5 Wed Mar 14, 2018 12:21 am
No new posts CA Intertest Batch 555shanth CA Products 0 Tue Nov 28, 2017 11:10 am
No new posts How to query MAXGENS of an existing P... Chuchulo Hatyzak JCL & VSAM 4 Wed Nov 22, 2017 10:23 pm
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts Generate public-private key in batch ... vasanthz All Other Mainframe Topics 6 Fri Sep 15, 2017 9:20 am

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