Skip to main content

This article explains that compiler directive WRITETHROUGH / WRITETHRU is intended to write file records immediately upon running the application.

Problem:

When using Server Express 4.0 ServicePack 2 on RedHat ES 3, all programs are built as .gnt files and getting started via cobrun. Files to be used are defined as "line-sequential" and opened with "open extend with lock" phrase. It seems this physical "WRITE"ing into the files will only be done after a buffer is filled completely or reaching a "CLOSE" statement. Is it possible to write file records immediatly while the application runs?

Resolution:

Yes, compiler directive WRITETHROUGH / WRITETHRU is intended to do this. Refer to the documentation files for Server Express 4.0 also Server Express 5.0:
  • http://supportline.microfocus.com/Documentation/books/sx40sp2/sx40indx.htm
  • http://supportline.microfocus.com/Documentation/books/sx50/sx50indx.htm
Note: Read the document files carefully in regard with hints to use this for a file only, also for performance issues.
Old KB# 14019