Load Views
    • 04 Jan 2024
    • 3 Minutes to read
    • Contributors
    • Dark
      Light

    Load Views

    • Dark
      Light

    Article summary

    Introduction

    LoadViews is a batch process to load the imported data into the historical tables. This process is normally realized once a day and can be automated as well. The following diagram gives an overview of the proces:

     

    The LoadViews is done through the DataLoader utility. However, you can save a Load configuration on the DinoDB and automate its execution through the DinoUtil command line interface and the Windows Task Scheduler.

    Creating a LoadViews configuration

    If you can execute database scripts, you can execute the AddLoadViews.sql script located into the LoadViews.zip folder into the Scripts folder: 


    To create a LoadViews configuration manually, open the Data Loader utility, select menu Data and Import Data: 


    Select the products: 


    Select the phases to execute: 


    In the example is select Load phase and after load, clean importation tables. 

    Select the views 


    You select per product the history views and periodicity to load: 


    Process like this for all views.

    Save the load configuration to execute it from the automation utility (DinoUtil.exe). To save, select file, Save As… and give a name to use in your automation script. 



    Testing the Load Configuration 

    The LoadViews process consists in loading into the historical tables the data present on the importation tables. 

    Note: To avoid loading the same data more than one time, we should stop the data importation process while we are doing the LoadViews. 

    The importation of data normally is done by the DinoMessaging service and should be on service for each zOS LPAR. Stop these services before running the LoadViews. 



    Other option to import data is the “Import from MVS Server” from the DataLoader utility: 



    Now you can run your LoadViews configuration pressing the start button and get a resulting report such as the screen bellow: 


    After the LoadViews process ended, you can start the DinoMessaging services again. 

    LoadViews Process

    The LoadViews process can be resumed in the four steps summarized below: 

    PhaseDescription
    Stop servicesStop all DinoMessaging services to pause the importing of mainframe data on the import tables
    Load viewsLoad history tables based on the data present on the importation tables
    Truncate dataClear the importation tables because the data has already loaded on the history tables
    Start servicesResume the import of mainframe data

    You can use our supplied script “LoadViews.cmd”. The ServiceList.ini is the list of DinoMessaging services available and that will be stop and started:


    Or you can write your own: 

    NET STOP DinoMVS1        >> "C:\Program Files (x86)\ZETALY Explorer"\LoadViews.log 
    DinoUtil.exe -load LoadViews    >> "C:\Program Files (x86)\ ZETALY Explorer"\LoadViews.log 
    NET START DinoMVS1        >> "C:\Program Files (x86)\ ZETALY Explorer"\LoadViews.log

    LoadViews with Swap Process

    If you use ZETALY Smart to monitor your production jobs, you may prefer this modality because the importation of mainframe data (DinoMessaging services) is: stop a few minutes just to stop the services and swap the importations tables on the database. The process is summarized below: 

    PhaseDescription
    Stop serviceStop all DinoMessaging services to pause the importing of mainframe data on the import tables (xxxData)
    Swap tablesSwap importation tables: xxxData < -- > xxxData1
    Start servicesResume the import of mainframe data (xxxData)
    Load viewsLoad history tables based on the data present on the importation tables (xxxData1)
    Truncate dataClear the importation tables (xxxData1) because the data has already loaded on the history tables

    We supplied the “SwapLoadViews.cmd” 

    The following diagram describes the process: 

    We provide two examples of batch files that are inside the zip file. 

    See below the list of files that are inside the zip file.



    The zip file can be found in Script directory on ZETALY Server.

    Scheduling a LoadViews Task 

    You can use Windows Task Scheduler to automate your LoadView task: 


    Run the following command in an Adminstrative console: 

    schtasks /CREATE /TN DinoLoad /RU "SYSTEM" /SC daily /ST 05:00 /TR "C:\Program Files (x86) \Dino Explorer 2015\LoadViews.CMD"


    You can check the parameters on the Task Scheduler (Windows Administrative Tools): 


    Right click into DinoLoad task and select properties: 


    You can change the user, time, path,,, 

    And you can also test: “Run Now” 


    Troubleshooting

    See this article for any troubleshoots.


    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.