Reporting on Gen model Windows GUI client information (API/Reports)
search cancel

Reporting on Gen model Windows GUI client information (API/Reports)

book

Article ID: 392734

calendar_today

Updated On:

Products

Gen - Host Encyclopedia Gen Gen - Workstation Toolset

Issue/Introduction

Need to report on information/artifacts for Windows GUI clients in a Gen 8.6 model.
Is there functionality e.g. API that would retrieval of the following information from the meta model?

  • GUI window and dialog box definitions.
  • Controls (buttons, text fields, combo boxes).
  • Dialog flows, transitions, events, and triggers.
  • Data views (import/export views) associated with GUI components.
  • Relationships between windows/dialog boxes and logic (action blocks).

A Host Encyclopedia is being used.

Resolution


API Programs

There are API demo programs for:
1. Workstation API - accessing downloaded model that has been opened by Toolset to create *.dat files.
2. Windows Encyclopedia API - accessing model direct from an Encyclopedia

Doc reference pages: 
Using Windows, UNIX, and Linux APIs
 - Workstation API
 - Windows Encyclopedia API

NOTE: It should not be necessary to rebuild the API demo programs to use them. Even though they were built at 8.6 GA time with Visual Studio 2015 they should still run successfully.

  1. Workstation API
    Relevant directory is "%Gen86%\Gen\Samples\APIDemo"
    Run program apidemow.exe.
    Example session shown below.
    NOTE: Do not use quotes around the model PATH even though it contains spaces. Using quotes will fail to locate the model.
    ========================================================
    ****** MAIN MENU ******
    1 - Encyclopedia Functions
    2 - Model Functions
    3 - Object Functions
    4 - Subset Functions
    5 - Checkout Functions
    6 - User/Group Functions
    7 - Authorization Functions
    8 - Schema Functions
    9 - Count Functions
    Select <Enter to Exit> -> 2

    ****** Model Functions ******
    8  - EApiOpenModel
    9  - EApiFetchModelInfo
    10 - EApiFetchModelCreateInfo
    11 - EApiFetchModelLastUpdateInfo
    12 - EApiFetchModelParentInfo
    13 - EApiFetchModelChkoutInfo
    14 - EApiFetchModelByName
    15 - EApiLockModel
    16 - EApiUnLockModel
    17 - EApiFetchAllModelObjects
    18 - EApiFetchAllModelTypeObjs
    Select <Enter to Exit> -> 8

    Inputs for function::EApiOpenModel
    Enter model path -> C:\Users\Administrator\Documents\CA\Gen 8.6\Models\samp86.ief

    Outputs for function::EApiOpenModel
    Function return status is EAPI_SUCCESSFUL_RC
    Press <Enter> to Continue

    ****** Model Functions ******
    8  - EApiOpenModel
    9  - EApiFetchModelInfo
    10 - EApiFetchModelCreateInfo
    11 - EApiFetchModelLastUpdateInfo
    12 - EApiFetchModelParentInfo
    13 - EApiFetchModelChkoutInfo
    14 - EApiFetchModelByName
    15 - EApiLockModel
    16 - EApiUnLockModel
    17 - EApiFetchAllModelObjects
    18 - EApiFetchAllModelTypeObjs
    Select <Enter to Exit> -> 9

    Inputs for function::EApiFetchModelInfo
    Model Id ->  *** Just hit Enter here ***

    Outputs for function::EApiFetchModelInfo
    ModelName = GEN SAMPLE MODEL 8 6
    ModelType = D
    ModelStatus = M
    Release = 9.2.A6
    UserId =
    CodePage = 1252
    LanguageCode = 0
    Function return status is EAPI_SUCCESSFUL_RC
    Press <Enter> to Continue

    ****** Model Functions ******
    8  - EApiOpenModel
    9  - EApiFetchModelInfo
    10 - EApiFetchModelCreateInfo
    11 - EApiFetchModelLastUpdateInfo
    12 - EApiFetchModelParentInfo
    13 - EApiFetchModelChkoutInfo
    14 - EApiFetchModelByName
    15 - EApiLockModel
    16 - EApiUnLockModel
    17 - EApiFetchAllModelObjects
    18 - EApiFetchAllModelTypeObjs
    Select <Enter to Exit> ->
    ========================================================

  2. Windows Encyclopedia API
    Relevant directory is "%Gen86%\CSE" and below.
    If for the Gen 8.6 install a Typical Install was done rather than a Custom Install there won't be a CSE directory.
    Can use Control Panel\Programs and Features and right mouse button on "CA Gen 8.6".
    Select Change, then Next and finally Modify.
    Select "Encyclopedia Server" from the list.
    It does not matter if Gen 8.6 PTFs have been installed since the original install because the CSE itself is not going to be used and only the API programs are going to be used which have not changed since GA.
    The directory "%Gen86%\CSE\bin" contains these read api* executables:
     - apidem2m.exe
     - apidemo.exe
     - apidemo2.exe
     - apidemom.exe
    apidemom.exe is the one built with DB2 libraries which can be used to access the z/OS HE.
    However need to have the DB2 client installed per the Windows Encyclopedia API doc. page and section "Remote DB2 Access". So using the Workstation API on a downloaded model may be easiest.

    NOTE: The above programs are of course just demo programs and user would need to write own program using the published API functions to get the specific information required. To help with that the Gen Meta Model is described in file odrpta.chm (directory "%Gen86%\Gen").


Other non-API options

1. GUI Windows information is not readily available via HE Reports and SQL against HE tables/Public Interface Views would be needed.
However there are some Toolset reports which could help with most of what the user needs.
For example:
"Window Definition" (shows Windows and Dialog Boxes for all PSteps which have them)
"Where Used" (shown as "Relationship Uses" in Toolset)
Here is a full list: Using the Toolset > Reports in Toolset
Below are example screenshots using the sample model after opening its Business System "COOP_CORPORATE_MANAGEMENT" which has both GUI Clients and servers.

"Window Definition"






NOTE: PStep CLIENT_MENU and its window has no views but for other PSteps with windows/dialog boxes that have views they are also shown in the report.

"Relationship Uses"






2. Another option is to check if the Gen partner products, GuardIEn from IET, "Access Gen" from Response Systems, are installed and if they might be useful to report on what is needed.