Page 1 of 1

Background transcation that start automatic with interval

PostPosted: Sat Apr 06, 2013 12:01 am
by astar01
How can I test Background transcation that start automatically with interval

Re: Background transcation that start automaticall with inte

PostPosted: Sat Apr 06, 2013 12:45 am
by dick scherrer
Hello and welcome to the forum,

Suggest you provide more complete info so we can help.

Background tasks (batch) are usually started via the system scheduling software.

Re: Background transcation that start automaticall with inte

PostPosted: Sat Apr 06, 2013 7:58 am
by astar01
Thanks a lot for the reply. I need to create the new transaction, that is a background transaction that it will restart itself every 5 mins. I understand that I will have START with Interval, but my question is how I will test it. Will I start it using CECI command or something else. I will also need to send MQ and e-mail from this transaction. I never did something like that. How should I do that and how to test it?
Thanks a lot!

Re: Background transcation that start automaticall with inte

PostPosted: Sat Apr 06, 2013 4:54 pm
by Robert Sample
You develop and test everything in the transaction running attached to a terminal. When you have everything working as it should, then you change the transaction to run as a background task and interval started. You then talk to your site support group about getting the transaction added to the CICS region PLT. PLT transactions get started during the CICS start up processing, so an interval started transaction running from the PLT will be executed automatically when the region comes up. However, you will need to develop a way to automatically check that your transaction does not abend; one way I've seen in the past is to have your transaction write a timestamp into a VSAM file and have a second (PLT-started) transaction start up and verify that the last timestamp in the VSAM file is within the acceptable time. This transaction also writes its timestamp into the VSAM file, and your transaction checks that timestamp. If either transaction determines that the timestamp is not within the acceptable time limit, it issues an EXEC CICS START TRANSACTION INTERVAL command to restart the other transaction. While not foolproof (if max tasks is reached, for example), this provides most of the needed recoverability for the transaction.

Re: Background transcation that start automaticall with inte

PostPosted: Sun Apr 07, 2013 8:46 am
by astar01
Thank you!