|
Hi Joe, > I've finally confused myself. I compile a program with DFTACTGRP(*NO) > ACTGRP(*CALLER). Do bad things happen if: > > 1. I call from another ILE program > 2. I call from an OPM program > 3. I call it from the command line > 4. I invoke it directly as my signon program > 5. I invoke it as the first program in a submitted job I believe that option 1 entirely depends on the nature of the program that called it. Options 2-5 are all the same. Here's the way that I understand it: Basically, when a program is compiled with *CALLER, and that caller is in the default activation group (as is the case with items 2-5, and could possibly be the case with item 1) the program will remain activated in memory, regardless of the state of *INLR and regardless of RCLRSC. If INLR or RCLRSC is used, the program will re-initialize all of it's fields back to blanks & zeroes and start over, but it will not unload from memory. If the same programs had been compiled with DFTACTGRP(*YES) instead of *CALLER, then RCLRSC or *INLR=*ON would actually de-activate the program from memory... (That is, it would actually reclaim the resources!) The one place that I know of where strange things happen is with service programs that are compiled with ACTGRP(*CALLER). RCLRSC does not cause static memory to be reinitialized in service programs. That means that if a service program has files open or has already resolved to a program for a program call, doing a RCLRSC will cause bad things to happen. > My guess is that 3, 4 and 5 should be very similar in nature. For case > one, I simply take on the ACTGRP of the ILE. I don't even care to guess > at the second option. Since the command processor is an OPM program itself, options 2-5 should all be the same. Assuming that we're talking about programs rather than service programs, the only big drawback to *CALLER being invoked from an OPM program is that there's no way to free up it's storage (short of ending the job) That may not be a problem, depending on your circumstances.
As an Amazon Associate we earn from qualifying purchases.
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.