Purpose

Introduction

This page presents the tool zOS Extraction Checker (zosXtrChecker). zosXtrChecker is a consistency checker used to check whether some inconsistencies were added by mistake in the zOS files resulting from the DB2 Server extraction.The tool gives as result the file and line where the error was found.

Objectives

The tool is designed in a way that when having the zOS files from customers, its usage avoids asking customer's to process a new extraction of their Server because it helps pointing out the inconsistencies and therefore apply the correction in the files themselves.
However, issues might comes from the fact that customers have changed the extractor (which is a JCL text file that can be edited at will) and therefore, the only hint could be to provide customers with the latest version of the extractor so they can process a new extraction.

Usage Context

Currently, It is possible to use the validator manually, however, the exe file zosXtrChecker.exe must be kept in the CAST 7.0 (at least) installation folder.

Scope

The checker always covers all the features provided by the latest extractor. Therefore, it detects (so enable to resolve) bugs existing in prior version of the extractor.

Applicable in CAST Version
Release
Yes/No
8.2.x(tick)
8.1.x(tick)
8.0.x(tick)
7.3.x(tick)
7.2.x(tick)
7.0.x(tick)


Details

Using the zosXtrChecker.exe

Validation mode

Mode 1

In this mode, the check is performed at databases, schemas, system data type, user datatype, tables, views and aliases definition.

Mode 2

In this mode, the check is performed at procedures, functions, indexes, triggers and parameters definition

Mode 4

In this mode, the check is performed at tables and views columns, indexed columns  definition

Mode 8

In this mode, the check is performed at TableReferences, ViewsDependencies, TriggersDDL, ViewsDDL, ProceduresDDL, FunctionsDDL

Combined modes

The combination of mode consist of a simple addition of mode numbers:

  1. Mode 3 is level 1 combined with level 2
  2. Mode 5 is level 1 combined with level 4
  3. Mode 6 is level 2 combined with level 4
  4. Mode 7 is the combination of levels 1, 2 and 4
  5. Mode 9 is level 1 combined with level 8
  6. Mode 10 is level 2 combined with level 8
  7. Mode 11 is the combination of levels 1, 2 and 8
  8. Mode 12 is level 4 combined with level 8
  9. Mode 13 is the combination of levels 1, 4 and 8
  10. Mode 14 is the combination of levels 2, 4 and 8
  11. Mode 15 is the combination of levels 1, 2,4 and 8

Note that more there is combination, the most execution duration is long. Mode 15 is slowest mode as it performs all the checks.

Setting for Manual execution

To manually execute the validator,

  1. Set a batch file (ZOSVALIDATOR.BAT) with a content looking as the following:
    @echo off
    SET CAST_INTALL_DIR=D:\CAST\Builds\Lindbergh_Build3232_flat
    SET ZOS_TARGET_DIR=D:\CAST\Bugs\ZOS\company\appname
    SET ZOS_REFFILE=DB2.MANIFEST
    SET ZOS_VALIDATION_MODE=1
    SET ZOS_COMPACT=0
    REM
    cd /D "%CAST_INTALL_DIR%"
    echo CAST_INTALL_DIR = %CAST_INTALL_DIR%
    echo ZOS_TARGET_DIR = %ZOS_TARGET_DIR%
    echo REFERENCE FILE = %ZOS_REFFILE%
    echo MODE = %ZOS_VALIDATION_MODE%
    echo [COMPACT] = %ZOS_COMPACT%
    echo LOG = "%ZOS_TARGET_DIR%%ZOS_REFFILE% Mode %ZOS_VALIDATION_MODE%.log"
    REM the test is done here with mode 1 which can be changed at will
    REM mode 1
    REM databases, schemas, system data type, user datatype, tables, views and aliases definition
    zosXtrChecker.exe "%ZOS_TARGET_DIR%%ZOS_REFFILE%" %ZOS_VALIDATION_MODE% %ZOS_COMPACT% > "%ZOS_TARGET_DIR%%ZOS_REFFILE% Mode %ZOS_VALIDATION_MODE%.log"
    pause
    REM CAST_INTALL_DIR and ZOS_TARGET_DIR variables should be set respectively the CAST flat folder and to the path where the files to check reside
  2. Execute the bacth file from the Command Editor

Note: The validator can be applied on the manifest or the filter file. Therefore, the parameter ZOS_REFFILE can be set either to DB2.MANIFEST or to DB2.FILTER

Examples

Warning in Triggers

REM mode 8
REM TableReferences, ViewsDependencies, TriggersDDL, ViewsDDL, ProceduresDDL, FunctionsDDL
REM NOTE : CTRIGGERS.DDL      = OW,N,SN,R,    TX* but extraction format doesnot match the one expected
REM                                          The lastfiled must be of BINARY FORMAT and cause bit slip
REM     Other errors
REM     ERROR ::     <+> Field size too big: actual field size is bounded to 512 while the specified value is 1500 for column 2.
REM     INFO ::    <+> File 'D:\CAST\Bugs\ZOS\company\appname\DB2.PROSRC' contains 36 valid entries and 35 was rejected (not valid).
REM     ERROR ::    <+> File being processed contains errors not all it contains was read back..

Missing file

Inconsistent lenght

Note that the tool only checks the size lenght according the parameter value. Afterwards, it is up to the user to get what (spaces) is impacting the size


Notes / Comments



Related Pages