Zvi Kave wrote:
Hi,
I have ILE C program which is called many times every second.
I found that QC2POSIX takes lot of CPU (40%).
Someone knows how to make ILE C program resident in memory?
Regards,
Zvi
This basically expands on what Mark said.
1: From what environment is your program called? Is it invoked via
repeated job submissions, from pase or qshell, in an interactive
environment, from a daemon/server which is running in either it's own
subsystem or a system supplied subsystem for server jobs?
2: How is it called? Is is called as a main program or a service
program, from a CL, PRG, or COBOL program, from a shell script that's in
a loop, as a spawn() from another program, from another C program?
3. If from another C program, is it called directory by a dynamic
invocation, by an API call, using the system statement, etc.?
The easy way to make sure that it's called from the same invocation
group as the calling program, if it is called from a program, is to use
the ACTGRP from the CRTPGM command as Mark said specifying.
Activation group . . . . . . . . ACTGRP > *CALLER
This saves the time and trouble of setting up a named activation group
and creating each program for that specific activation group. However,
depending on the type of parent program, you may want to set the initial
parent to a named activation group or to *NEW. Again, C defaults to
*NEW. If you are not educated in activation groups, be sure and read the
manuals, ILE Concepts and others, about activation groups as this is an
area that is easily misunderstood.
You used to be able to tell the system to pen an activation group into
memory, but that option now, if it is still available, only acts as a
suggestion.
Now, I am curious as to why you want it resident in memory. Is it not
using as much CPU after it is loaded? Exactly what are you trying to
accomplish? Do you want it to use less CPU? If so, why as there may be
other ways to accomplish the same thing.
Mike
As an Amazon Associate we earn from qualifying purchases.