DFTACTGRP(*YES | *NO)

The DFTACTGRP keyword specifies the activation group in which the created program will run when it is called.

If *YES is specified, then this program will always run in the default activation group, which is the activation group where all original program model (OPM) programs are run. This allows ILE RPG programs to behave like OPM RPG programs in the areas of file sharing, file scoping, RCLRSC, and handling of unmonitored exceptions. ILE static binding is not available when a program is created with DFTACTGRP(*YES). This means that you cannot use the BNDDIR, ACTGRP, or STGMDL command parameters or keywords when creating this program. In addition, any call operation in your source must call a program and not a procedure. DFTACTGRP(*YES) is useful when attempting to move an application on a program-by-program basis to ILE RPG.

If *NO is specified, then the program is associated with the activation group specified by the ACTGRP command parameter or keyword and static binding is allowed. DFTACTGRP(*NO) is useful when you intend to take advantage of ILE concepts; for example, running in a named activation group or binding to a service program.

The DFTACTGRP keyword is valid only if the CRTBNDRPG command is used.

Default value if the DFTACTGRP keyword is not specified

If there are any free-form Control statement in the compilation unit, and one or more of the ACTGRP, BNDDIR, or STGMDL keywords are used, then DFTACTGRP(*NO) is assumed.

Otherwise, the value specified on the command is used.

In the following example, the CTL-OPT statement is a free-form Control statement. The ACTGRP keyword is specified, so DFTACTGRP(*NO) is assumed.

   CTL-OPT OPTION(*SRCSTMT) ACTGRP(*NEW);
In the following example, the STGMDL keyword is specified in a fixed-form Control statement, but there is also a free-form Control statement, so DFTACTGRP(*NO) is assumed.

   CTL-OPT;
H OPTION(*SRCSTMT) STGMDL(*INHERIT)
In the following example, there is a free-form Control statement, but none of the ACTGRP, BNDDIR, or STGMDL keywords are specified. The value specified for the DFTACTGRP parameter of the CRTBNDRPG command is used.

   CTL-OPT OPTION(*SRCSTMT);