No announcement yet.

Activatin group??

  • Filter
  • Time
  • Show
Clear All
new posts

  • Activatin group??


    I am new to this field. As per my understanding I had a doubt regarding activation group.

    I have two rpgle programs PGMA and PGMB.

    PGMA is running in activation group named ACTVGRP1
    PGMB is running in activation group named ACTVGRP2

    If i call both PGMA and PGMB in a CL program and submit this CL program to a JOB. Now in which activation group does this job is runing.

    Thanks in advance.

  • #2
    Re: Activatin group??

    The short answer is "it depends". When you say a program "is running in an activation group", I'm assuming you mean the activation group they are "designed" to run in, and not the activation group they are "currently running in." Just because a program is running in ACTVGRP1 does not mean it was told to run in that activation group at compile time. It could have been designed to run in *CALLER, and the program that called this program is running in ACTVGRP1. It's an important difference, because a CL program is not an ILE program, and therefore runs in the DAG.

    If the programs are created to run in named activation groups ACTVGRP1 and ACTGRP2, then they will always run in activation groups ACTVGRP1 and ACTGRP2, no matter who called them.

    But if the first program is set to *caller for the activation group, and it is called by a CL program (not CLLE), then the PGMA will get sucked into the DAG, where all CL programs are placed.
    Last edited by MichaelCatalani; April 20, 2011, 11:18 AM.
    Michael Catalani
    IS Director, eCommerce & Web Development
    Acceptance Insurance Corporation


    • #3
      Re: Activatin group??

      I think a job can hold two or more programs. If it is like that, can two programs run in two different activation groups which are in a single job? (Here i not providing '*caller'. i am providing the name of the activation group for the program at compile time.)


      • #4
        Re: Activatin group??

        you can run 5000 programs in 5000 activation groups in a job. it doesn't matter. it's how you control the job flow that matters.
        I'm not anti-social, I just don't like people -Tommy Holden


        • #5
          Re: Activatin group??

          If you want to test this it's easy. Debug the program and set a breakpoint in each program. Then when the program breaks on a particular line you need to view the job. If it's running interactively then you can use [SHIFT]+[ESC] followed by a [3]+[ENTER]. Use option 18 to view the activation groups in use. If it's running in batch then use WRKJOB followed by option 18.

          As Tommy says, you can have as many activation groups in a job as you like. I wouldn't go too mad though as too many may give you performance issues. My experience with activation groups is mainly with running CGIDEV2 and apache in renaissance. We send each request through a CL wrapper running in activation group RNSROUTER. The rest of the application runs in the RNS activation group. At the start of each request the CL wrapper checks if it needs to reclaim the RNS activation group. This allows us to set live software changes without bringing the server down.


          • #6
            Re: Activatin group??

            Thanks. Now i got a good idea about activation groups.