View previous topic :: View next topic |
Author |
Message |
Nila Beginner
Joined: 26 Dec 2002 Posts: 20 Topics: 8 Location: Chennai, India
|
Posted: Thu Jan 02, 2003 4:49 am Post subject: Solving Infinite loop in REXX.. |
|
|
Wish you all a very happy New Year..
How to control infinite loop problem in REXX.
Suppose if we are using some JCL code we can put TIME parameter in the jobcard itself. Is there any other way to control timing in REXX EXEC? _________________ Cheers Nila.. |
|
Back to top |
|
|
[bond] Beginner
Joined: 31 Dec 2002 Posts: 28 Topics: 6
|
Posted: Thu Jan 02, 2003 6:55 am Post subject: |
|
|
you could do well by taking care while coding the program ! ... hmmm ... if you want to control the time of execution then press attention key while the rexx program is executing and enter 'hi' afterwards. that will terminate it. |
|
Back to top |
|
|
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Thu Jan 02, 2003 7:22 am Post subject: |
|
|
Bond,
Your solution would apply for a foreground execution. HI, meaning, Halt Interpretation, would halt the interpretation. (REXX is generally executed in interpretative mode.)
Nila,
You must take care the case of an infinite loop in the program itself as Bond says. Yes, TIME parameter can be one way of controlling infinite loop problem. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
|
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Thu Jan 02, 2003 7:30 am Post subject: |
|
|
Nila,
Another thing that you could do is,
as the starting line in the body of the loop and code the same as the penultimate line in the body of line. Test the value of z as the last line in the body of loop to set a flag. You can use that flag to end the loop.
time('E') gives the elapsed time between two time('E') commands. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
|
Nila Beginner
Joined: 26 Dec 2002 Posts: 20 Topics: 8 Location: Chennai, India
|
Posted: Thu Jan 02, 2003 11:04 pm Post subject: |
|
|
Hi Cogito, Bond
Thank you for the responses.
Now I can control the infinite loop problem. _________________ Cheers Nila.. |
|
Back to top |
|
|
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Fri Jan 03, 2003 4:10 am Post subject: |
|
|
Same as in my earlier post.
Test the value of z; in a loop or in any part of the EXEC. If it is beyond the limit you have decided, then exit the EXEC. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
|
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Fri Jan 03, 2003 4:52 am Post subject: |
|
|
Ravi,
Honestly, I fail to understand your question. Could you kindly elaborate your requirement? Maybe, I could more info then. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
|
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Fri Jan 03, 2003 5:27 am Post subject: |
|
|
Ravi,
So, what you want to do is, limit the foreground execution time of a REXX EXEC. Am I right? IF yes, then testing the elapsed time is the only way I can think of.
Quote: | Is there any similar thing such that the time of exection can be restricted. i.e., before executing the acutal REXX program(pgm1) limit the time with some TSO command as EXECUTIL... |
Sorry, Ravi. But, I am at a loss. I do not unerstand it.
You are right when you say that a COBOL program executed via REXX wil be out of our control. Quote: | Where as in a JCL if the TIME exceeds the given cpu min's or seconds.. it abends with S322.. |
Here, you are not being fair! Because, you are comparing JCL (batch background) to foreground execution! _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
|
Premkumar Moderator
Joined: 28 Nov 2002 Posts: 77 Topics: 7 Location: Chennai, India
|
Posted: Fri Jan 03, 2003 5:44 am Post subject: |
|
|
Sorry, I believe there is no point in dragging further. |
|
Back to top |
|
|
|
|