View previous topic :: View next topic
|
Author |
Message |
seema_285
New User
Joined: 14 Oct 2010 Posts: 13 Location: pune
|
|
|
|
Hi All,
It is my first experience of working on stored procedure and MQs. I have gone through the some of the basics of both of them.
As per my one of the appraoch for requirement, I have to store the stored procedure input to a Message Queue of predecided depth and once the depth is reached I have to unload that queue to a flat file and transfer that file to vendor.
Basically Vendor1 is sending some real time data (through a web service which will invoke my stored proocedure) to me which I have to pass as it is to Vendor2.
As the Vendor2 does not support real time data processing, I have to transfer the real time data to Vendor2 through batch processing.
I want the your iputs on my below concerns:
1. Is it possible to store the stored procedure input to a queue using MQ put calls within stored procedure? what will the type load module so formed? What will be there extra prameters to be defined in stored procedure definition?
2. how can be this achieved - If we enable the triggering of the queue by deciding a depth parameter, once the depth is reached it shud unload it to a flat file.
3. Also, I wanted to know whether it is possible to invoke JCL through stored procedure? My JCL will be contining MQS2FILE utility to unload a queue into flat file in one step and NDM that flat file to vendor in second step. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
you mentioned everything except db2. are you using db2 in this process?
if not, why the stored procedure? |
|
Back to top |
|
|
seema_285
New User
Joined: 14 Oct 2010 Posts: 13 Location: pune
|
|
|
|
I am sorry. MY mistake..!!
Yes I am using DB2. I need to code db2 stored procedure.
Please provide inputs on above concerns.
Thanks in advance. |
|
Back to top |
|
|
gylbharat
Active Member
Joined: 31 Jul 2009 Posts: 565 Location: Bangalore
|
|
|
|
You can write a cobol stored procedure.... to put data onto MQ message...
Not sure if through cobol we can unload data of a queue to a flat file...
Once the file is ready it can be FTP (Sent) to vender2. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
As per my knowledge, SPs supports MQ. VSAM. But I sugges not to go with them, you can write a real time data to any one DB2 table in the SP and then eventually when market closes scedule a JCL which then will do unload of that table and henceforth do the FTP..:-) |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Probably better off scheduling a batch job and not a 'Job Control Language' as the latter just does not make sense when you spell it out like that. |
|
Back to top |
|
|
seema_285
New User
Joined: 14 Oct 2010 Posts: 13 Location: pune
|
|
|
|
Thanks all for your replies !!
I have coded the Stored procedure with MQ calls and successfully completed the requirement. |
|
Back to top |
|
|
Peter Nancollis
New User
Joined: 15 Mar 2011 Posts: 47 Location: UK
|
|
|
|
Hmmmm - sorry folks... wtf was that ?
<rhetorical>
Recognised all the words and concepts ..but not the problem/solution
..but probably just me
</> |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
If you look at the dates when the thread was started and the one before your post -- they are from the same poster, with a difference of nearly 5 months. Perhaps, it worked now, since when it was posted.
I'm not sure about the solution, perhaps that's too descriptive to be explained via a Forum, however, this seems to be the problem statement:
Quote: |
Is it possible to store the stored procedure input to a queue using MQ put calls within stored procedure? |
|
|
Back to top |
|
|
|