Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Extract data from n DB2 Views automaticaly

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
esmeraldo

New User


Joined: 12 Nov 2008
Posts: 3
Location: Brasil

PostPosted: Wed Nov 13, 2019 12:32 am    Post subject: Extract data from n DB2 Views automaticaly
Reply with quote

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

sergeyken

Active Member


Joined: 29 Apr 2008
Posts: 632
Location: Maryland

PostPosted: Wed Nov 13, 2019 2:04 am    Post subject:
Reply with quote

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

New User


Joined: 12 Nov 2008
Posts: 3
Location: Brasil

PostPosted: Wed Nov 13, 2019 7:58 pm    Post subject:
Reply with quote

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

Active Member


Joined: 29 Apr 2008
Posts: 632
Location: Maryland

PostPosted: Wed Nov 13, 2019 8:10 pm    Post subject:
Reply with quote

esmeraldo wrote:
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.

How to submit a job from cobol

Can we submit a JCL and get the return code in COBOL?
Back to top
View user's profile Send private message
sergeyken

Active Member


Joined: 29 Apr 2008
Posts: 632
Location: Maryland

PostPosted: Wed Nov 13, 2019 8:40 pm    Post subject:
Reply with quote

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

New User


Joined: 12 Nov 2008
Posts: 3
Location: Brasil

PostPosted: Tue Nov 19, 2019 8:56 pm    Post subject:
Reply with quote

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! icon_biggrin.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Load Module compare showing mismatche... Aditya.Srivastava PL/I & Assembler 3 Tue Dec 10, 2019 8:26 pm
No new posts Identifying Packed Decimal data in a ... sojivarkey TSO/ISPF 4 Sat Dec 07, 2019 5:36 am
No new posts Reading the CSV data in COBOL and mov... wik123 COBOL Programming 4 Tue Dec 03, 2019 5:13 pm
No new posts adrdssu for copy all data robyjhl JCL & VSAM 5 Tue Nov 12, 2019 11:17 pm
No new posts Convert mainframe data to .csv format... karan_reddy DFSORT/ICETOOL 10 Sat Nov 02, 2019 2:09 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us