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
 

 

Stored Procedure between java and mainframe

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

New User


Joined: 22 Aug 2007
Posts: 7
Location: Pune

PostPosted: Fri Oct 03, 2008 1:16 pm    Post subject: Stored Procedure between java and mainframe
Reply with quote

At outset, i want to test to use temp tables for interchange of data between java and mainframe. so, proceeding as follows.

Java declares a temp-table
Java calls the stored procedure
stored proc inserts the data to temp-table
Java reads the data from temp-table.

tried and is not working ?

( When java reads the temp table there is only the row that was inserted from java and the values inserted by Stored Proc are missing )

Can experts throw some light on this ?

Thanks
Siva...
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Oct 03, 2008 1:47 pm    Post subject:
Reply with quote

assuming that the SP is not getting any errors inserting rows to the temp table,
are you sure that the temp table that the SP addresses and the temp table that the JAVA thread is creating/reading are the same?

most of what I read about java and SP's is that the SP declares and opens a cursor and JAVA fetches the cursor - which implies some communication between JAVA via websphere/whatever and DB2.

I am nowhere an experience individual with this theme but If your java could create a table on the mainframe, why call an SP to populate it? The Java, could communicate directly with DB2 on the mainframe.

i realize I have asked more questions than you have, but there seems to be something missing in your communications with the mainframe.

Hopefully, someone who knows something about this can provide an answer for both of us.
Back to top
View user's profile Send private message
siva_marthala

New User


Joined: 22 Aug 2007
Posts: 7
Location: Pune

PostPosted: Fri Oct 03, 2008 2:16 pm    Post subject:
Reply with quote

Hi Dick,

Thanks for the prompt reply.

In my Stored Procedures, i have OPEN the cursor as output of the program and this Stored Proc is using to feed as input to a "screen" program ( java front end)

I am looking into the points you raised and will get in touch after Analysis.

Thanks
Siva...
Back to top
View user's profile Send private message
siva_marthala

New User


Joined: 22 Aug 2007
Posts: 7
Location: Pune

PostPosted: Fri Oct 03, 2008 4:18 pm    Post subject:
Reply with quote

dbzTHEdinosauer wrote:


most of what I read about java and SP's is that the SP declares and opens a cursor and JAVA fetches the cursor - which implies some communication between JAVA via websphere/whatever and DB2.



Hello Dick,

Can you provide me useful link (java and stored procedures)
I am looking an alternate / back up plan as below

Java calls the stored procedure
stored proc declares a temp-table
stored proc inserts the data to temp-table
Java reads the data from temp-table.


Thanks
Siva...
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Oct 03, 2008 4:42 pm    Post subject:
Reply with quote

IBM Redbooks are full of interesting things (some times even easier to read than the basic manuals.

Basic link is www.redbooks.ibm.com
where you can create your own searches.

below is a link (query is obvious) which returned several books, take your pick.

http://www.redbooks.ibm.com/redbooks.nsf/Redbooks?SearchView&Query=Java+and+Stored+Procedures&SearchMax=4999

Nice thing about Redbooks is that they have a lot of examples.

Another place to look is ibms system journals:

http://www.research.ibm.com/journal/sjt.html

as well as the IBM developer works:

http://www.ibm.com/developerworks/

would suggest that you register for your own ibm signon. it is worth it, costs nothing and provides access to things for which you need a sign-on.

I have found a lot of good code there.
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 Mainframe Opening in Chennai ( 2 to 4... muralikrishnan_new Mainframe Jobs 0 Tue Jul 18, 2017 2:20 pm
No new posts Identify top 30 big tables or indexes... ashek15 DB2 0 Fri Jun 16, 2017 10:01 am
No new posts SNMP trap from Mainframe bipinpeter Compuware & Other Tools 6 Wed Apr 26, 2017 3:05 pm
This topic is locked: you cannot edit posts or make replies. Mainframe Opening in Allianz India- T... Rajesh Gopinathan Mainframe Jobs 0 Wed Apr 19, 2017 11:33 am
No new posts FTP from Mainframe to Unix - with CRLF vasanthz All Other Mainframe Topics 7 Thu Mar 23, 2017 5:12 am


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