Compiled the below but wasn't sure whether to send or not - but haven't seen
any other postings in response - so thought I'd try to help.  Wanted to be
careful based on your obvious years of experience - so if it helps, great -
if not, sorry.

In ASSET 8.0, just like all the other ASSET versions, BPCS will go into the
settings for each program which is part of the ASSET compile parm's and will
set the "CLOSQLCSR" depending on what the program exactly does (this is a
BPCS default).  If the program has multiple modules open and you specify to
close the cursor activity group level, then there is a chance that the other
modules will crash.  The settings are also configured to be the most
optimized for performance.

Suggest setting this up in your test environment and moving the program that
has been compiled with the new parm and try it out.  Check to see if there
is any performance degradation as well as any hard halts.

Understand that SSA went through this effort a few years ago in order to
improve performance for the majority of the 500 level programs in order to
keep the user from having to wait for the program to open all the files each
time they went into that program.  The trade off was it left a large number
of files open.

-----Original Message-----
[]On Behalf Of
Sent: Thursday, March 27, 2003 1:00 PM
To: bpcs-l@xxxxxxxxxxxx
Subject: BPCS-L Digest, Vol 1, Issue 579

Send BPCS-L mailing list submissions to

To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body 'help' to

You can reach the person managing the list at

When replying, please edit your Subject line so it is more specific
than "Re: Contents of BPCS-L digest..."

Today's Topics:

   1. Re: Open files after programs ending (Frank.Kolmann@xxxxxxxxxx)


message: 1
date: Thu, 27 Mar 2003 10:11:11 +1000
from: Frank.Kolmann@xxxxxxxxxx
subject: Re: Open files after programs ending

I searched the BPCS archives and found an old post I put up
with some selected replies.  What I want to know is can I
safely compile AS/SET programs using the CLOSQLCSR(*ENDMOD)
parameter on the compile.


We recently upgraded BPCS from 6.0.04G to 6.1.02.
We also upgraded AS/SET to V8. We had some minor issues with
AS/SET using the V6 repository but in the end it works OK.
The V8 version of AS/SET creates ILE programs and some of the
issues we had with modifying large AS/SET programs have been

I am getting more problems than ever with things going wrong
due to files being left open.

The issue I am presently having is the requirement to use
CLOSQLCSR(*ENDACTGRP) on the AS/SET compiles.  It is all well
and good to leave files open with the goal (hope?) that
performance will improve on subsequent reuses of the opens,but

There are however 2 MAJOR CASES where the reuse fails.

1.  Where a progam is closed and an OVRDBF is issued to
    open the file in a different library then the when program
    is called again the previous open is used and
    you get the wrong file.
2.  Where the program is closed, then the library list is changed
    and the program is called again, if the previous open is
    reused again you have the wrong file.

This I believe is really an AS400/OS400 issue caused by the
reuse logic NOT detecting that the object is needed from
a DIFFERENT library.

If Activation Groups were used as designed then closing the
AG will close the 'useless' open files, but BPCS does not use

I simply want to know can I use CLOSQLCSR(*ENDMOD) on the BPCS
programs.  I see no reason why not, but I want to avoid jeopardising
our Production system simply because I recompiled programs.

I tried to get this info from OGS without any success.

Frank Kolmann

PS. I am old enough to be aware to close files properly etc etc
    I dont need instruction on proper coding techniques.
    The issue I have is the OS is keeping files open.

>From: Ata510@xxxxxxx
>Date: Tue, 7 Sep 1999 22:11:20 EDT
>There is always the CRTSQLRPG compile option which leaves files open
>calls of the same program within the same user job (whether batch or
>interactive) - CLOSQLCUR *ENDJOB versus the default of *ENDPGM, will leave

>files 'parially closed' by simple virtue of a compile option. In 6.0.04
>more so in 6.1.00 BPCS is compiled to take advantage of this. All you have
>do in your program is make sure you close your cursors properly, so you
>end up re-positioned in the wrong place in a file when you return to it.
>Having many ODPs on one job is not the bane of performance as it once was
>the AS/400, and in fact can actually be an OK thing, especially when you
>have programs which take advantage of re-usable ODPs. You can find out if
>program is generating re-usable ODPs or not by running STRDBG (no program
>name) UPDPROD *YES over a given job with SQL in it, and view the job log
>SQL messages.
>>In a message dated 9/7/99 6:40:44 PM Central Daylight Time,
>>fkolmann@xxxxxxxxxxxxx writes:
>> Am I stupid and/or has something about the AS400 changed.
>> When I code for leaving files open I was under the impression that one
>> needed to use OVRDBF SHARE(*YES) and also have a file opening program
>> at the top of the


This is the SSA's BPCS ERP System (BPCS-L) digest list
To post a message email: BPCS-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: BPCS-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives

End of BPCS-L Digest, Vol 1, Issue 579

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

This mailing list archive is Copyright 1997-2021 by 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.