Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us