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

Header also displayed after every 1000 records


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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Feb 17, 2012 3:39 pm
Reply with quote

and ...
Quote:
Mainframe Skills: BEGINNER,8 MONTHS OF MAINFRAME EXPERIENCE,KNOWLEDGE IN COBOL,JCL AND IDMS

but an expert in self esteem and I am better than thou attitude icon_evil.gif
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Fri Feb 17, 2012 6:42 pm
Reply with quote

athulvijay wrote:
This info was a real help. It is the problem with default beffer size.
No, it is NOT. You are not listening to the advice you have been given.

Here's another bit of advice that I am sure you will ignore: STRING is not the same as MOVE. An alphanumeric MOVE pads the receiving field with spaces; STRING does not.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Feb 17, 2012 8:49 pm
Reply with quote

If you refuse to find out what the problem is yourself, and refuse to let anyone see your code, all I can suggest is this: settle on a particular blocksize. Calculate how many records your glitch-free code can write before somehow causing an error. Make a new version of your program, which takes a parameter. In the parameter, tell your program how many records to read before it starts writing. Write the number-of-records-calculated minus one. Close up and stop. Execute the program, with different parameters each time, until your input is processed. Concatenate the output files as input to the next task.

If you don't fancy that, show us the code that you think is relevant, and any other code that we ask for, and answer any questions we ask. Show us your compile options.

Or, sort it out yourself. But you can't, becuase you don't accept the possibility that the error can be yours. So, go back to the above, or discover a business reason for a smaller input file.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sat Feb 18, 2012 6:22 am
Reply with quote

From an earlier comment, no, I can't really think of a normal way to do anything too clever with Cobol writing a sequential fixed-length file.

The record shown is not a complete header. It means that the "header" data was either put there, sourced from the normal fields, or not all the data in the record-area was overwritten.

Don's point about the STRING could be relevant, but the TS has already failed to provide the code for the creation of the data records on the file as requested. If using STRING to create the data records, I also suspect the problem will be there. Reference-modification would be the other lazy way to possibly screw it up.

It is probably no co-incidence that the single data record shown has hyphens in the positions that are alleged to be part of the header on the record prior to it.

It is possible that TS feels he is initialising the record, but is not. If using STRING or reference modification only to populate, the defintion could be this:

Code:
01  backout-record.
    05  filler pic x(128).


In which case the INITIALIZE will do diddly-squat.

Perhaps the "header" data is in fields defined as FILLER.

To my mind INITIALIZE is a horrible, lazy thing, invented for people who couldn't code an initialisation of a table correctly. What would have been wrong with

Code:
MOVE SPACE TO backout-record


Extra typing? Doesn't look as cool? What?

Anyway, TS only came here for for confirmation that his code was fine. Everyone disagreed, but TS still managed to use something to prove his code "glitch free". I suspect TS's code is a potential "bug heaven". This needn't be a terminal problem for an 8-month starter, as long as they can realise they've made errors, and learn from them. However, "glitch free" is someone heading for failure.

TS is happy, and it is a bit of a wasted topic for anyone else.
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 Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
No new posts JCL sortcard to print only the records DFSORT/ICETOOL 11
Search our Forums:

Back to Top