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

Call Online from Batch


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Anand Kumar

New User


Joined: 29 Aug 2007
Posts: 24
Location: chennai

PostPosted: Thu Jul 28, 2011 1:12 am
Reply with quote

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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jul 28, 2011 1:57 am
Reply with quote

Hello,

Just curious - why does the batch process need to call an online process?

Why not simply do all that is needed in batch. . . icon_confused.gif
Back to top
View user's profile Send private message
Anand Kumar

New User


Joined: 29 Aug 2007
Posts: 24
Location: chennai

PostPosted: Thu Jul 28, 2011 2:05 am
Reply with quote

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

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu Jul 28, 2011 2:30 am
Reply with quote

Review CICS EXCI and/or ECI.

EXCI = Low usage

ECI = More robust

What version of CICS are you using?

Bill
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Jul 28, 2011 3:02 am
Reply with quote

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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Jul 28, 2011 4:23 am
Reply with quote

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

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Jul 28, 2011 7:38 am
Reply with quote

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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jul 28, 2011 7:43 am
Reply with quote

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

New User


Joined: 29 Aug 2007
Posts: 24
Location: chennai

PostPosted: Fri Jul 29, 2011 1:04 am
Reply with quote

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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Jul 29, 2011 1:11 am
Reply with quote

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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Jul 29, 2011 4:37 am
Reply with quote

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:


  1. increasing the complexity of your take-on work (requires CICS and batch, and communication between the two)
  2. increasing the complexity of your testing (requires CICS, with resetting everything to start-point, as well as the batch)
  3. increasing the complexity of your restart/rerun (which also needs to be tested)
  4. increasing the complexity of the take-on run (need all the stuff the same as for testing, rather than just a batch run)
  5. 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
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Sat Jul 30, 2011 12:51 am
Reply with quote

cicswiki.org/cicswiki1/index.php?title=How_do_I_interact_with_a_transaction_from_a_batch_program%3F
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 -> CICS

 


Similar Topics
Topic Forum Replies
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Help in Automating Batch JCL jobs mon... JCL & VSAM 3
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Call program, directly from panel CLIST & REXX 9
Search our Forums:

Back to Top