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



Not quite sure what you are asking for ... but with regard to SQL:
1. *INLR is for the RPG cycle and has nothing to do with SQL
2. Because a SQL FULL OPEN is time consuming SQL tries to keep the ODPs
open. If a program is compiled with ENDACTGRP (RPGIV) or ENDJOB (RPGIII) the
ODP may remain open until the job or activation group ends, so for the next
run a PSEUDO OPEN (no activation, the data in the ODP is just updated) can
be performed which is much (10-20 times) faster than a FULL OPEN.
3. However if the library gets changed ODPs based on unqualified specified
tables / views get closed. So for the next run a FULL OPEN (based on the new
library list) must be performed.

Mit freundlichen Grüßen / Best regards

Birgitta Hauser
Modernization ? Education ? Consulting on IBM i


"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
?Train people well enough so they can leave, treat them well enough so they
don't want to.? (Richard Branson)


-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Dave
Sent: Dienstag, 10. Januar 2023 22:19
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Interesting comparison of SQL and RLA on the same file name in in
different libraries

MYPGM reads MYFILE (in LIB1) with RLA then SQL and returns with INLR off.


DSPJOB shows 2 open access paths for LIB1/MYFILE



ADDLIBLE LIB2 (containing a copy of MYFILE)

CALL MYPGM

DSPJOB now shows

1 open access path for LIB1/MYFILE

1 open access path for LIB2/MYFILE

For me it was obvious that the first file remained open but I was surprised
that the send OAP indicated the new file, and that the original lock had
been released.

I often used to notice after execution of a program using embedded SQL that
a file would remain locked, the file being opened in the DFTACTGRP.
In our shop, users can change the library list to switch to and from a test
environment.I used to think that using embedded SQL would therefore be
problematic (with the danger of reading the wrong file). However, the test
above shows that it would only be the case if using RLA and the file didn't
close at the end of the program. This was important for me, as in my last
RPG shop, they used CRTPGM with ILE modules and never understood why INLR
and RCLRSC were not working, the files all remaining open. Obviously this
would be a big problem if one tried to switch between the test and the
production environments as they do in my shop today. Luckily for them they
are still programming in RPGIII.

Sorry if I was teaching you to suck eggs :-) I would love to know more if
anyone can enlighten me.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.