View previous topic :: View next topic
|
Author |
Message |
onesegi Currently Banned New User
Joined: 11 Nov 2008 Posts: 3 Location: Chennai
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
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 |
|
Back to top |
|
|
onesegi Currently Banned New User
Joined: 11 Nov 2008 Posts: 3 Location: Chennai
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
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 |
|
Back to top |
|
|
onesegi Currently Banned New User
Joined: 11 Nov 2008 Posts: 3 Location: Chennai
|
|
|
|
Post removed for violating forum rules. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Well onesegi this will cost you dearly.
Goodbye. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
bhairon singh rathore
New User
Joined: 19 Jun 2008 Posts: 91 Location: banglore
|
|
|
|
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 |
|
|
|