IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Stored Procedure between java and mainframe


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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: 6966
Location: porcelain throne

PostPosted: Fri Oct 03, 2008 1:47 pm
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
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
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: 6966
Location: porcelain throne

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

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

Basic link is Use [URL] BBCode for External Links
where you can create your own searches.

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

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:

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

as well as the IBM developer works:

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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 3
No new posts Mainframe openings in Techmahnidra fo... Mainframe Jobs 0
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Using Java/C/C++ to retrieve dataset ... Java & MQSeries 6
No new posts building java class with zip4j.jar on... Java & MQSeries 0
Search our Forums:

Back to Top