View previous topic :: View next topic
|
Author |
Message |
esmeraldo
New User
Joined: 12 Nov 2008 Posts: 3 Location: Brasil
|
|
|
|
Hello guys,
I have a demand that I don't know how to do, and searching the web gave me ideas, but not solutions. I hope you can help.
As I do not know how to solve this, this forum category seems appropriated.
I have a list of DB2 views, that I will get in a Cobol program, on a mainframe environment. I need to run a SELECT * FROM <view>, for each one of this views, and save the result in datasets. But I need them to run at the same time, in separated jobs, for timing purposes. And I need them to run in Control-M.
I don't know how many views there are.
I heard that there is a way to trigger jobs in Control-M from a Cobol program. If so, is there a way to send parameters to those jobs? I thought in having a job with an UNLOAD, but I would need to send symbolics parameters to determine the dataset name with the SQL.
And I thought about using MQSERIES, with each message triggering a job. Can MQSERIES send the message as parameter to the triggered job?
Anyway, does anyone have any ideas of how I can solve this?
Thanks in advance,
Alexandre |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2018 Location: USA
|
|
|
|
This can be used - separate COBOL programs running in parallel jobs, controlled by CONTROL-M, or whatever else.
In order to only unload the views into datasets usually no specific COBOL code is needed (unless there is other specific processing to be done). Standard utilities, like INZUTILB, are able to do unload existing views as well, when invoked from parallel jobs controlled in the same manner. |
|
Back to top |
|
|
esmeraldo
New User
Joined: 12 Nov 2008 Posts: 3 Location: Brasil
|
|
|
|
It can't be done on Cobol, basically for 2 reasons:
1) I don't know how many views will need to run. The user can create a view today, and tomorrow it needs to run. It should be something automatic, and compiling a new program for each new view is not an option.
2) I can't use dynamic SQL in Cobol, as the support team does not allow it.
I already have a tool to extract the data from the Views, reading the SQL from a dataset. I just need to start many jobs with this tool, just choosing the dataset for each one. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2018 Location: USA
|
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2018 Location: USA
|
|
|
|
P.S.
The topic title - "Extract data from n DB2 Views automatically", as well as the chosen forum - "All Other Mainframe Topics" - are both misleading, because both of them have nothing to do with the issue under question: "How to automatically submit JCL from a COBOL (or any other) code?" |
|
Back to top |
|
|
esmeraldo
New User
Joined: 12 Nov 2008 Posts: 3 Location: Brasil
|
|
|
|
sergeyken wrote: |
P.S.
The topic title - "Extract data from n DB2 Views automatically", as well as the chosen forum - "All Other Mainframe Topics" - are both misleading, because both of them have nothing to do with the issue under question: "How to automatically submit JCL from a COBOL (or any other) code?" |
It does not need to be a Cobol program submitting a job, it is just one possibility. Another suggestions would be appreciated.
Also, I believe I cannot use INTRDR, as I need to trigger a job in Control-M. Can it do that?
Anyway, support team provided me with an internal solution. Basically, a CICS Cobol program will do the job.
Thanks for all the help! |
|
Back to top |
|
|
|