Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

COBOL II Program Loop

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Lewish

New User


Joined: 23 Aug 2005
Posts: 2

PostPosted: Tue Aug 23, 2005 8:10 pm    Post subject: COBOL II Program Loop
Reply with quote

Program normally runs about 15 minutes. When a customer sends a bad input file, the program gets stuck in a loop. The program will run for over an hour, sometimes 2 hours, before someone in operations notices it's been running too long and cancels the job.

I want to be able to display the last customer that the program is processing when it gets stuck in a loop and than cause the program to abend fairly quickly, rather than 1 or 2 hours later.

The only way I know how to do this is to put a TIME limit in the JCL and then code a DISPLAY in the program to display every customer. Then when the time limit is reached, the program will abend and I will know what the last customer was.

However, by that time, I could have a HUGE amount of displays.

Is there a way to set the time limit inside the program so that when the time limit is reached, do one DISPLAY and then ABEND.

Thanks!
Back to top
View user's profile Send private message

priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Tue Aug 23, 2005 9:00 pm    Post subject: Re: COBOL II Program Loop
Reply with quote

Isn't it a better idea to put some validation checks for the data before processing, rather than running the job with bad data & waiting for TIME Abend.

Regards,

Priyesh.
Back to top
View user's profile Send private message
Lewish

New User


Joined: 23 Aug 2005
Posts: 2

PostPosted: Tue Aug 23, 2005 9:31 pm    Post subject: Re: COBOL II Program Loop
Reply with quote

Ideally, yes, coding edits would be the thing to do. However, this is a program written years ago and was originally only designed to handle one customer. Now it handles over 15 customers, each of which would have to have their own individual edits coded. To do this would require writing an new program. Because of limited resources, right now I have to work around the problem.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Wed Aug 24, 2005 7:57 am    Post subject:
Reply with quote

Since I don't know the details of the problem I'll throw out a few ideas:

1) JES has instream cmds that will abend the job when the stated SPOOL limit is exceeded.

2) I'd code a conditional DISPLAY checking for a recurrence of the key of the I/P recs read. Or some suspect field or other.

3) I would try wring the rec just read to an O/P file. After the job is stopped, look at the O/P file. That will tell you (maybe) icon_smile.gif what rec caused the prob and take it from there. I'd make a file of that rec and DISPLAY until I get dizzy.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us