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
 

 

Run DB2 Query without bind the program

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

New User


Joined: 23 Oct 2012
Posts: 4
Location: Arizona

PostPosted: Tue Oct 30, 2012 5:29 am    Post subject: Run DB2 Query without bind the program
Reply with quote

Hi All,

I have requirement where I have to pull the data from multiple table using one key value. We used to get close to 100000 Key vlaues which we are unable to run in spufi to get the data. So we have written a JCL to pull the data from table using the key value. We are unable to give the whole key value at one time(100,000) because job is not accepting everything at one time. So we are have created a many steps using the same query but where clause will have 400 key values. Is there any way to execute the query with all 100000 keys in one query and run the job. We are not suppose to bind the Cobol program in Production for this Adhoc request. We have tried Easytreive as well but I am getting a below error
"A system abend 0C4 reason code X'4' occurred in module EZTCOM program *EZSQLFU at offset X'6458'."

Could anyone please help me on this.

Thank you.
Back to top
View user's profile Send private message

Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Oct 30, 2012 2:42 pm    Post subject:
Reply with quote

With what you've posted - you're getting S0C4, which means 'protection exception' occurred. In other words, your program attempted to access a storage location that is protected (by storage keys) against the type of reference, and the PSW access key does not match the storage key -- i.e. you're trying to access a storage not defined to your program. So possibly, check why this happens.

Having said all that, have you tried executing your queries using DSNTIAUL?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Tue Oct 30, 2012 2:51 pm    Post subject: Reply to: Run DB2 Query without bind the program
Reply with quote

Quote:
We are not suppose to bind the Cobol program in Production for this Adhoc request.

icon_eek.gif

Write the program, test it in the <available> environment
after that tell the idiot who set the constraint to run it himself icon_cool.gif
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Tue Oct 30, 2012 3:24 pm    Post subject: Reply to: Run DB2 Query without bind the program
Reply with quote

Try Anuj's suggestion.

Do you mean "a Cobol program" rather than "the Cobol program" as in "we are not able to write a new Cobol program for this as we will not be able to implement an ad-hoc Cobol program which can access the production data"? However, it would be silly if you are not "allowed" to do it in Cobol, but you are "allowed" in Easytrieve.

Does your Easytrieve work with small amounts of data, or not at all?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Tue Oct 30, 2012 4:11 pm    Post subject:
Reply with quote

a much quicker execution would be achieved by dumping the table
and using a sort product to JOINKEYS.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Oct 30, 2012 9:41 pm    Post subject:
Reply with quote

Hello,

Or maybe loading the 100,000+ keys into another table and JOIN them?

Peresonally, i'd go for the unload and use the sort to JOINKEYS to do what you need.
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 IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts Why myself doing Package Bind always ... Susanta DB2 5 Thu Mar 02, 2017 10:47 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm


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