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

When does a record actually get written to disk


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

New User


Joined: 24 Apr 2008
Posts: 5
Location: Express Scripts

PostPosted: Fri Apr 25, 2008 8:18 pm
Reply with quote

I have listed all of the questions at the bottom.

In a IBM Enterprise COBOL for z/OS 3.4.1 program when would a record be physically written to disk?

The output file is defined with LRECL=2500 and blksize=30000 Disposition is disp=(new,catlg,catlg).

I always thought when the block is full, the buffers are flushed. So in the above example,when the WRITE statement for the 12th record in the block is written. Is this true?

What if the LRECL and BLKSIZE were the same? This is inefficent but does guarentee that on every write the record is written to disk.

On a user abend we call ILBOABN0 to force an abend and I thought doing this causes the buffers to be flushed, so any data in the buffers but not written to disk would now be written. But, I cannot find any documentation on what ILBOABN0 does or how it works.

Questions:
When does a record physically get written to disk?

Does setting the blksize = to the lrecl guarentee when the write is executed the record is physically written to disk?

Any documenation on ILBOABN0?

If the operator cancels the job, ILBOABN0 is not called. So what would happen to my output file? would the entire block in the buffer be lost?

Thank You.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Sat Apr 26, 2008 12:16 am
Reply with quote

I think that you must also ensure single-buffering; default is most likely double (or more?).

I recall years ago finding abends not after the last line printed, but one WRITE command after that.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Sat Apr 26, 2008 12:48 pm
Reply with quote

There used to be a 'WRITE IMMEDIATE' clause. not sure if it is still there.

If you have good restart logic, does not matter.
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 419
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Sun Apr 27, 2008 1:18 am
Reply with quote

Considering all dasd boxes now have caching; I'm not sure you can tell when the physical aspect upon the medium is done.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Apr 27, 2008 1:59 am
Reply with quote

Hello,

Quote:
Considering all dasd boxes now have caching;
and not all of the caches work exactly the same and many systems mix multiple types of both logical and physical dasd, there is no single definitive answer.

Given that most batch (where this is mostly an issue) programs process multiple types of files (spool, vsam, qsam, database etc), knowing exactly what is written and what is queued to write approachs the impossible (IMHO).

Quote:
If you have good restart logic, does not matter.
Also IMHO, by far the best way to deal with this type of data issue - when a restart "in the middle" must be done.

In fact, over the years of constantly faster cpus and dasd, my recommendation has become that jobs be restarted from the beginning rather than trying to follow some (possibly outdated) convoluted restart procedure that often caused even more down-time.
Back to top
View user's profile Send private message
bmwibm

New User


Joined: 24 Apr 2008
Posts: 5
Location: Express Scripts

PostPosted: Mon Apr 28, 2008 5:40 pm
Reply with quote

Thanks for all the responses and suggestions. I will restart the program from the top all of time.
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 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts CA Disk LISTD SQL CA Products 1
Search our Forums:

Back to Top