- Print
- DarkLight
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:
Phase | Description |
---|---|
Stop services | Stop all DinoMessaging services to pause the importing of mainframe data on the import tables |
Load views | Load history tables based on the data present on the importation tables |
Truncate data | Clear the importation tables because the data has already loaded on the history tables |
Start services | Resume 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:
Phase | Description |
---|---|
Stop service | Stop all DinoMessaging services to pause the importing of mainframe data on the import tables (xxxData) |
Swap tables | Swap importation tables: xxxData < -- > xxxData1 |
Start services | Resume the import of mainframe data (xxxData) |
Load views | Load history tables based on the data present on the importation tables (xxxData1) |
Truncate data | Clear 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.