× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Tony Carolla wrote:
> 
> I have written a service program that logs account updates.  The module
> simply accepts the account ID fields, concatenates them into a single field,
> and writes them to the log file.  The program is sometimes called several
> thousand times from the one running program, in the same activation group,
> and the output file remains open to the service program until the close
> parameter is used.
> 
> So my question is this:  If I call the program 100 times, from the same
> running program, in the same activation group, is record blocking done?  Or
> if not, each time the service program RETURNs, is all data forced to disk?
> I would like for blocking to be done, for efficiency.  I know I can force
> blocking to not happen, but can I force it to happen, if the program
> RETURNs, but remains in the activation group?
> 
> Also, if blocking is done, once the activation group is closed, is this data
> written to the file?
> 

Yes, record blocking is done the way you want.  Returning from a
procedure in your service program wouldn't cause the data to be written
out to disk.  (This isn't particular to a procedure in a service
program; it even applies to OPM RPG programs when they return with LR
off.)  The block only gets written to disk when the block is full, or an
FEOD is done, or the file is closed.

The file gets closed when the activation group is closed, and closing
the file would cause the data to be written out.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.