Re: Files created when we run Embedded SQL



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



Relevant Pages

  • Re: Files created when we run Embedded SQL
    ... 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.? ... when the activation group finishes the closqlcsr cleans up. ...
    (comp.sys.ibm.as400.misc)
  • Re: too much OOP ?
    ... You cannot say that without specifying what kind of requests are planned. ... That assumes that you can with SQL, and that there is no other components. ... that SQL database should never be used. ... downloading some free generic tool for applying logical ...
    (comp.object)
  • Re: how do you handle multiple update request on the database?
    ... I made the assumption that the OP was using an RDBMS like SQL Server, ... requests that come in at the same time to the server. ... Any database will handle #2 fine. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Files created when we run Embedded SQL
    ... review the "Close SQL cursor" CLOSQLCSRand activation ... allow for ODPs, this is important as some process at night required ... In the SQL change the SET command to: ... when the activation group finishes the closqlcsr cleans up. ...
    (comp.sys.ibm.as400.misc)
  • Re: ODBC error in inetinfoe.exe
    ... Insure you set your timeouts appropriately so you don't hang the ISAPI ... >I am accessing an SQL database inside an ISAPI filter. ... > requests no errors occur. ...
    (microsoft.public.data.odbc)