View previous topic :: View next topic
|
Author |
Message |
shreya19
New User
Joined: 13 Mar 2014 Posts: 34 Location: USA
|
|
|
|
Hi,
I have a COBOL program which generates 2 byte sequence numbers and writes to a file.
It basically adds only sequence numbers to already existing file.
In roughly 1 in 30 runs, it generates spaces instead of proper sequence in one of the rows. I tried with same input data and parms. Unable to find out the cause for this random behaviour. Any leads would be appreciated |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
With the limited information available, I suspect table overflow. You might want to turn on the subscript range checking for a few runs to determine if it is the problem. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3075 Location: NYC,USA
|
|
|
|
Two things -
1. Add proper displays and rerun to see the pattern of the path it takes to executes the code and find the bug.
2. If you can’t reproduce then have proper displays i the code before it happens again to know the cause.
Point #1 would help you to solve though. |
|
Back to top |
|
|
shreya19
New User
Joined: 13 Mar 2014 Posts: 34 Location: USA
|
|
|
|
I tried adding multiple displays.
The record just before Rewrite statement has the correct sequence number. However, the file has it missing.
File is opened in I-O mode, recording mode is V |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2120 Location: USA
|
|
|
|
shreya19 wrote: |
I tried adding multiple displays.
The record just before Rewrite statement has the correct sequence number. However, the file has it missing.
File is opened in I-O mode, recording mode is V |
If you really want some help or advice, please present the exact examples of your code, and data.
Otherwise it sounds like:
Quote: |
I do everything right, but the result is wrong.
Please help me to fix my problem! |
|
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1312 Location: Vilnius, Lithuania
|
|
|
|
Use Debug Tool, and single-step through your code. |
|
Back to top |
|
|
|