Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Files left open even after LR?

382 views
Skip to first unread message

Bradley V. Stone

unread,
Nov 12, 2003, 7:40:01 PM11/12/03
to
Either I'm having a major brain fart, or something weird is going on
here... :)

I have CGI programs that handle web requests and responses. In these
programs I set the library list the way I want it, then call an RPG
program to process the data (update files, etc..)

These programs all set on LR.

When I view the open files in the server job logs, I see all the files
used by these RPG programs remain open. This causes problems in that if
I want to go into "test mode" which uses a different library list, the
original files (live files) are read/updated instead of the test files.

Should these files be closing at program end? They do not use USROPN,
are compiled with dftactgrp(*yes), seton LR, then return.

Been a long couple of weeks... any ideas here? Barbara? :::)

Brad

Bradley V. Stone

unread,
Nov 12, 2003, 7:45:50 PM11/12/03
to
I should also state, the files are not specified SHARE(*YES) and there
are no overrides. Just a normal F-spec defined file.

Martin Brieger

unread,
Nov 12, 2003, 8:48:51 PM11/12/03
to
Bradley,

looked into activation groups?

"Bradley V. Stone" <bvs...@nospamyahoodot.com> wrote in message
news:0vAsb.1753$mv2....@cletus.bright.net...

George Kinney

unread,
Nov 12, 2003, 10:37:27 PM11/12/03
to

"Bradley V. Stone" <bvs...@nospamyahoodot.com> wrote in message
news:ApAsb.1752$mv2....@cletus.bright.net...

This is probably what got me a few weeks ago, under certain conditions,
OS/400 will
buffer ('BLOCK') file input/output. It won't flush the buffer until either
the activation group
ends, or the file is explicitely closed. So you need to use USROPN and
explicitly close the
file, or alternatively, you can use the BLOCK(*NO) keyword in the f-spec,
and it should
stop this as well. (There are various combinations of other file settings
that effect this, but I'm
not an expert.)

I don't know how much of a performance impact there is with blocking vs.
non-blocking
IO, but it certainly doesn't help debugging.

Bradley V. Stone

unread,
Nov 13, 2003, 9:50:35 AM11/13/03
to
Hi, George.

I tried the BLOCK(*NO) and it didn't seem to work. I'm hoping to get a
few more responses before tearing my hair out. :) Thanks for sharing
your ideas! I may give the USROPN method a try as well...

Brad

Steven Gray

unread,
Nov 13, 2003, 8:33:54 PM11/13/03
to
Brad,

I had the same problem a while back. I think I finally had to use
BLOCK(*NO) and USROPN and FEOD before the CLOSE. It mayhave been
overkill, but I lost a lot of hair over that one.

Steve

George Kinney

unread,
Nov 13, 2003, 9:09:42 PM11/13/03
to

"Bradley V. Stone" <bvs...@nospamyahoodot.com> wrote in message
news:WSMsb.1757$mv2....@cletus.bright.net...

> Hi, George.
>
> I tried the BLOCK(*NO) and it didn't seem to work. I'm hoping to get a
> few more responses before tearing my hair out. :) Thanks for sharing
> your ideas! I may give the USROPN method a try as well...

I also had a problem where a program built with ACTGRP(*CALLER) was being
called by an OPM program.

Turns out that *CALLER and the default actgroup don't always play nicely.

You could try changing it to ACTGRP(*NEW), or if you used a named ACTGRP
before, make sure it is actually cleaned up. (RCLACTGRP if necessary)

Or I could be completely off base and ranting. Good luck. :)


Barbara Morris

unread,
Nov 14, 2003, 2:27:32 PM11/14/03
to
"Bradley V. Stone" wrote:
>
> I have CGI programs that handle web requests and responses. In these
> programs I set the library list the way I want it, then call an RPG
> program to process the data (update files, etc..)
>
> These programs all set on LR.
> ...

Are any of the files in a NOMAIN module? LR has no effect on NOMAIN
modules, and for non-NOMAIN modules, LR in one module has no effect on
LR in another module.

QMAGIC

unread,
Nov 14, 2003, 7:31:50 PM11/14/03
to
While I can not help on this issue I would like to know what to look
at to see if I have the same issue. What command did you use to see
that the files were not closed?

Thanks,
Dan

"Bradley V. Stone" <bvs...@nospamyahoodot.com> wrote in message news:<ApAsb.1752$mv2....@cletus.bright.net>...

0 new messages