Joined: 07 May 2009 Posts: 3 Location: Hagerstown MD
What is the best way to detect a loop for a batch job? I believe that the no I/O should indicate this but then there are other issues.. and what about a write loop which would be very difficult to see?
Joined: 06 Jun 2008 Posts: 8211 Location: Dubuque, Iowa, USA
Loops may include I/O or not -- a program reading directly the same VSAM record over and over, or writing output to spool -- so the only reliable indicators are (1) CPU time limit is hit, no matter what it is set to, or (2) a debugger is used to watch the execution. A loop with a write will usually generate messages about the number of lines being exceeded but that is determined by the site, and the program may possibly fill the spool space up, but CPU time limit exceeded I have found to be the best red flag to look at what is going on. Sometimes the number of records can cause the CPU to be exceeded, but that's fairly rare.