× 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.



> George wrote:
> Basically, I have a SVCPGM (TESTUTIL) that reads/updates a couple of files
> (say FILE1 (update), FILE2 (output only)).
> I call a program , that calls procedures in the SVCPGM from the command
> line.  What I notice is that changes to FILE1 are immediately obvious,
while
> writes to FILE2 aren't visible (via DSPPFM or DBU) until I log-off,
> terminating the SVCPGM. (It was compiled with ACTGRP(*CALLER), as was the
> program that is referencing it.)
> What bothers me is that I can't see the records that are being written
until
> after the SVCPGM terminates.  Is this normal? I am not using any
commitment
> control that I am aware of.

George,
For efficiency reasons, you must not be closing the output-only file in your
service program, and by design the SVCPGM is staying active once called the
first time.  In either case, the records are being stored in a buffer
created by the file manager.

For more about record blocking/unblocking:
http://publib.boulder.ibm.com/iseries/v5r1/ic2924/books/c0925073261.htm

Since the records are being written to an output-only file, the added
records are blocked in the output buffer by the file manager.  The system
automatically calculates the number of records in a block, and externalizes
when a block of records is full.

The buffer can get externalized in several ways:

1) If the file is closed (this explains why
2) OR if you use the FEOD operation code against the file in the SVCPGM
3) OR if the file description has FRCRATIO(1) specified (or overridden as
such)
4) OR if you perform an OVRDBF FILE(xxxxx) SEQONLY(*NO) before calling the
SVCPGM
5) OR if you use BLOCK(*NO) on the output-only file specification in the
SVCPGM

Steve Landess
Austin, Texas
(512) 423-0935

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.