View previous topic :: View next topic |
Author |
Message |
Jeba Beginner

Joined: 02 Dec 2002 Posts: 48 Topics: 9 Location: Columbus, GA
|
Posted: Tue Mar 11, 2003 10:09 am Post subject: How to identify TIMEOUT for a Link command ? |
|
|
Hai all,
Is there any option in LINK or Call to know that the called/linked program is not completed within a particular period of time.
We have a requirement to do an alternate process if the called/linked program (Third party program ) is not completed within the specified time.
Your help is very much appreciated. _________________ Thanks,
Jeba
(Known is a drop Unknown is an ocean) |
|
Back to top |
|
 |
Dibakar Advanced

Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Wed Mar 26, 2003 5:49 am Post subject: |
|
|
Hi Jeba,
Did you solve the problem?
My guess is that since LINK/Call etc are to pass control to another program so theres no way to come back unless called program returns back the control.
If it can be done by batch job then there maybe a wayout.
If you execute PROGA (which calls PROGB) in STEPA of your JCL then you might split PROGA into PROG1 and PROG2 and STEPA into STEP1, STEPB and STEP2.
Now STEP1 will execute PROG1, STEPB will execite PROGB with TIME option and STEP2 will execute PROG2. With properly designed input/output for PROG1 and PROG2 this might work.
Don't know how this approach can be applied to online programs but my guess is STEPB can be replaced by a START and TIME by a DELAY.
Diba. |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Wed Mar 26, 2003 9:11 am Post subject: |
|
|
The way to do this is to attach another task with a timer and if that timer pops before the routine comes back, you've exceeded your limits. The tricky part is insuring that you can kill that task if the program does finish on time. In other words, it may not be best to just sleep for the specified amount of time. I'm not sure about that though. You want to avoid an A03 abend (attached task not completed before main task ends).
This actually implies that you have attached, rather than linked the timed program because as Dibakar indicated, link will cause your main task to run the program and you will not be able to check anything if you are not in control. |
|
Back to top |
|
 |
Jeba Beginner

Joined: 02 Dec 2002 Posts: 48 Topics: 9 Location: Columbus, GA
|
Posted: Fri Mar 28, 2003 5:08 pm Post subject: |
|
|
Dibakar and semigeezer,
Thanks for your responses. I am planning to start a new transaction before the Link command and the new transaction will check the output of the linked program after some specified delay time. If there is no output until that time, I will do the alternate process. _________________ Thanks,
Jeba
(Known is a drop Unknown is an ocean) |
|
Back to top |
|
 |
vallishar Beginner

Joined: 17 Dec 2002 Posts: 53 Topics: 14 Location: BengaLuru
|
Posted: Sat Mar 29, 2003 1:23 pm Post subject: |
|
|
Jeba,
Could you please explain how would u be doing it?
Assuming the following code in PROGA :
Code: |
Perform PARA-1
Start Transacation-2
Call ProgB
Perform PARA-2
|
Is this the situation which you are dealing with?
Diba,
The solution you have suggested would be suitable when the processing of program PROGB has no impact on the execution of PROGA. Is there any other way if the processing of PROGA is dependent on the response from PROGB  _________________ If you're not failing every now and again, it's a sign you're not doing anything very innovative. |
|
Back to top |
|
 |
Dibakar Advanced

Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Mon Mar 31, 2003 4:44 am Post subject: |
|
|
vallishar,
I don't have experience with CICS so somebody else will have to answer you but I don't understand how you differ from Jeba's requirement -
Quote: |
We have a requirement to do an alternate process if the called/linked program (Third party program ) is not completed within the specified time.
|
Diba. |
|
Back to top |
|
 |
|
|