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

Invoke JCL through stored procedure


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
seema_285

New User


Joined: 14 Oct 2010
Posts: 13
Location: pune

PostPosted: Fri Feb 17, 2012 4:08 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Feb 17, 2012 8:50 pm
Reply with quote

you mentioned everything except db2. are you using db2 in this process?
if not, why the stored procedure?
Back to top
View user's profile Send private message
seema_285

New User


Joined: 14 Oct 2010
Posts: 13
Location: pune

PostPosted: Sat Feb 18, 2012 12:53 pm
Reply with quote

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
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Mon Feb 20, 2012 12:22 pm
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Mon Feb 20, 2012 7:39 pm
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Tue Feb 21, 2012 12:45 am
Reply with quote

Quote:
schedule a JCL

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
View user's profile Send private message
seema_285

New User


Joined: 14 Oct 2010
Posts: 13
Location: pune

PostPosted: Sat Jul 21, 2012 10:07 am
Reply with quote

Thanks all for your replies !!
I have coded the Stored procedure with MQ calls and successfully completed the requirement.
Back to top
View user's profile Send private message
Peter Nancollis

New User


Joined: 15 Mar 2011
Posts: 47
Location: UK

PostPosted: Sun Jul 22, 2012 5:19 am
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Sun Jul 22, 2012 10:35 am
Reply with quote

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
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 Invoke stored procedure via batch JCL. DB2 2
No new posts Calling COBOL DB2 program from a COBO... COBOL Programming 2
No new posts Cond parameter and Rc code of a proce... JCL & VSAM 5
No new posts Invoke IMS transaction from .NET IMS DB/DC 1
This topic is locked: you cannot edit posts or make replies. Internal Autonomous Stored Procedure ... DB2 6
Search our Forums:

Back to Top