Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Call Online from Batch

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
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    Post subject: Call Online from Batch
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

Site Director


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

PostPosted: Thu Jul 28, 2011 1:57 am    Post subject:
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    Post subject: Reply to: Call Online from Batch
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Jul 28, 2011 2:30 am    Post subject: Reply to: Call Online from Batch
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Thu Jul 28, 2011 4:23 am    Post subject: Re: Reply to: Call Online from Batch
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: 7906
Location: Bellevue, IA

PostPosted: Thu Jul 28, 2011 7:38 am    Post subject:
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

Site Director


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

PostPosted: Thu Jul 28, 2011 7:43 am    Post subject:
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    Post subject: Reply to: Call Online from Batch
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

Site Director


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

PostPosted: Fri Jul 29, 2011 1:11 am    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Fri Jul 29, 2011 4:37 am    Post subject: Re: Reply to: Call Online from Batch
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    Post subject:
Reply with quote

http://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    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
This topic is locked: you cannot edit posts or make replies. MIPS reduction for Batch job Virendra Shambharkar All Other Mainframe Topics 8 Mon Nov 07, 2016 4:02 pm
No new posts Cobol EZASOKET call to SETSOCKOPT fails Andi1982 COBOL Programming 6 Thu Oct 06, 2016 7:12 pm
No new posts Strange EXEC function call in z/VM Willy Jensen CLIST & REXX 3 Wed Oct 05, 2016 2:07 pm
No new posts DB2 Streaming Batch Processing Problem Manshadi DB2 4 Sat Sep 24, 2016 12:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us