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.
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 ParentListAS ( 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.NAMEFROM 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
Glad it helped