View previous topic :: View next topic
|
Author |
Message |
Anand Kumar
New User
Joined: 29 Aug 2007 Posts: 24 Location: chennai
|
|
|
|
Hi Experts,
We have an online program which needs to be triggered several times by a batch process. Please let me know if it is possilbe.
To be more precise: Is it possible to call an online program from a batch. After the online is executed, we need to get back the response.. is that possible? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Just curious - why does the batch process need to call an online process?
Why not simply do all that is needed in batch. . . |
|
Back to top |
|
|
Anand Kumar
New User
Joined: 29 Aug 2007 Posts: 24 Location: chennai
|
|
|
|
Hi Scherrer,
The work done by the online process is very huge and complicated. This online work needs to be done several times for a set of customers newly added. So we thought of writing a batch program to do the online proces for all of them.
writing a batch program to do all the work done by already existing online program is going to cost a lot of time instead of directly making use of this online module. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Review CICS EXCI and/or ECI.
EXCI = Low usage
ECI = More robust
What version of CICS are you using?
Bill |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
you could also use queues
which from batch would look like qsam files
and to cics would be queues that could trigger transactions.
That way you would also have recoverable restart......
IMUO,
this was the first mistake:
Quote: |
work done by the online process is very huge and complicated |
|
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Anand Kumar wrote: |
[...]
The work done by the online process is very huge and complicated. This online work needs to be done several times for a set of customers newly added. So we thought of writing a batch program to do the online proces for all of them.
writing a batch program to do all the work done by already existing online program is going to cost a lot of time instead of directly making use of this online module. |
You seem to be saying that you have already "added" customers to your data.
If so, it is late now to be thinking about how to process them, so I don't understand. Are they in some sort of "suspended" state, otherwise, if not yet set up correctly, you might be facing all sorts of POPS and BANGS? What would stop an innocent user changing one of these, then your batch comes along and finds (with or without noticing) a customer in a "partial" state? I hope you haven't really done that.
Do you really have "one huge and complicated program"? I also wonder whose bright idea that was.
Can you tell us more about the requirement?
Is it an ongoing thing, or a once-off (like taking on a bunch of customers from another company)?
You stress the need to get back a response to the batch. What are you thinking of there?
The more we know, the better advice we can give.
You already have two possibilities to research, maybe that's all you want. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
We have an online program which needs to be triggered several times by a batch process. Please let me know if it is possilbe. |
Yes, it is possible. However, the collected experience of the senior members on this forum leads us to advise against doing this. The "requirement" almost always comes from a faulty system design, and there can be any number of pitfalls with such an approach. Batch is batch, online is online, and rarely should the twain meet. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
The work done by the online process is very huge and complicated. |
OK (not a good idea, but if it already is - it is). How much interaction with cics does the actual "customer work" require? If it is "callable", i would think rather little cics interaction is needed.
Quote: |
writing a batch program to do all the work done by already existing online program is going to cost a lot of time instead of directly making use of this online module. |
Depending on how well (or poorly) this huge bunch of code is written, it should not be a case of lots of time to make the needed routine(s) callable by the batch job.
There is probably more that we don't understand as there has been little explanation provided. There is also the consideration that once someone or their group decides how they want to implement, they are often reluctant to consider alternatives. |
|
Back to top |
|
|
Anand Kumar
New User
Joined: 29 Aug 2007 Posts: 24 Location: chennai
|
|
|
|
Hi,
The online part is already an existing functionality. We are trying to solve it triggering the online part each time through MQ.
We are working on it...
Thanks a lot.. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
The online part is already an existing functionality. We are trying to solve it triggering the online part each time through MQ. |
We understand this. . .
You did not answer this:
"How much interaction with cics does the actual "customer work" require?"
Suggest you consider breaking out the actual "customer work" into a batch callable module and stay out of the online. . .
I realize that once someone has chosen a direction, they are quite often reluctant (or even completely refuse) to consider an alternative - even though the chosen direction may cause more problems that provide solutions. . . |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Anand Kumar wrote: |
[...]
The work done by the online process is very huge and complicated. This online work needs to be done several times for a set of customers newly added. So we thought of writing a batch program to do the online proces for all of them.
writing a batch program to do all the work done by already existing online program is going to cost a lot of time instead of directly making use of this online module. |
Although you are avoiding our questions and are steaming ahead anyway (direction known to Captain, but relying on a compass which is likely to be faulty) I'll have one more go.
You have a large and complex CICS program doing "very huge and complicated" work.
You have some take-on data which requires the processing carried out by the CICS program.
You want to save time/effort and reuse this CICS program from batch. To do this you are:
- increasing the complexity of your take-on work (requires CICS and batch, and communication between the two)
- increasing the complexity of your testing (requires CICS, with resetting everything to start-point, as well as the batch)
- increasing the complexity of your restart/rerun (which also needs to be tested)
- increasing the complexity of the take-on run (need all the stuff the same as for testing, rather than just a batch run)
- etc
Obviously I'm not being exhaustive above, it is just an outline.
The alternative is the original batch idea, so no more complexity there. The complexity comes with the huge CICS thing.
Unless the CICS thing was written by a moron, it should be possible to break it out into seperate modules without affecting the way the code interacts. Minimum of two modules (one for the CICS tecnical stuff and doing the basic data capture/maintenance, and one for the business stuff). Ideally more. I'd not be worried by 8 or 10. A module for each unit of business function. Smaller, more easy to understand, more easy to maintain, less chance of "side-effects", modules can be readily tossed away if no longer required, new modules can be easily plugged in.
Yes, it needs work. Ideally you'd later apply the work to the CICS program as well. That would need work. Analysis, design, programming. Simplify it, make it simple, keep it simple. Same for all the testing and implementation.
Is it more work to do it this way, or your way?
Oh well, when your Captain sails you into an iceberg, we'll be here, won't we? |
|
Back to top |
|
|
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 475
|
|
Back to top |
|
|
|