MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Infinite loop

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
whizkid79
Beginner


Joined: 29 Sep 2004
Posts: 53
Topics: 14

PostPosted: Fri May 27, 2005 8:21 am    Post subject: Infinite loop Reply with quote

Hi,

I have an interview qn:

A program is of 5k lines of code... some where in the program it is going into loop for some records. How can we find the exact location of the program where it is going in the loop, With out putting the program in the Xpedetor and display statments in the program?

Note: The input file has millions of records

I did do a search on this topic but couldnt find one.

Thanks,
Whizkid79
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Fri May 27, 2005 8:50 am    Post subject: Reply with quote

Quote:

How can we find the exact location of the program where it is going in the loop, With out putting the program in the Xpedetor and display statments in the program?


Whizkid79,

Answer : Line no: 2336

If the interviewer tells that the answer is wrong , then ask him to prove that your answer is wrong which obvisouly he cannot.

I had this arguement with my brother about counting stars. He would randomly say a number and I like an idiot would start counting them to prove him wrong. I realized that after I counted more than 2000 stars.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dtf
Beginner


Joined: 10 Dec 2004
Posts: 110
Topics: 8
Location: Colorado USA

PostPosted: Fri May 27, 2005 1:27 pm    Post subject: Reply with quote

You may be able to narrow it down under certain circumstances by watching it execute in SDSF, and when you notice that the program is no longer performing I/O, (EXCP count is not increasing), cancel it with a dump. Then you would solve the dump to determine where you are in the program logic.

This has sometimes worked for me in the past, but is certainly not fullproof. It would not work in an instance where I/O is being done within the set of instructions that are in the "loop".

The fact that the question says the "EXACT" location, says to me that the question really cannot be answered. If I were as the question I would tell the interviewer that, and then proceed to tell him how I would "attempt" to narrow it down, and why that may or may not work.
________
Autozam Scrum


Last edited by dtf on Tue Feb 01, 2011 1:55 pm; edited 1 time in total
Back to top
View user's profile Send private message
slade
Intermediate


Joined: 07 Feb 2003
Posts: 266
Topics: 1
Location: Edison, NJ USA

PostPosted: Mon May 30, 2005 4:41 pm    Post subject: Reply with quote

The problem with these exercises is that the poser of the ques can say at any point, "No, you can't do that either".

Anyway, you can get the I/P rec involved in the loop and the one before and after. Create a file of those 3 and see if you can recreate the prob.

If you do, take a look at the recs an try to determine the difference(s) between the middle rec and the other 2. That may point you to the problem area of the code or pinpoint a flaw in the data, or both.

Come to think of it, you may even want to skip rerunning the app.
_________________
Regards, Jack.

"A problem well stated is a problem half solved" -- Charles F. Kettering
Back to top
View user's profile Send private message
slade
Intermediate


Joined: 07 Feb 2003
Posts: 266
Topics: 1
Location: Edison, NJ USA

PostPosted: Mon May 30, 2005 4:46 pm    Post subject: Reply with quote

P.S.

With only 3 I/P recs they may even allow you to test w/EXPED and displays. Wink
_________________
Regards, Jack.

"A problem well stated is a problem half solved" -- Charles F. Kettering
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group