MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Invoking IMS Transactions from DB2 Stored Procedure
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
rs_naveen
Beginner


Joined: 29 Jul 2005
Posts: 18
Topics: 4

PostPosted: Fri Jul 29, 2005 1:28 am    Post subject: Invoking IMS Transactions from DB2 Stored Procedure Reply with quote

Can anyone tell how we can invoke IMS Transactions from DB2 Stored Procedure written in COBOL?

Is it possible through EXCI?


Can anyone please help in this regard. If you can give me sample code, then that would be useful.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Fri Jul 29, 2005 5:58 am    Post subject: Reply with quote

rs_naveen,

Check out chapter 8 in the following red book which explains in detail about accessing IMS from a stored procedure.

http://www.redbooks.ibm.com/redbooks/pdfs/sg245485.pdf

Hope this helps...

Cheers

Kolusu

PS: Avoid putting "urgent" in your topics.
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
rs_naveen
Beginner


Joined: 29 Jul 2005
Posts: 18
Topics: 4

PostPosted: Fri Jul 29, 2005 9:09 am    Post subject: Reply with quote

Thanks for the reply. But for the OTMA C/I which is used to invoke IMS Transactions, I didnt find any details that can be implemented in COBOL. I found API's used in Java,C only. If you get any additional information, please help me.

Regards,
Naveen
Back to top
View user's profile Send private message
rs_naveen
Beginner


Joined: 29 Jul 2005
Posts: 18
Topics: 4

PostPosted: Fri Jul 29, 2005 9:13 am    Post subject: Reply with quote

Can we use ODBA to call Ims Transactions? I am in doubt.
Back to top
View user's profile Send private message
schintala
Beginner


Joined: 18 May 2005
Posts: 108
Topics: 31
Location: USA

PostPosted: Fri Jul 29, 2005 10:28 am    Post subject: Reply with quote

We can verywell use ODBA to access the IMS data from a DB2 stored procedure. Prior to do that we need to setup ODBA and the IMS libs like ACBLIB etc. In our shop we acess IMS data through DB2 stored procedure for Java web enabled applications.
Back to top
View user's profile Send private message
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Fri Jul 29, 2005 10:29 am    Post subject: Reply with quote

I don't think that you can access the message queues using ODBA so you will not be able to access any transactions. The red book "Getting Started with DB2 Stored Procedures" explains how to access IMS/TM using APPC.
Back to top
View user's profile Send private message
rs_naveen
Beginner


Joined: 29 Jul 2005
Posts: 18
Topics: 4

PostPosted: Mon Aug 01, 2005 2:02 am    Post subject: Reply with quote

Hi,
Thanks Bithead. I got some more info from that document. Can anyone give information regarding "HOW DSNAIMS Works?". Also the source code of dsnaims, if possible, so that, we can write the same functionality in COBOL to invoke IMS Transactions, without calling DSNAIMS.
Back to top
View user's profile Send private message
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Mon Aug 01, 2005 9:20 am    Post subject: Reply with quote

We use IMS connect rather than DSNAIMS but I took a look at the documentation.

This is a stored procedure so you just need to call it from your stored procedure. The documentation recommends that you run this stored procedure in it's own WLM address space for performance reasons. You will need IMS OTMA configured which involves setting up Cross-System Coupling datasets (XCF) - this is an MVS Sys. Prog. function. Once XCF is configured, you should be able to plug in the rest of the parameters.

Here is the url I used:

http://publib.boulder.ibm.com/infocenter/dzichelp/index.jsp?topic=/com.ibm.db2.doc.admin/bjndmstr1092.htm
Back to top
View user's profile Send private message
rs_naveen
Beginner


Joined: 29 Jul 2005
Posts: 18
Topics: 4

PostPosted: Mon Aug 01, 2005 11:24 pm    Post subject: Reply with quote

Thanx Bithead. But How u use IMS Connect from DB2 Stored Procedure? I didnt get the proper Source code to implement it.I actually need an alternative to invoke IMS Programs(existing) rather than DSNAIMS. If I am not getting any other method, I will have to use DSNAIMS. This is the case. Can u help me in this regard.
Back to top
View user's profile Send private message
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Tue Aug 02, 2005 7:42 am    Post subject: Reply with quote

If you are using DSNAIMS then you don't need IMS Connect - the stored procedure communicates directly with OTMA which is part of IMS TM. IMS Connect is just a "listener" that waits for traffic from an external source and then communicates with OTMA.

I would strongly recommend using supplied code to access OTMA as this will format the OTMA headers for you and these have changed in different versions of IMS.

If you need to create an OTMA clinet from scratch, take a look at the Open Transaction Manager Access Guide and Reference.

If you need information on using APPC, see the Adminstration Guide: Transaction Manager.

Remember that any solution that you develop requires synchronized commit and backout functionality.
Back to top
View user's profile Send private message
rs_naveen
Beginner


Joined: 29 Jul 2005
Posts: 18
Topics: 4

PostPosted: Tue Aug 02, 2005 10:29 am    Post subject: Reply with quote

Thanks Bithead. Do you think we can access IMS DC Transaction using DSNAIMS. Because when we talked to some guys, they are telling it is used for DB only. Can u please give me your view.
Back to top
View user's profile Send private message
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Tue Aug 02, 2005 11:13 am    Post subject: Reply with quote

Here is the documentation from the link I gave you:

"DSNAIMS is a stored procedure that allows DB2 applications to invoke IMS transactions"
Back to top
View user's profile Send private message
rs_naveen
Beginner


Joined: 29 Jul 2005
Posts: 18
Topics: 4

PostPosted: Wed Aug 03, 2005 11:54 am    Post subject: Reply with quote

Hi Bithead, Thanks for your information. You have any sample code regarding invoking IMS through APPC from DB2 SP. Can we use normal APPC Commands like CMSEND? Also any prerequisites for that.
If possible, can you give me the details regarding how we can implement it? I searched a lot in documents. I didnt get Code regarding that. If you can give idea about how we can implement it, then it will be helpful. I am also trying on this

Regards
Naveen
Back to top
View user's profile Send private message
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Wed Aug 03, 2005 1:12 pm    Post subject: Reply with quote

Check out the Redbook "Getting Started With DB2 Stored Procedures" on IBMs web site. There is a link for additional material. Download sg244693.exe to your PC. Bring up a DOS prompt and type in "sg244693.exe c:\???? /d" where ???? is the destination directory. It will create a directory called MVS. Download the file SOURCE.UNL to the mainframe from this directory using binary mode, RECFM=FB, LRECL=80, BLKSIZE=3200. Then go to option 6 and type "RECEIVE INDA(????)" where ???? is the filename on the mainframe. At the prompt, press enter. This will create a PDS called ????.DDNAME.In (In my case it was my userid). Look for member IMDBMS. It has the APPC calls in it. Information about the program is in the Redbook.

Good luck!
Back to top
View user's profile Send private message
rs_naveen
Beginner


Joined: 29 Jul 2005
Posts: 18
Topics: 4

PostPosted: Thu Aug 04, 2005 12:16 am    Post subject: Reply with quote

Thanks a lot Bithead. It was a very useful help from you. Regarding APPC, to implement in SP, do we need to have anything specified in WLM environment? Any environment set up required to do that like link-edit parameters etc?

Regards
Naveen
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group