Could we set compiler options for activation groups in RPG/CL program?

342780 pts.
Tags:
AS/400
CL
RPG
In most of our AS/400 programs, we need to change the handling of the activation group (since the default behavior is not useful). When I compile one of those programs, I have to remember to set the complier options. (Depending on the program)
enter 14, hit F4, change DFTACTGRP from *YES to *NO, hit enter, change ACTGRP to *NEW or *CALLER,
But we have a lot of programs with comments at the beginning along with a ton of exclamation marks, reminding the programmer to do so. But sometimes, we forget. Is there a trick so we don't have to remember it our self?

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    If the command settings are an issue, don't use them at all. If a program needs particular activation group settings, use appropriate H-spec keywords and don't worry about what the command parm default is. The H-spec will stay with the module source and will direct the compile from then on regardless of remembering at compile-time. Future maintenance will be more certain since maintenance programmers won't make mistakes as easily. -- Tom
    125,585 pointsBadges:
    report
  • TomLiotta

    For CL programs, there is nothing like a H-spec in RPG. For CRTBNDCL, you might run something like this:

    CHGCMDDFT CMD(CRTBNDCL)
              NEWDFT('DFTACTGRP( *NO ) ACTGRP( *CALLER )')

    The CHGCMDDFT command allows you to change to default values for any other command. A fundamental limitation is that you can only set a new default for parameters that currently have default values.

    In this case, CRTBNDCL is installed with defaults of DFTACTGRP( *YES ) and ACTGRP( *STGMDL ) for those parms. After CHGCMDDFT runs, those two defaults have been changed. You'll need to decide what actual defaults you'll set.

    Tom

    125,585 pointsBadges:
    report
  • TomLiotta

    Update for CL in i 6'1:

    In i 6.1, two new features are made available. First, the DCLPRCOPT command is added to the language. When this command is included in the source, options such as DFTACTGRP( *NO ) and ACTGRP( *CALLER ) can be specified in order to ensure future compiles will happen according to the initial intent of the developer. Also, the INCLUDE command may be specified to name an 'include' source member. This works very much like a COPY compiler directive statement would work for RPG compiles.

    You might have a couple standard DCLPRCOPT statements in different INCLUDE members: one for bound CL programs and another for CL modules. You could specify one or the other depending on what object type you're creating. And you might have INCLUDE members that supply generic defaults at a system level and others that specify defaults for each different application area. That could let you set application-default activation group names.

    Tom

    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following