Re: Files created when we run Embedded SQL
- From: CRPence <crpence@xxxxxxxxxxxx>
- Date: Thu, 13 Dec 2007 17:20:47 -0600
If performance was already a concern, ACTGRP(*NEW) will probably be the worst possible choice. That option ensures there is no ability for reuse of cursors in the job for that program. Each time the program starts it must create an entirely new /activation group/ and then at the end of the program it must destroy that working environment that it created. In that case it is probably better to just stick with OPM since ILE is not being well utilized in what it offers.? No matter what, when the service is actively processing, the lock is held; i.e. the conflict exists even w/out pseudo-closed, so the ability to both stop the service and prevent new requests is an effective requirement to avoid the conflict alluded to as origin for wanting to close the files.?
It would be better to be able to provide the ability to ask the service to either close down the activation group [RCLACTGRP named] or remove the lock [another job does ALCOBJ CONFLICT(*RQSRLS); implicitly by a system request that conflicts, or explicitly by user request].
QASQRESL is the /routine resolution/ file which is opened and tracked in static storage for the job; i.e. once open, it remains open for the performance benefit, for future function and procedure name resolution activity for SQL processing. Since it is a system file, there should be no concern for it being open -- for read only, no commit.
Regards, Chuck
--
All comments provided "as is" with no warranties of any kind whatsoever and may not represent positions, strategies, nor views of my employer
TadPole wrote:
On Dec 13, 2:25 pm, CRPence <crpe...@xxxxxxxxxxxx> wrote:.No time to comment now... except, the functions that require
exclusive use, if by the i5/OS for something probably cause the close to
occur automatically with a wait time according to DFTWAIT() of the job.
For a user requested exclusive, AFaIK both the SQL LOCK EXCLUSIVE and
ALCOBJ CONFLICT(*RQSRLS) will signal the same as those OS requests, that
the pseudo-closed ODP is closed. So if there is only speculation of
some interference, versus any actual experience of a conflict, it is
probably worth investigating actuals.?
Also... review the "Close SQL cursor" CLOSQLCSR() and activation
group settings for the program.
TadPole wrote:
<<SNIP>>- Show quoted text -
All other RPGLE programs clean up after they have run, and don't
allow for ODPs, this is important as some process at night required
exclusive access the files now left with ODPs from the
QTEMP/*query000n files.- Hide quoted text -
Thanks for the general comments, this is what I did and ut seemed to
have worked:
1. Change the activation group on the main programs that is being
called to *NEW, i.e.
H dftactgrp(*no) actgrp(*new)
2. In the SQL change the SET command to:
C/Exec SQL
C+ Set Option closqlcsr=*endactgrp, commit=*none
C/End-Exec
This means the the program, when invoked will run in a new activation
group, when the activation group finishes the closqlcsr cleans up.
This seems to work, but there is one last file left open:
QSYS2/Qasqresl
It is a logical, it seems to be associated with DB2 in some form, but
looking at the file nothing jumps out.
- Follow-Ups:
- Re: Files created when we run Embedded SQL
- From: TadPole
- Re: Files created when we run Embedded SQL
- References:
- Files created when we run Embedded SQL
- From: bakeric
- Re: Files created when we run Embedded SQL
- From: CRPence
- Re: Files created when we run Embedded SQL
- From: TadPole
- Re: Files created when we run Embedded SQL
- From: CRPence
- Re: Files created when we run Embedded SQL
- From: TadPole
- Files created when we run Embedded SQL
- Prev by Date: Re: QDLS/DLOs authority?
- Next by Date: Re: Append upload data
- Previous by thread: Re: Files created when we run Embedded SQL
- Next by thread: Re: Files created when we run Embedded SQL
- Index(es):
Relevant Pages
|