Reclaim resources

113 Views


Reclaim  resources  :  Specifies  whether the IBM i 'Reclaim   
   resources' command  is  to  be  invoked  when  the program  
   created to implement the function finishes execution.  The  
   command closes  down  any  other  programs  that have been  
   called by the program, and deallocates their storage.       
   - 'Y' : Reclaim resources is to be invoked.                 
   - 'N' : Reclaim resources is not to be invoked.             
                                                               
 

Synon (Cool:2E) function option “Reclaim Resources.”

This is an option you can set on a function definition in Synon that tells the system how to handle resources (like open files, memory, data areas, commitment control, etc.) when the function ends.


🔹 What “Reclaim Resources” Does

  • It controls whether or not the system cleans up (releases) resources when a function finishes.

  • Resources here include:

    • Open data paths (ODPs) for files

    • Memory / program storage

    • Commitment definitions / locks

    • Temporary objects used during execution


🔹 Settings

Typically you’ll see two choices:

  1. Yes (Reclaim Resources)

    • When the function ends, all resources are released.

    • Equivalent to ending with *INLR = *ON in RPG.

    • Safe for stand-alone batch functions or interactive functions that don’t need to share file access.

    • Downside: If you call another function right after, files must be reopened, which adds overhead.

  2. No (Don’t Reclaim Resources)

    • Leaves resources allocated when the function ends.

    • File ODPs stay open and can be reused (important in activation groups).

    • Equivalent to ending with RETURN in RPG (without LR).

    • Used for efficiency when chaining multiple functions together.

    • Downside: If you don’t manage activation groups properly, it can cause locks or extra resource usage.


🔹 Practical Usage in Synon

  • Inquiry / stand-alone functions → usually set Reclaim = Yes, so nothing hangs around.

  • Series of functions that pass control between each other (like menu-driven apps) → often Reclaim = No, so performance is better and files stay open.

  • In ILE environments, this ties into Activation Group handling (default, named, or *NEW).


✅ Summary Table

Option Effect Typical Use
Yes Releases files, memory, locks Batch jobs, stand-alone functions
No Keeps resources allocated Menu-driven apps, multi-function flows

 

Post Comments