IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Finding the Bad record in a file which caused the abend


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
harikiran2001

New User


Joined: 02 Jan 2008
Posts: 4
Location: bang

PostPosted: Thu Jan 03, 2008 9:04 pm
Reply with quote

Hello All,

Can any one please tell me how to find the bad record in a file, which is the cause for the job to abend. I want a solution ,something like i can find it in the abend aid.

Something like a the record number or something displayed in abendaid , with which i can strip off and rerun the job.

Yours help is greatly appreciated.

Thanks in advance,
Harikiran
Back to top
View user's profile Send private message
socker_dad

Active User


Joined: 05 Dec 2006
Posts: 177
Location: Seattle, WA

PostPosted: Fri Jan 04, 2008 1:08 am
Reply with quote

Well.......

No such utility I know exists. All you can do is hard work.

Was your job writing an output file? Then find the last good record written and start from there on your input file.

Was it an master file update program? Unless you are keeping some sort of program-internal checkpoints, you're screwed.

Was it a DB2 application with commit and rollback logic? Then you have other diagnosis opportunities.

Alas, all of these require effort on your part.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Fri Jan 04, 2008 1:39 am
Reply with quote

Should you be creating a corresponding output file (could be print), note that if it is not single-buffered, then the last record written will not correspond to the last input record properly processed.

Soccer's last point is important to many quesitons posed on this website - sometimes you must do it yourself. Study the program well enough to know where to put in some tracing. If you trace conditionally, then you can turn it off by setting the condition variable and leave the trace code in the program.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Jan 04, 2008 2:04 am
Reply with quote

I always put read/write counters in my pgms for this and other reasons. Though I display them at EOJ, at abend the cntrs cotain the rec cnts at that time.

If you don't know how to find them in a dump, put "cntrs*start"/"cntrs*end" literals before and after them in WS.
Back to top
View user's profile Send private message
rakesh17684

New User


Joined: 08 Oct 2006
Posts: 61
Location: San Diego

PostPosted: Tue Jan 08, 2008 3:46 pm
Reply with quote

Get the records into an Excel sheet and try analysing with the sheet or u can try out to get that records using some file processing lang( like easytrieve,etc.,.)
Hope it helps
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Tue Jan 08, 2008 6:11 pm
Reply with quote

Excel can't handle most files. It only holds 65000 rows. Why move the data to a PC when there are similar tools you can use on the mainframe?
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Tue Jan 08, 2008 6:25 pm
Reply with quote

I believe that Vista Excel allows at least double the 65K rows, but the point is the same - this is not a "dump to Excel" solution.

Jack - I like your approach - great idea.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Wed Jan 09, 2008 3:51 am
Reply with quote

Thanx Phil. icon_smile.gif
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Wed Jan 09, 2008 4:50 am
Reply with quote

Someone at our site wrote an Eztrieve that runs through a file checking for bad lengths.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Finding and researching jobs All Other Mainframe Topics 0
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top