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

Overwriting records with other records in file


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

New User


Joined: 11 Nov 2008
Posts: 3
Location: Chennai

PostPosted: Fri Jan 08, 2010 1:15 pm
Reply with quote

Hi
I m facing a strange problem while handling a huge file, My program reads from DB2 table and process into a internal array,specified in program then writes into output file. while writing it writes some records perfectly but at last some records are been overwritten by other records present in that file. this happens on same place repeatedly. I found everything perfect in code. But dont understand what is the problem.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Jan 08, 2010 1:20 pm
Reply with quote

Quote:
... found everything perfect in code ...

if it were so then You should not have any issue and the output file would be ... perfect

give the poor decription of the problem, the only thing that can be said is ...
how bad... let' s hope that Yo will be able to solve it soon icon_wink.gif
Back to top
View user's profile Send private message
onesegi
Currently Banned

New User


Joined: 11 Nov 2008
Posts: 3
Location: Chennai

PostPosted: Fri Jan 08, 2010 2:18 pm
Reply with quote

It looks like that everything is perfect in the code, But it is self explanatory that there must be something wrong. i doubt, problem occurs while passing value thru arrays define in the code. while debugging it shows every record to be written correctly.
But some how when I analyse written output file after 5000 records, overwriting happens for 4 lines, then for 56 line it gives correct output, again for 4 lines overwriting occurs and so on..
e.g
AB SELF EXPLANATORY 100025 CODE C
CD QR OVERLAPPING HAPPENS DATE
**spaces** QR OVERLAPPING HAPPENS DATE
**spaces******* QR OVERLAPPING HAPPENS DATE
**spaces************ QR OVERLAPPING HAPPENS DATE
DF ONEMUST LOOK INTO 45786966 C
QR OVERLAPPING HAPPENS DATE

Overlapping done on with record existing in the file.
File looks like this. i think this is understandable.
Thanks.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Jan 08, 2010 2:36 pm
Reply with quote

Your abuse of the perfect adjective is pretty stupid

we perfect understand, but since we are not perfect capable of perfect writing perfect code like You are
we cannot perfect give any perfect explanation
just a perfect friendly(perfect sarcastic) perfect advice to perfect fix Your perfect program

the only perfect thing that perfect emerges in Your perfect explanation of Your perfect issue is that You have some perfect good perfect records and some perfect wrong perfect records,
nothing perfect less nothing perfect more

with the info provided nobody will ever be able to provide you any useful info
but having written the program Yourself, and the repetitive 4/56 bad/good pattern
You should be able to debug the issue Yourself

unless naturally You are so taken by the contamplation of Your perfect program that You do not have any time to look at the possible errors

You asked for it icon_evil.gif
Back to top
View user's profile Send private message
onesegi
Currently Banned

New User


Joined: 11 Nov 2008
Posts: 3
Location: Chennai

PostPosted: Fri Jan 08, 2010 3:10 pm
Reply with quote

Post removed for violating forum rules.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri Jan 08, 2010 4:15 pm
Reply with quote

Well onesegi this will cost you dearly.
Goodbye.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Jan 08, 2010 4:24 pm
Reply with quote

onesegi,

you can not overwrite records in an output file.

what you are doing is improperly generating records.

if you would provide your working-storage definition of your table,
the code you use to populate the items,
and the code you use to create the output records from the table,
someone might take interest in helping you solve your problem.
Back to top
View user's profile Send private message
bhairon singh rathore

New User


Joined: 19 Jun 2008
Posts: 91
Location: banglore

PostPosted: Fri Jan 08, 2010 6:37 pm
Reply with quote

onesegi
Please check if number of record inserted in array is more than occurs clause defind in your program.

Check for SSRANGE and NOSSRANGE option
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 How to split large record length file... DFSORT/ICETOOL 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top