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
 

 

When does a record actually get written to disk

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: When does a record actually get written to disk
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

Active Member


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

PostPosted: Sat Apr 26, 2008 12:16 am    Post subject:
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    Post subject:
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: 238
Location: Cincinnati OH USA

PostPosted: Sun Apr 27, 2008 1:18 am    Post subject:
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

Site Director


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

PostPosted: Sun Apr 27, 2008 1:59 am    Post subject:
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    Post subject: Reply to: When does a record actually get written to disk
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    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 How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts sort with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts Using 'parm' to vary SORTOUT record v... Sysaron DFSORT/ICETOOL 13 Wed Sep 07, 2016 9:24 pm


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