IMS data access methods
IMS data can be accessed by the Accelerator Loader server using different data access methods.
By default Accelerator Loader server will access IMS data directly using the underlying VSAM data sets. This access method, called "IMS Direct", provides both map reduce and parallelism support for accessing native IMS files. This support bypasses the requirement of having to use native IMS API calls by reading the IMS database files directly - similar to how an unload utility works - instead of through DLI calls. This method provides a significant increase in performance and reduced elapsed time in processing analytical type queries.
When an IMS SQL query is run, the SQL engine for the server will determine if the request is best executed using IMS Direct (native file support) or if IMS APIs are required. The determination is based on database and file types supported as well as the size of the database. Virtual tables of the IMS segments are required.
The following types of IMS databases are currently supported by IMS Direct:
- Hierarchical direct access method (HDAM) - VSAM and OSAM
- Hierarchical indexed direct access method (HIDAM) - VSAM and OSAM
- Partitioned HDAM (PHDAM) - VSAM and OSAM
- Partitioned HIDAM (PHIDAM) - VSAM and OSAM
- Fast Path data entry database (DEDB)
When using IMS Direct, there is no locking involved when accessing the data, so updates may not be captured and deleted records may have been captured. Security is managed on the IMS native data set itself when IMS Direct is used. The user ID of the client connection must have the necessary security permissions for reading the IMS database data set(s).
When IMS Direct access is not available, the Accelerator Loader server will use DBCTL access using map reduce and parallelism support. Map reduce is an algorithm that enables the Accelerator Loader server to streamline how it accesses IMS data, thereby reducing the processing time required to virtualize IMS data. Statistics about the IMS database are collected and stored within a metadata repository from which the SQL engine optimizes the map reduce process.
In order to exploit the map reduce architecture for IMS using DBCTL as the access method, the Accelerator Loader server must collect information about the IMS database so that it can be used by the SQL engine optimizer. This information is stored within the Accelerator Loader server metadata repository for optimization and can be refreshed at regular intervals.
Metadata repository
The metadata repository for MapReduce stores statistics about virtual tables defined on IMS data sources that are used to enhance performance in conjunction with MapReduce. This support applies to IMS and all DRDA backend data sources, including those accessed via the IBM Federated Server (such as Terradata and Sybase), as well as data sources accessed via the Accelerator Loader server's direct DRDA support (Db2 LUW and Oracle).
This information can be collected by the following command query:
SELECT IMSRange(’IMS DBD name’)
The following sample batch job can be executed at regular intervals to populate the IMS metadata repository with fresh statistics. This sample job is provided in hlq.SHLVCNTL(HLVRANGE). Instructions for required edits to the job are provided in the member.
//RANGE EXEC PGM=HLVXMAPD,PARM=’SSID=hlvid’,MXR=30000000'
//STEPLIB DD DISP=SHR,DSN=hlq.SHLVLOAD
//RPT DD SYSOUT=*
//FMT DD SYSOUT=*,DCB=LRECL=4096
//IN DD *
SELECT IMSRANGE('<IMS DBD NAME>');
/*
- hlvid is the name of the Accelerator Loader server started task that was customized using Tools Customizer
- hlq.SHLVLOAD is the Accelerator Loader server load library
- IMS DBD Name is the four-character IMS subsystem name.
No additional configuration or customization is required to take advantage of either of these access methods.