Before you create a program object using the CRTPGM command, you should:
You indicate which module contains the program entry procedure through the ENTMOD parameter. The default is ENTMOD(*FIRST), which means that the module containing the first program entry procedure found in the list for the MODULE parameter is the entry module.
If you are binding more than one ILE module together, you should specify ENTMOD(*FIRST) or else specify the module name with the program entry procedure. You can use ENTMOD(*ONLY) when you are binding only one module into a program object, or if you are binding several modules but only one contains a program entry procedure. For example, if you bind a module with a main() function to a C module without a main() function, you can specify ENTMOD(*ONLY).
Specify ACTGRP(*NEW) if your program has no special requirements or if you are not sure which group to use.
Note that ACTGRP(*NEW) is the default activation group for CRTPGM. This means that your program will run in its own activation group, and the activation group will terminate once the program terminates. This default ensures that your program has a refresh of the resources necessary to run, every time you call it.
See Activating Groups for more information on unnamed and named activation groups.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.