View previous topic :: View next topic |
Author |
Message |
rs_naveen Beginner
Joined: 29 Jul 2005 Posts: 18 Topics: 4
|
Posted: Fri Jul 29, 2005 1:28 am Post subject: Invoking IMS Transactions from DB2 Stored Procedure |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
rs_naveen Beginner
Joined: 29 Jul 2005 Posts: 18 Topics: 4
|
Posted: Fri Jul 29, 2005 9:09 am Post subject: |
|
|
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 |
|
|
rs_naveen Beginner
Joined: 29 Jul 2005 Posts: 18 Topics: 4
|
Posted: Fri Jul 29, 2005 9:13 am Post subject: |
|
|
Can we use ODBA to call Ims Transactions? I am in doubt. |
|
Back to top |
|
|
schintala Beginner
Joined: 18 May 2005 Posts: 108 Topics: 31 Location: USA
|
Posted: Fri Jul 29, 2005 10:28 am Post subject: |
|
|
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 |
|
|
Bithead Advanced
Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Fri Jul 29, 2005 10:29 am Post subject: |
|
|
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 |
|
|
rs_naveen Beginner
Joined: 29 Jul 2005 Posts: 18 Topics: 4
|
Posted: Mon Aug 01, 2005 2:02 am Post subject: |
|
|
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 |
|
|
Bithead Advanced
Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Mon Aug 01, 2005 9:20 am Post subject: |
|
|
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 |
|
|
rs_naveen Beginner
Joined: 29 Jul 2005 Posts: 18 Topics: 4
|
Posted: Mon Aug 01, 2005 11:24 pm Post subject: |
|
|
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 |
|
|
Bithead Advanced
Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Tue Aug 02, 2005 7:42 am Post subject: |
|
|
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 |
|
|
rs_naveen Beginner
Joined: 29 Jul 2005 Posts: 18 Topics: 4
|
Posted: Tue Aug 02, 2005 10:29 am Post subject: |
|
|
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 |
|
|
Bithead Advanced
Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Tue Aug 02, 2005 11:13 am Post subject: |
|
|
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 |
|
|
rs_naveen Beginner
Joined: 29 Jul 2005 Posts: 18 Topics: 4
|
Posted: Wed Aug 03, 2005 11:54 am Post subject: |
|
|
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 |
|
|
Bithead Advanced
Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Wed Aug 03, 2005 1:12 pm Post subject: |
|
|
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 |
|
|
rs_naveen Beginner
Joined: 29 Jul 2005 Posts: 18 Topics: 4
|
Posted: Thu Aug 04, 2005 12:16 am Post subject: |
|
|
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 |
|
|
|
|