Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 33
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: 1746
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: 335
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: 1624
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 Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us