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



Great post, thanks. Sorry I won't ( can't) help.
There must be many awaiting the replies. Just have to wait for the sun to come up in the US.

-----Message d'origine-----
De : rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Joe D
Envoyé : mercredi 19 mars 2008 03:41
À : RPG programming on the AS400 / iSeries
Objet : Activation Groups/SQL Suggestions

Hi All,

As a shop, we are moving towards ILE from a primarily RPG/400 environment. This has involved a lot of coding in /Free, procedures, service programs, etc.

Recently we noticed a few things:
1 - When looking at open files for a typical user's interactive job we saw a lot of mixed activation groups
2 - We also noticed that when the user would exit a program (with *INLR *ON), these files remained open (hundreds of them sometimes)
3 - Many of the same files would be listed over and over again

After a lot of Googling and reading of the Archives, it is obvious these problems (or parts of them) have been brought up before. There seems to be a few suggestions for fixes, but none of them have resolved the issue 100% for us.

Here is what we have done so far:
1 - When we convert an OPM to ILE, we also convert any called programs to ILE
2 - We used to use just DFTACTGRP(*NO) in our H-Specs, now we also use ACTGRP(*CALLER)
3 - In our main menu program we use RCLRSC(*) when a menu option ends
4 - In SQL programs we have started using *ENDMOD to close the cursor (either at compile or using 'Set Option' in SQL)

The results seem a lot better. Everything runs in the same activation group, and on program exit most if not all files are being closed.

Here are my questions:
1 - Is using *CALLER recommended? I saw it mentioned a couple of times, but using *CALLER only seemed to make everything stay in the same group. It did not seem to reduce the number of opened files, and we even have one app that refuses to run when compiled with *CALLER.
2 - With regards to SQL programs leaving files open, I read a couple of times that using the SQL Close function was all that would be required. The problem is that we were seeing files left open from simple Select statements, not just Cursors. *ENDMOD seems to have helped, but I read a couple of posts saying that it was not advised. How are you handling this?
3 - Shouldn't the system be trying to reuse data paths? Sometime we will see the same logical listed 8 or 10 times on a job. Maybe it has always been this way and is just sticking out now because of the hundreds of stray open files we were seeing.

Sorry for the long post. We are all learning as we go here, and if we have made some ill-advised choices it would be great to find that out now before we go too much further.

Any suggestions out there?

Thanks,
JD
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.