CA Gen

Expand all | Collapse all

Given a specific action block how can I find out what load modules are using it?

  • 1.  Given a specific action block how can I find out what load modules are using it?

    Posted 09-08-2015 06:49 PM

    In response to a recent Support case from AldredGonzalez I have created a KB which puts together the various report/SQL options we have researched:

    How to create a report to list all Load Modules where an Action Block is used where a specific model and Action Block are specified.



  • 2.  Re: Given a specific action block how can I find out what load modules are using it?

    Posted 09-14-2015 11:17 PM

    Thanks for the doco Lynn.

    From this I have been able to create a MS SQLServer query for a particular AB using the PI Views.

    The result is the same as what comes back from GuardIEn OL+ ... which means we can scrape another database to pass data to this query.

     

    USE <your Gen Ency>;

     

    WITH ParentList
    AS (
    SELECT ACTN_BLK_ID
                   ,USED_ACTN_BLK_ID
    FROM [dbo].[ACTN_BLK_USE](NOLOCK)
    WHERE ACTN_BLK_ID IN (
                 SELECT ID
                 FROM [dbo].[ACTION_BLOCK](NOLOCK)
                 WHERE NAME LIKE    '%foo%'  -- put your AB to find parents here

                 AND MODEL_ID = <your model id>
                 )

    UNION ALL

    SELECT a.[ACTN_BLK_ID]
                   ,a.[USED_ACTN_BLK_ID]
    FROM [dbo].[ACTN_BLK_USE] a (NOLOCK)
    INNER JOIN ParentList s ON a.USED_ACTN_BLK_ID = s.ACTN_BLK_ID
    )


    SELECT DISTINCT PStep.NAME
    FROM ParentList
              ,[dbo].[BUS_PROC_STEP] PStep (NOLOCK)
    WHERE ACTN_BLK_ID = PStep.ACTION_BLOCK_ID
          AND PStep.MODEL_ID = <your model id>
    ORDER BY PStep.NAME ASC

     



  • 3.  Re: Given a specific action block how can I find out what load modules are using it?

    Posted 09-15-2015 12:22 AM

    Hi Aldred,

    Glad it helped 

     

    Regards,

     

    Lynn