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.
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.
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.
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.
Using the zosXtrChecker.exe
In this mode, the check is performed at databases, schemas, system data type, user datatype, tables, views and aliases definition.
In this mode, the check is performed at procedures, functions, indexes, triggers and parameters definition
In this mode, the check is performed at tables and views columns, indexed columns definition
In this mode, the check is performed at TableReferences, ViewsDependencies, TriggersDDL, ViewsDDL, ProceduresDDL, FunctionsDDL
The combination of mode consist of a simple addition of mode numbers:
- Mode 3 is level 1 combined with level 2
- Mode 5 is level 1 combined with level 4
- Mode 6 is level 2 combined with level 4
- Mode 7 is the combination of levels 1, 2 and 4
- Mode 9 is level 1 combined with level 8
- Mode 10 is level 2 combined with level 8
- Mode 11 is the combination of levels 1, 2 and 8
- Mode 12 is level 4 combined with level 8
- Mode 13 is the combination of levels 1, 4 and 8
- Mode 14 is the combination of levels 2, 4 and 8
- 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,
- Set a batch file (ZOSVALIDATOR.BAT) with a content looking as the following:
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"
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
- 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
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..
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