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
 
Problem in Running Query via JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
vickey_dw

New User


Joined: 10 Jun 2015
Posts: 44
Location: India

PostPosted: Tue Oct 18, 2016 11:11 pm    Post subject: Problem in Running Query via JCL
Reply with quote

Hi All,
i am using below kind of job to run SQL query (Cannot post original job as i dont have google access inside ODC)

Code:
//STEP001 EXEC PGM=IKJEFT01,DYNAMNBR=20,         
//             REGION=4M
//SYSTSPRT DD  SYSOUT=*                           
//SYSTSIN  DD  *                                 
 DSN SYSTEM(DB2D)                                 
 RUN PROGRAM(DSNTEP2) PLAN(DSNTEP2) -             
 LIB('db2.load.library')                         
/*                                               
//SYSPRINT DD  SYSOUT=*                           
//SYSIN DD  *                                     
   SQL QUERY
/*   


This job is working fine and i am getting results of query in SYSPRINT statement.
But i want result of SQL in my PS so i am trying below

Code:
//SYSPRINT DD  DSN=MYPS,DISP=SHR


But i am getting some printing error.Please share your thoughts on this.
Back to top
View user's profile Send private message

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1781
Location: Bloomington, IL

PostPosted: Tue Oct 18, 2016 11:23 pm    Post subject:
Reply with quote

Saying that you are getting "some printing error" is completely useless; you should know that by now. Give us, at minimum, the message number and text.
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 408
Location: USA

PostPosted: Wed Oct 19, 2016 2:37 am    Post subject: Re: Problem in Running Query via JCL
Reply with quote

vickey_dw wrote:

Code:
//SYSPRINT DD  DSN=MYPS,DISP=SHR


Do you really want to use DISP=SHR ?

.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1818
Location: NY,USA

PostPosted: Wed Oct 19, 2016 3:06 am    Post subject:
Reply with quote

Your LRECL will be max up to 133 because of DSNTEP2 so why dn't you use DSNTIAUL and if you don't know then search on internet.
This link will help you; but make sure next time you do proper research and give us proper information about the error message.
http://ibmmainframes.com/about34492.html
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 -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Having a problem FTP'ng to the MF pahiker All Other Mainframe Topics 2 Fri Nov 10, 2017 8:20 pm
No new posts Query on IEFBR14 with GDG Ashishpanpaliya JCL & VSAM 3 Tue Nov 07, 2017 8:34 pm
No new posts Job is running with no response!!! Vignesh Sid DB2 3 Fri Oct 27, 2017 6:28 pm
No new posts Query on XMITIP abdulrafi All Other Mainframe Topics 1 Wed Oct 25, 2017 6:54 pm
No new posts HEX value search in a DB2 query maxsubrat DB2 2 Wed Oct 04, 2017 3:04 pm

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