Home > AS/400 Tips > iSeries administrator tips > The trouble with Reclaim Resources
iSeries 400 Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ISERIES ADMINISTRATOR TIPS

The trouble with Reclaim Resources


Ron Turull
07.09.2003
Rating: -4.55- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Be careful when converting applications to ILE, especially CL code. The Reclaim Resources command (RCLRSC) has no effect when run in an activation group other than the default activation group. If you convert an application and specify that it is to run in a *NEW or named activation group, it may not run properly if it relies on the RCLRSC command.

Most applications that execute the RCLRSC command do so periodically as a "garbage-collecting" device to improve performance. However, a small percentage of programs rely on the RCLRSC command to free static memory, close open files, and free certain other resources. For example, a frequently called RPG program may return without setting on LR. This keeps the program activated and saves time when the program is subsequently called.


Ron Turull

Sometimes, however, you may require that the program start anew and therefore execute a RCLRSC in the calling program before calling the RPG program. It works great until you convert the whole thing to ILE and tell it to run in an activation group other than the default.

Four possible solutions to this problem

Here are four alternatives to help you avoid problems with the Reclaim Resources command as it relates to RPG programs. Use the one that best fits each application.

  1. Do not convert the application to ILE. All non-ILE programs run in the default activation group and, for the most part, execute without regard to activation groups.
  2. Have the application run in the default activation group. This solution is feasible only if all your programs (systemwide) will run in the default activation group. Otherwise, it will be too difficult and perhaps impossible to implement.
  3. Add an extra parameter to the RPG program that, when set to a specific value, will direct the program to do nothing but set on LR and return. This implements the reclaim resources at the RPG program level. The RCLRSC command can then be replaced with a call to the RPG program that specifies the new parameter.
  4. Have the RPG program run in its own named activation group by itself. Then change the RCLRSC command in the calling program to a RCLACTGRP (Reclaim Activation Group) command, specifying the RPG program's activation group name on the RCLACTGRP command.

The last solution is the closest to the original implementation. It requires the least amount of program modification and makes good use of system resources. It also takes advantage of the latest ILE features.

Warning: Early editions of the ILE Concepts manual asserted that the RCLRSC command could be used to delete activation groups that are not is use. This was never the case. The RCLRSC command affects only the default activation group (which is always in use) no matter in which activation group it is executed. The misinformation was corrected in later editions of the ILE Concepts manual.

-----------------------------------
About the author: Ron Turull is editor of Inside Version 5. He has more than 20 years experience programming for and managing AS/400-iSeries systems.

==================================
MORE INFORMATION
==================================

  • Converting a non/ILE RPG program to an RPG/ILE program
    "IS man" asked , "Does anyone know of an easy way to convert a non/ILE RPG program to an RPG/ILE program?" Search400.com expert Laird Scranton was on hand with an answer.

  • Will too many data paths cause poor performance?
    One user was having performance problems with a particular batch job. On examination the job had more than 2,000 open data paths mostly over the same files. Could that cause performance problems, he asked. Site expert John Brandt says yes and that the RCLRSC command can help.
  • Process a job under a different library list
    Sometimes there's a need to process a job under a different library list without using a job description to set the library list. When the job ends it is preferable to reset the library list back to its original values. Search400.com member Shankar Narayan shows you how, making use of the RCLRSC command.


Rate this Tip
To rate tips, you must be a member of Search400.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Application Development
iSeries calling an .exe
Top 10 programmer tips
Formatted work job scheduler
Convert system date and time
Mixing free format code with embedded SQL
SQL update a field in one file from a field in another file
Webcasts for iSeries programmers
Programming advice from the pros
Easy code copying via the drag and drop method
Setting FTP time-outs

Performance
Will overloaded discs impact iSeries performance?
Extend storage capacity on an IBM i without negatively effecting system performance
Database drivers on the i: MySQL vs. IBM Toolbox
Performance tuning for IBM i: The basics and beyond
IBM releases new Power products for the midrange
Top System i admin tips for 2006
Catholic Charities keeps track of homeless with iSeries
i5 error messages: What you need to know
IBM races for clock speed
System shutting down after cleanup

Implementation
Getting modules to adopt authorities from the main program
iSeries i5/OS: Top 10 Q&As
iSeries i5/OS: Top 10 Q&As
Using the SPLF0200 format in QUSLSPL API
New option within the WRKSYSACT command
Identify files used in all queries
Security Tools can help manage your system security
Client Access Express password cache
Check constraint allows database admins to sleep a bit better at night
See the users with *change or *all authority
Implementation Research

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
AS/400  (Search400.com)
i5/OS  (Search400.com)
iSeries  (Search400.com)
OS/400  (Search400.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



iSeries Security - Security Tools, Physical Security and System Security
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2010, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts