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.
search cancel

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.

book

Article ID: 31777

calendar_today

Updated On:

Products

Gen Gen - Workstation Toolset Gen - Host Encyclopedia Gen - Run Time Distributed

Issue/Introduction

Introduction:

For a specific model and Action Block I would like to create a report to list all Load Modules where that Action Block is used.

 

 

Environment

Release: KGNCRK05500-7.6-Gen-CLS Runtime Kit-for Unisys
Component:

Resolution

Instructions:

  1. There are some existing reports that can be run to determine where an Action Block is used i.e.
  • "Model Action Block Use Report" and then search on the Action Block name
  • "Object Cross Reference Report" with Report Type of “Referenced” & required Action Block selected to find all the places where it is referenced (used). 

 

  1. There are other possible alternatives using SQL against the Encyclopedia Public Interface or directly against the raw data tables and the following information is intended to provide initial guidance for the experienced Gen Encyclopedia administrator (NOTE: in these examples the Client Server Encyclopedia/CSE will be used)

The first step is to find where the  Action Block is used working from bottom up i.e. where used in other (Common) Action Blocks or Procedure Step (PStep) Action Blocks. Once you get up to the Pstep level you can then find the module that contains that PStep.

  1. Public Interface:

In the Gen 8.5 Client-Server Encyclopedia Public Interfaces Guide section Public Interface View Definitions (A-D) there are several Action Block related views including ACTN_BLK_USE (Action Block Usage). It can be used in conjunction with other views to provide the required information

 

  1. Direct SQL:

 

To assist in writing SQL the following information can be obtained from the file odrpta.chm (directory "%GEN85%\Gen"), which contains the meta-model information.

 

Executable Unit (EXECUNIT) object types are:

 

BATCHJS (batch) - type 121

 

OLTRAN (online & server) - type 122

 

WNUNIT (window) - type 307

 

In each of the above the following associations exist. (associations are always stored in the forward direction so you always need to use that in the SQL)

 

< - means backward association

 

> - means forward association

 

Here is OLTRAN for an example:

 

OLTRAN < REFS (249) PSTEPEU

 

PSTEPEU > OLTRAN < REFS (249) PSTEPEU

 

PSTEPEU < USEDID (285) BUSPRST

 

BUSPRST > DEFNDBY (53) ACBLKBSD

 

(ACBLKBSD is the Action Block BSD object)

 

Therefore with the above you can work out what module contains a PStep action block.

 

(The MBRNAME property of the OLTRAN will give you the module name - this is column NAME08_PROP_1 in the DNAME table)

 

 

Examples:

The following SQL will retrieve load modules that contain a specific PStep or a BSD/BAA action block that is used by a PStep action block.

If you need the capability to do the same for action blocks called by other CABs then use of the PI query mentioned above would be required.

======================================================================

Online/server load modules which contain a PSTEP:

select name08_prop_1 from dname where name_obj_id in

(select obj_id from dobj where obj_type_code=122 and obj_id in

(select assoc_to_obj_id from dasc where assoc_type_code=245

and assoc_from_obj_id in

(select obj_id from dobj where obj_type_code=10 and

obj_id in

(select assoc_to_obj_id from dasc where assoc_type_code=290

and assoc_from_obj_id in

(select obj_id from dobj where obj_type_code=60 and obj_name=

'PSTEP' and obj_model_ID='MODEL_ID')

))));

======================================================================

Online/server load modules which contain a BSD/BAA action block being used directly by a PSTEP:

select name08_prop_1 from dname where name_obj_id in

(select obj_id from dobj where obj_type_code=122 and obj_id in

(select assoc_to_obj_id from dasc where assoc_type_code=245

and assoc_from_obj_id in

(select obj_id from dobj where obj_type_code=10 and

obj_id in

(select assoc_to_obj_id from dasc where assoc_type_code=290

and assoc_from_obj_id in

(select obj_id from dobj where obj_type_code=60 and obj_id in

(select assoc_from_obj_id from dasc where assoc_type_code=53 and

assoc_to_obj_id in

(select obj_id from dobj where

(obj_type_code=21 or obj_type_code=23) and obj_id in

(select assoc_from_obj_id from dasc where assoc_type_code=36 and

assoc_to_obj_id in

(select obj_id from dobj where obj_type_code=3 and obj_id in

(select assoc_to_obj_id from dasc where assoc_type_code=245 and

assoc_from_obj_id in

(select obj_id from dobj where obj_name=

'ACTION_BLOCK' and obj_model_ID='MODEL_ID')

))))))))));


  1. Finally, a simpler option not using SQL to get the information required is to search the existing generated ICM files for the action block name/member name.