Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Overwriting records with other records in file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Overwriting records with other records in file
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Fri Jan 08, 2010 1:20 pm    Post subject: Reply to: Overwriting records with other records in file
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    Post subject: Reply to: Overwriting records with other records in file
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Fri Jan 08, 2010 2:36 pm    Post subject: Reply to: Overwriting records with other records in file
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    Post subject: Re: Reply to: Overwriting records with other records in fil
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: 2433
Location: Netherlands, Amstelveen

PostPosted: Fri Jan 08, 2010 4:15 pm    Post subject:
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: 6967
Location: porcelain throne

PostPosted: Fri Jan 08, 2010 4:24 pm    Post subject:
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    Post subject:
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    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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us