Data File Compare
Report Files with 133 Byte Records
  Table of Contents  v-16.01.01 - rpt13301.htm 
  Introduction
  Primary Functions
  JCL Members for Data File Compare
  EQ Compare Results
  NE Results based on Record Content
  NE Results based on File Truncation
  CMD Files for Data File Compare
  EQ Compare Results
  NE Results based on Record Content
  NE Results based on File Truncation
  COBOL Program for Data File Compare
  Secondary Functions
  Generate a Data File Compare Program
  The Process Control File, an Example
  Delete & Define a Log File
  Create a SYSLOG File using a JCL Member
  Create a SYSLOG File using a CMD File
  Ancillary Functionality
  Set the Environment
  Display and Log Messages
  Create Test Files
  Create Test Files using a JCL Member
  Create Test Files using Windows CMD Files
  Baseline, Primary Test File
  2nd Baseline, Different Data/Time Stamps
  Truncated Test File, Different Record Count
  Modified Test File, Different Record Content
  Summary
  Software Agreement and Disclaimer
  Downloads and Links
  Current Server or Internet Access
  Internet Access Required
  Glossary of Terms
  Comments or Feedback
  Company Overview
The SimoTime Home Page 

Table of Contents Previous Section Next Section Introduction

The 1st section Primary Functions of this document will focus on doing an actual compare of two sequential files containing report information is a print-oriented format. The 2nd section Secondary Functions will focus on the preparation tasks required prior to doing file compare. The 3rd section Ancillary Functions will describe some of the supporting tasks (such as creating test files) that are required.

This example will use IEBGENER or the Windows "echo" function to create the sequential files to be used for testing. The files will be used to demonstrate the capabilities of the data file compare processes and some of the requirements that are unique to print-oriented files. The first two files contain the same record content and produce an equal compare result. A third file has a record with different content and the compare process will identify the difference.

This example includes JCL Members, Windows CMD Files and COBOL programs. In the world of programming there are many ways to solve a problem. This suite of programs is provided as one of the many possible solutions for comparing data files. The files used in this suite of sample programs use fixed length records of eighty-bytes. When the files are compared and if a difference is found the COBOL compare program will call SIMOHEX4.CBL and SIMOLOGS.CBL. These programs and their associated copy files are part of the SIMOLIBR package. Refer to the Downloads and Links to Similar Pages section of this document for additional information.

Many companies are looking for ways to compare data files using a mainframe system and a distributed system (i.e. Linux, UNIX and/or Windows or "LUW") running Micro Focus sub-systems. This utility program (UTCOMPRT) is intended to assist in these efforts. The UTCOMPRT program runs in the Windows environment and generates comparison programs (COBOL Source Code) that may be compiled and executed on a distributed LUW platform with Micro Focus.


We have made a significant effort to ensure the documents and software technologies are correct and accurate. We reserve the right to make changes without notice at any time. The function delivered in this version is based upon the enhancement requests from a specific group of users. The intent is to provide changes as the need arises and in a timeframe that is dependent upon the availability of resources.

Copyright © 1987-2025
SimoTime Technologies and Services
All Rights Reserved

Table of Contents Previous Section Next Section Primary Functions

This section will focus on the items (process and procedures) that do the actual data file comparison. A second group of items will be used to generate the comparison program and prepare the environment for the compare tasks. These secondary command files and programs will be described in the Secondary Functions section of this document.

The file compare processes will use a set of data files that have a report-oriented structure. The test files contain two record types. The first record type contains page header information with a date and time stamp. The second record type contains user information.

Table of Contents Previous Section Next Section JCL Members for Data File Compare

This section will focus on the JCL Members that execute the file compare processes. The first JCL Member will compare two files that are logically identical. The second JCL Member will compare two files that have a difference embedded within the files. The Data File Compare program will find the difference and produce a NOT-Equal result. The third JCL Member will compare two files that have different record counts. The Data File Compare program will identify the difference and produce a NOT-Equal result with record counts.

Table of Contents Previous Section Next Section EQ Compare Results

This JCL Member (R133BPJ1.jcl) will compare two sequential files that are identical. The job execution will result in a zero return code and display the record counts to the SYSOUT device.

//R133BPJ1 JOB (SIMOTIME),'DATA FILE COMPARE',CLASS=1,MSGCLASS=0,
//             NOTIFY=CSIP1
//* *******************************************************************
//*       R133BPJ1.JCL - a JCL Member for Batch Job Processing        *
//*       This JCL Member is provided by SimoTime Technologies        *
//*           (C) Copyright 1987-2019 All Rights Reserved             *
//*             Web Site URL:   http://www.simotime.com               *
//*                   e-mail:   helpdesk@simotime.com                 *
//* *******************************************************************
//*
//* Text   - Compare two data files.
//* Author - SimoTime Technologies
//* Date   - January 24, 1996
//*
//* This set of programs will run on a mainframe under MVS or on a
//* Personal Computer with Windows and Micro Focus Technologies.
//*
//*                     ************
//*                     * R133BPJ1 *
//*                     ********jcl*
//*                          *
//*    ************     ************     ************
//*    * REPORT01 *-----* R133BPC1 *-----*  SYSOUT  *
//*    ********dat*  *  ********cbl*  *  ************
//*                  *       *        *
//*    ************  *       *        *  ************
//*    * REPORT02 *--*       *        *--*  SYSLOG  *
//*    ********dat*          *           *******vseq*
//*                          *
//*                     ************
//*                     *   EOJ    *
//*                     ************
//*
//* *******************************************************************
//* Step 1 of 1, Compare two data files, expect an EQUAL result...
//*
//COMPARE1 EXEC PGM=R133BPC1
//STEPLIB  DD  DSN=SIMOTIME.PDS.LOADLIB,DISP=SHR
//REPORT01 DD  DSN=SIMOTIME.DATA.RPT133D1,DISP=SHR
//REPORT02 DD  DSN=SIMOTIME.DATA.RPT133D2,DISP=SHR
//SYSLOG   DD  DSN=SIMOTIME.SYSLOG.COMPARE,DISP=SHR
//SYSOUT   DD  SYSOUT=*
//

Table of Contents Previous Section Next Section NE Results based on Record Content

This JCL Member (R133BPJ2.jcl) will compare two files that have a difference embedded within the files. The Data File Compare programs will find the difference and produce a NOT-Equal result. The record counts and the difference will be displayed to the SYSOUT device.

//R133BPJ2 JOB (SIMOTIME),'DATA FILE COMPARE',CLASS=1,MSGCLASS=0,
//             NOTIFY=CSIP1
//* *******************************************************************
//*       R133BPJ2.JCL - a JCL Member for Batch Job Processing        *
//*       This JCL Member is provided by SimoTime Technologies        *
//*           (C) Copyright 1987-2019 All Rights Reserved             *
//*             Web Site URL:   http://www.simotime.com               *
//*                   e-mail:   helpdesk@simotime.com                 *
//* *******************************************************************
//*
//* Text   - Compare two data files.
//* Author - SimoTime Technologies
//* Date   - January 24, 1996
//*
//* This set of programs will run on a mainframe under MVS or on a
//* Personal Computer with Windows and Micro Focus Technologies.
//*
//*                     ************
//*                     * R133BPJ2 *
//*                     ********jcl*
//*                          *
//*    ************     ************     ************
//*    * REPORT01 *-----* R133BPC1 *-----*  SYSOUT  *
//*    ********dat*  *  ********cbl*  *  ************
//*                  *       *        *
//*    ************  *       *        *  ************
//*    * REPORT02 *--*       *        *--*  SYSLOG  *
//*    ********dat*          *           *******vseq*
//*                          *
//*                     ************
//*                     *   EOJ    *
//*                     ************
//*
//* *******************************************************************
//* Step 1 of 1, Compare two data files, expect an EQUAL result...
//*
//COMPARE1 EXEC PGM=R133BPC1
//STEPLIB  DD  DSN=SIMOTIME.PDS.LOADLIB,DISP=SHR
//REPORT01 DD  DSN=SIMOTIME.DATA.RPT133D1,DISP=SHR
//REPORT02 DD  DSN=SIMOTIME.DATA.RPT133D4,DISP=SHR
//SYSLOG   DD  DSN=SIMOTIME.SYSLOG.COMPARE,DISP=SHR
//SYSOUT   DD  SYSOUT=*
//

Table of Contents Previous Section Next Section NE Results based on File Truncation

This JCL Member File (R133BPJ3.jcl) will compare two sequential files that have different record counts. The Data File Compare program will identify the difference in record counts and produce a NOT-Equal or non-Zero result. The record counts and the difference will be displayed to the SYSOUT device.

//R133BPJ3 JOB (SIMOTIME),'DATA FILE COMPARE',CLASS=1,MSGCLASS=0,
//             NOTIFY=CSIP1
//* *******************************************************************
//*       R133BPJ3.JCL - a JCL Member for Batch Job Processing        *
//*       This JCL Member is provided by SimoTime Technologies        *
//*           (C) Copyright 1987-2019 All Rights Reserved             *
//*             Web Site URL:   http://www.simotime.com               *
//*                   e-mail:   helpdesk@simotime.com                 *
//* *******************************************************************
//*
//* Text   - Compare two data files.
//* Author - SimoTime Technologies
//* Date   - January 24, 1996
//*
//* This set of programs will run on a mainframe under MVS or on a
//* Personal Computer with Windows and Micro Focus Technologies.
//*
//*                     ************
//*                     * R133BPJ3 *
//*                     ********jcl*
//*                          *
//*    ************     ************     ************
//*    * REPORT01 *-----* R133BPC1 *-----*  SYSOUT  *
//*    ********dat*  *  ********cbl*  *  ************
//*                  *       *        *
//*    ************  *       *        *  ************
//*    * REPORT02 *--*       *        *--*  SYSLOG  *
//*    ********dat*          *           *******vseq*
//*                          *
//*                     ************
//*                     *   EOJ    *
//*                     ************
//*
//* *******************************************************************
//* Step 1 of 1, Compare two data files, expect an EQUAL result...
//*
//COMPARE1 EXEC PGM=R133BPC1
//STEPLIB  DD  DSN=SIMOTIME.PDS.LOADLIB,DISP=SHR
//REPORT01 DD  DSN=SIMOTIME.DATA.RPT133D1,DISP=SHR
//REPORT02 DD  DSN=SIMOTIME.DATA.RPT133D3,DISP=SHR
//SYSLOG   DD  DSN=SIMOTIME.SYSLOG.COMPARE,DISP=SHR
//SYSOUT   DD  SYSOUT=*
//

Table of Contents Previous Section Next Section CMD Files for Data File Compare

This section will focus on three CMD Files that execute a simple file compare process. The first CMD File will compare to files that are logically identical. The second CMD File will compare two files that have a difference embedded within the files. The Data File Compare program will find the difference and produce a NOT-Equal result. The third CMD File will compare two files that have different record counts. The Data File Compare program will identify the difference and produce a NOT-Equal result with record counts.

Table of Contents Previous Section Next Section EQ Compare Results

This CMD File (R133BPW1.cmd) will compare two sequential files. The user data is identical. The date and time stamps in the header records are not equal in value. The compare program uses the OMIT/Bypass functions to bypass comparing the header records. The job execution will result in a zero return code and display the record counts to the SYSOUT device.

@echo OFF
rem  * *******************************************************************
rem  *               R133BPW1.CMD - a Windows Command File               *
rem  *         This program is provided by SimoTime Technologies         *
rem  *           (C) Copyright 1987-2019 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  *
rem  * Text   - Compare two sequential files
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * This set of programs will compare two record sequential (RSEQ)
rem  * files using the conditional bypass of records to be compared.
rem  * The RSEQ files are identical.
rem  * Therefore, an Equal status will be posted with a normal EOJ.
rem  *
rem  *                     ************
rem  *                     * R133BPW1 *
rem  *                     ********cmd*
rem  *                          *
rem  *                          *
rem  *    ************     ************     ************
rem  *    * RPT133D1 *-----* R133BPC1 *-----*  SYSLOG  *
rem  *    *******rseq*  *  ********cbl*     ************
rem  *                  *       *
rem  *    ************  *       *
rem  *    * RPT133D2 *--*       *
rem  *    *******rseq*          *
rem  *                          *
rem  *                     ************
rem  *                     *   EOJ    *
rem  *                     ************
rem  *
rem  * *******************************************************************
rem  * Step   1   Delete any previously created file...
rem  *
     set CmdName=R133BPW1
     call ..\Env1BASE %CmdName%
     set JobStatus=0000
     if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
rem  *
     call SimoNOTE "*******************************************************%CmdName%"
     call SimoNOTE "Starting CmdName %CmdName%"
:PrepareQSAM
     call SimoNOTE "StepInfo Prepare the File Name Mapping"
     set REPORT01=%BaseLib1%\DATA\APPL\SIMOTIME.DATA.RPT133D1.DAT
     set REPORT02=%BaseLib1%\DATA\APPL\SIMOTIME.DATA.RPT133D2.DAT
     call SimoNOTE "SYSUT1 is %REPORT01%"
     call SimoNOTE "SYSUT2 is %REPORT02%"
rem  *
rem  * *******************************************************************
rem  * Step   2   Compare the two files...
rem  *
:ExecuteCompareRoutine
     call SimoNOTE "StepInfo Execute the Compare Program"
     run R133BPC1
     if not "%ERRORLEVEL%" == "0" set JobStatus=0010
     if not %JobStatus% == 0000 goto :EojNok
     call SimoNOTE "Compare-One is %REPORT01%"
     call SimoNOTE "Compare-Two is %REPORT02%"
rem  *
rem  *
rem  * *******************************************************************
:EojAok
     call SimoNOTE "Finished JobName %CmdName%, Job Status is %JobStatus%"
     goto :End
:EojNok
     call SimoNOTE "ABENDING JobName %CmdName%, Job Status is %JobStatus%"
:End
     if not "SIMOGENS" == "BATCH" call SYSLOGW1
     if not "SIMOGENS" == "BATCH" pause

Table of Contents Previous Section Next Section NE Results based on Record Content

This CMD File (R133BPW2.cmd) will compare two sequential files that have a difference embedded within the files. The Data File Compare program will find the difference and produce a NOT-Equal or non-Zero result. The record counts and the difference will be displayed to the SYSOUT device.

@echo OFF
rem  * *******************************************************************
rem  *               R133BPW2.CMD - a Windows Command File               *
rem  *         This program is provided by SimoTime Technologies         *
rem  *           (C) Copyright 1987-2019 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  *
rem  * Text   - Compare two sequential files
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * This set of programs will compare two record sequential (RSEQ)
rem  * files using the conditional bypass of records to be compared.
rem  * One of the record sets in the RSEQ files is different.
rem  * Therefore, a NOT-Equal status will be posted with an ABEND.
rem  *
rem  *                     ************
rem  *                     * R133BPW2 *
rem  *                     ********cmd*
rem  *                          *
rem  *                          *
rem  *    ************     ************     ************
rem  *    * RPT133D1 *-----* R133BPC1 *-----*  SYSLOG  *
rem  *    *******rseq*  *  ********cbl*     ************
rem  *                  *       *
rem  *    ************  *       *
rem  *    * RPT133D2 *--*       *
rem  *    *******rseq*          *
rem  *                          *
rem  *                     ************
rem  *                     *   EOJ    *
rem  *                     ************
rem  *
rem  * *******************************************************************
rem  * Step   1   Delete any previously created file...
rem  *
     set CmdName=R133BPW2
     call ..\Env1BASE %CmdName%
     set JobStatus=0000
     if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
rem  *
     call SimoNOTE "*******************************************************%CmdName%"
     call SimoNOTE "Starting CmdName %CmdName%"
:PrepareQSAM
     call SimoNOTE "StepInfo Prepare the File Name Mapping"
     set REPORT01=%BaseLib1%\DATA\APPL\SIMOTIME.DATA.RPT133D1.DAT
     set REPORT02=%BaseLib1%\DATA\APPL\SIMOTIME.DATA.RPT133D4.DAT
     call SimoNOTE "SYSUT1 is %REPORT01%"
     call SimoNOTE "SYSUT2 is %REPORT02%"
rem  *
rem  * *******************************************************************
rem  * Step   2   Compare the two files...
rem  *
:ExecuteCompareRoutine
     call SimoNOTE "StepInfo Execute the Compare Program"
     run R133BPC1
     if not "%ERRORLEVEL%" == "0" set JobStatus=0010
     if not %JobStatus% == 0000 goto :EojNok
     call SimoNOTE "Compare-One is %REPORT01%"
     call SimoNOTE "Compare-Two is %REPORT02%"
rem  *
rem  *
rem  * *******************************************************************
:EojAok
     call SimoNOTE "Finished JobName %CmdName%, Job Status is %JobStatus%"
     goto :End
:EojNok
     call SimoNOTE "ABENDING JobName %CmdName%, Job Status is %JobStatus%"
:End
     if not "SIMOGENS" == "BATCH" call SYSLOGW1
     if not "SIMOGENS" == "BATCH" pause

Table of Contents Previous Section Next Section NE Results based on File Truncation

This CMD File (R133BPW3.cmd) will compare two sequential files that have different record counts. The Data File Compare program will identify the difference in record counts and produce a NOT-Equal or non-Zero result. The record counts and the difference will be displayed to the SYSOUT device.

@echo OFF
rem  * *******************************************************************
rem  *               R133BPW3.CMD - a Windows Command File               *
rem  *         This program is provided by SimoTime Technologies         *
rem  *           (C) Copyright 1987-2019 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  *
rem  * Text   - Compare two sequential files
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * This set of programs will compare two record sequential (RSEQ)
rem  * files using the conditional bypass of records to be compared.
rem  * One of the RSEQ files is truncated (i.e. contains fewer records).
rem  * Therefore, a NOT-Equal status will be posted with an ABEND.
rem  *
rem  *                     ************
rem  *                     * R133BPW3 *
rem  *                     ********cmd*
rem  *                          *
rem  *                          *
rem  *    ************     ************     ************
rem  *    * REPORT01 *--*--* R133BPC1 *--*--*  SYSLOG  *
rem  *    *******rseq*  *  ********cbl*  *  ************
rem  *                  *       *        *
rem  *    ************  *       *        *  ************
rem  *    * REPORT02 *--*       *        *--*  SYSOUT  *
rem  *    *******rseq*          *           ************
rem  *                          *
rem  *                     ************
rem  *                     *   EOJ    *
rem  *                     ************
rem  *
rem  * *******************************************************************
rem  * Step   1   Delete any previously created file...
rem  *
     set CmdName=R133BPW3
     call ..\Env1BASE %CmdName%
     set JobStatus=0000
     if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
rem  *
     call SimoNOTE "*******************************************************%CmdName%"
     call SimoNOTE "Starting CmdName %CmdName%"
:PrepareQSAM
     call SimoNOTE "StepInfo Prepare the File Name Mapping"
     set REPORT01=%BaseLib1%\DATA\APPL\SIMOTIME.DATA.RPT133D1.DAT
     set REPORT02=%BaseLib1%\DATA\APPL\SIMOTIME.DATA.RPT133D3.DAT
     call SimoNOTE "SYSUT1 is %REPORT01%"
     call SimoNOTE "SYSUT2 is %REPORT02%"
rem  *
rem  * *******************************************************************
rem  * Step   2   Compare the two files...
rem  *
:ExecuteCompareRoutine
     call SimoNOTE "StepInfo Execute the Compare Program"
     run R133BPC1
     if not "%ERRORLEVEL%" == "0" set JobStatus=0010
     if not %JobStatus% == 0000 goto :EojNok
     call SimoNOTE "Compare-One is %REPORT01%"
     call SimoNOTE "Compare-Two is %REPORT02%"
rem  *
rem  *
rem  * *******************************************************************
:EojAok
     call SimoNOTE "Finished JobName %CmdName%, Job Status is %JobStatus%"
     goto :End
:EojNok
     call SimoNOTE "ABENDING JobName %CmdName%, Job Status is %JobStatus%"
:End
     if not "SIMOGENS" == "BATCH" call SYSLOGW1
     if not "SIMOGENS" == "BATCH" pause

Table of Contents Previous Section Next Section COBOL Program for Data File Compare

The following COBOL program (CPR133C1.cbl) is used to compare two record sequential files (RSEQ) containing 133-byte, fixed length records.

       IDENTIFICATION DIVISION.
       PROGRAM-ID.    R133BPC1.
       AUTHOR.        SIMOTIME TECHNOLOGIES.
      *****************************************************************
      *           This program was generated by SimoZAPS              *
      *             A product of SimoTime Technologies                *
      *        Our e-mail address is: helpdesk@simotime.com           *
      *     Also, visit our Web Site at http://www.simotime.com       *
      *                                                               *
      *  Generation Date: 2020-06-25  Generation Time: 19:20:46:27    *
      *                                                               *
      *                                   Record    Record     Key    *
      *  Function  Name     Organization  Format    Max-Min  Pos-Len  *
      *  PRIMARY   REPORT01 SEQUENTIAL    FIXED      00133            *
      *                                                               *
      *  SECONDARY REPORT02 SEQUENTIAL    FIXED      00133            *
      *                                                               *
      *****************************************************************
       ENVIRONMENT DIVISION.
       INPUT-OUTPUT SECTION.
       FILE-CONTROL.
           SELECT REPORT01-FILE  ASSIGN TO       REPORT01
                  ORGANIZATION  IS SEQUENTIAL
                  ACCESS MODE   IS SEQUENTIAL
                  FILE STATUS   IS REPORT01-STATUS.
           SELECT REPORT02-FILE  ASSIGN TO       REPORT02
                  ORGANIZATION  IS SEQUENTIAL
                  ACCESS MODE   IS SEQUENTIAL
                  FILE STATUS   IS REPORT02-STATUS.

      *****************************************************************
       DATA DIVISION.
       FILE SECTION.
       FD  REPORT01-FILE
           DATA RECORD    IS REPORT01-REC
           .
       01  REPORT01-REC.
           05  REPORT01-DATA-01 PIC X(00133).

       FD  REPORT02-FILE
           DATA RECORD    IS REPORT02-REC
           .
       01  REPORT02-REC.
           05  REPORT02-DATA-01 PIC X(00133).

      *****************************************************************
      * This program was created using the SYSCOMP1.txt file as the   *
      * template for the data file comparison. The positions to be    *
      * compared are determined at compile time.                      *
      *                                                               *
      * For more information or questions please contact SimoTime     *
      * Technologies. The version control number is 20.00.00          *
      *                                                               *
      *        Our e-mail address is: helpdesk@simotime.com           *
      *     Also, visit our Web Site at http://www.simotime.com       *
      *****************************************************************
       WORKING-STORAGE SECTION.
       01  SIM-TITLE.
           05  T1 pic X(11) value '* R133BPC1 '.
           05  T2 pic X(34) value 'Compare-133, 2-133 and OMIT-Bypass'.
           05  T3 pic X(10) value ' v20.00.00'.
           05  T4 pic X(24) value '   helpdesk@simotime.com'.
       01  SIM-COPYRIGHT.
           05  C1 pic X(11) value '* R133BPC1 '.
           05  C2 pic X(32) value 'This Data File Compare Member wa'.
           05  C3 pic X(32) value 's generated by SimoTime Technolo'.
           05  C4 pic X(04) value 'gies'.

       01  SIM-THANKS-01.
           05  C1 pic X(11) value '* R133BPC1 '.
           05  C2 pic X(32) value 'A Data File Compare Program gene'.
           05  C3 pic X(32) value 'rated by using SimoTime Technolo'.
           05  C4 pic X(04) value 'gies'.

       01  SIM-THANKS-02.
           05  C1 pic X(11) value '* R133BPC1 '.
           05  C2 pic X(32) value 'Please send all comments or sugg'.
           05  C3 pic X(32) value 'estions to the helpdesk@simotime'.
           05  C4 pic X(04) value '.com'.

       01  REPORT01-STATUS.
           05  REPORT01-STATUS-L     pic X.
           05  REPORT01-STATUS-R     pic X.
       01  REPORT01-EOF              pic X       value 'N'.
       01  REPORT01-OPEN-FLAG        pic X       value 'C'.
       01  REPORT01-LRECL            pic 9(5)    value 00133.

       01  REPORT02-STATUS.
           05  REPORT02-STATUS-L     pic X.
           05  REPORT02-STATUS-R     pic X.
       01  REPORT02-EOF              pic X       value 'N'.
       01  REPORT02-OPEN-FLAG        pic X       value 'C'.
       01  REPORT02-LRECL            pic 9(5)    value 00133.

      *****************************************************************
      * The following buffers are used to create a four-byte status   *
      * code that may be displayed.                                   *
      *****************************************************************
       01  IO-STATUS.
           05  IO-STAT1            pic X.
           05  IO-STAT2            pic X.
       01  IO-STATUS-04.
           05  IO-STATUS-0401      pic 9     value 0.
           05  IO-STATUS-0403      pic 999   value 0.
       01  TWO-BYTES-BINARY        pic 9(4)  BINARY.
       01  TWO-BYTES-ALPHA         redefines TWO-BYTES-BINARY.
           05  TWO-BYTES-LEFT      pic X.
           05  TWO-BYTES-RIGHT     pic X.

      *****************************************************************
      * Message Buffer used by the Z-DISPLAY-MESSAGE-TEXT routine.    *
      *****************************************************************
       01  MESSAGE-BUFFER.
           05  MESSAGE-HEADER      pic X(11)   value '* R133BPC1 '.
           05  MESSAGE-TEXT.
               10  MESSAGE-TEXT-1  pic X(68)   value SPACES.
               10  MESSAGE-TEXT-2  pic X(188)  value SPACES.

      *****************************************************************
       01  APPL-RESULT             pic S9(9)    comp.
           88  APPL-AOK            value 0.
           88  APPL-EOF            value 16.

       01  KEY-ACTIVE              pic X       value 'Y'.
       01  KEY-CONTROL-1.
           05  K-PS-1              pic 9(5)    value 00000.
           05  K-LN-1              pic 9(5)    value 00000.
       01  KEY-CONTROL-2.
           05  K-PS-2              pic 9(5)    value 00000.
           05  K-LN-2              pic 9(5)    value 00000.

       01  KEYRECID-ACTIVE         pic X       value 'N'.
       01  KEYRECID-CONTROL-1.
           05  E-PS-1              pic 9(5)    value 00000.
           05  E-LN-1              pic 9(5)    value 00000.
       01  KEYRECID-CONTROL-2.
           05  E-PS-2              pic 9(5)    value 00000.
           05  E-LN-2              pic 9(5)    value 00000.

       01  READ-FLAGS.
           05  READ-1          pic X       value 'Y'.
           05  READ-2          pic X       value 'Y'.
       01  DUMP-FLAGS.
           05  DUMP-RPI        pic X       value 'Y'.
           05  DUMP-ASC        pic X       value 'Y'.
           05  DUMP-EBC        pic X       value 'Y'.
           05  DUMP-HEX        pic X       value 'Y'.
           05  DUMP-DET-GRP.
               10  DUMP-DET    pic X       value 'Y'.
               10  DUMP-DET-2  pic XX      value 'NE'.
           05  DUMP-SUM        pic X       value 'Y'.
           05  DUMP-STATUS     pic x       VALUE 'Y'.
       01  DUMP-PGM            pic X(8)    value 'ENABLED '.

       01  DPOS-UT1            pic 9(5)    value 1.
       01  DLEN-UT1            pic 9(5)    value 00000.
       01  DPOS-UT2            pic 9(5)    value 1.
       01  DLEN-UT2            pic 9(5)    value 00000.

       01  FUNCTION-FLAGS.
           05  FF-01       pic X       value '1'.
           05  FF-02       pic X       value '0'.
           05  FF-03       pic X       value '1'.

       01  COMPACT-STATUS  pic XX      value 'EQ'.
       01  COMPACT-PENDED  pic XX      value 'EQ'.
       01  COMPARE-STATUS  pic XX      value 'EQ'.
       01  FLAG-EQ         pic XX      value 'EQ'.
       01  FLAG-NE         pic XX      value 'NE'.
       01  FLAG-QT         pic XX      value 'QT'.
       01  DELTA-LINE-1    pic X(1024) value all '-'.
       01  DELTA-LINE-2    pic X(1024) value all '-'.
       01  PTR-1           pic 9(5)    value 0.
       01  PTR-2           pic 9(5)    value 0.
       01  IDX-1           pic 9(5)    value 0.
       01  IDX-2           pic 9(5)    value 0.
       01  BYPASS-UT1-CTR  pic 9(3)    value 0.
       01  BYPASS-UT2-CTR  pic 9(3)    value 0.
       01  WORK-05         pic X(5)    value SPACES.

       01  WORK-LENGTH             pic 9(5)  value 0.

       01  DELTA-MAX-ABEND.
           05  FILLER  pic X(10) value 'ABENDING, '.
           05  FILLER  pic X(24) value 'Not Equal count exceeds '.
           05  FILLER  pic X(22) value 'user-defined limit of '.
           05  DELTA-MAXIMUM-X pic X(9)  value '000000002'.
           05  DELTA-MAXIMUM   redefines DELTA-MAXIMUM-X pic 9(9).
           05  FILLER  pic X(19) value ', ABEND process is '.
           05  DELTA-PROCESS   pic X(4)    value 'EOF '.

       01  IFNECODE-GROUP.
           05  IFNECODE-VALUE pic 9(4) value 0016.

       01  YES-YES         pic XX      value 'YY'.
       01  N-BYTE          pic X       value 'N'.
       01  Y-BYTE          pic X       value 'Y'.
       01  GROUP-DELIMITER pic X       value 'Y'.

       01  LEN-UT1         pic 9(5)    value 128.
       01  POS-UT1         pic 9(5)    value 1.
       01  LEN-UT2         pic 9(5)    value 128.
       01  POS-UT2         pic 9(5)    value 1.

       01  LEN-1           pic 9(5)    value 128.
       01  POS-1           pic 9(5)    value 1.
       01  LEN-2           pic 9(5)    value 128.
       01  POS-2           pic 9(5)    value 1.

       01  D-LEN           pic 9(5)    value 128.
       01  D-POS           pic 9(5)    value 1.

       01  W-LEN           pic 9(5)    value 0.
       01  W-POS           pic 9(5)    value 10.

       01  DUMP-RECL-MAX-S pic X       value 'N'.
       01  DUMP-RECL-MAX   pic 9(5)    value 00000.

       01  CONTINUE-FLAG   pic X       value 'Y'.

       01  ASC-OR-EBC      pic 9(3)    comp    value 0.
       01  ASC-OR-EBC-R    redefines ASC-OR-EBC.
           05  ASC-A       pic X.
           05  EBC-A       pic X.

      *    Header row for positional indicator...
       01  DUMP-H10.
           05  FILLER      pic X(5)    value '....:'.
           05  POS-NO      pic 9(5)    value 10.
           05  FILLER      pic X(10)   value '....:.....'.
       01  DUMP-W10.
           05  FILLER      pic X(5)    value '....:'.
           05  W10-POS-NO  pic X(5)    value '00000'.
           05  FILLER      pic X(10)   value '....:.....'.

       01  DUMP-HEADER     pic X(1024) value all '.'.
       01  D-P1            pic 9(5)    value 0.
       01  WK-1            pic 9(5)    value 0.
       01  WK-2            pic 9(5)    value 0.

       01  RECORD-HEADER.
           05  RECORD-ID   pic X(8)    value 'REPORT01'.
           05  filler      pic X(2)    value '..'.
           05  REC-NUMBER  pic 9(9)    value 0.
           05  filler      pic X       value '('.
           05  RECORD-POS  pic 9(5)    value 0.
           05  filler      pic X       value ':'.
           05  RECORD-LEN  pic 9(5)    value 0.
           05  filler      pic X(2)    value ') '.
           05  REC-CTYPE   pic X(10)   value 'UNKNOWN   '.
           05  filler      pic X(2)    value SPACES.
           05  REC-CMODE   pic X(10)   value 'UNKNOWN   '.

       01  SYSLOG-OUTPUT   pic X(4)    value 'OUT1'.

       01  INFO-STATEMENT.
           05  INFO-SHORT.
               10  INFO-ID pic X(8)    value 'Starting'.
               10  filler  pic X(4)    value '  - '.
               10  INFO-34 pic X(34)
                   value   'Compare-133, 2-133 and OMIT-Bypass'.
           05  filler      pic X(33)
               value '          http://www.SimoTime.com'.

       01  UT1-MISSING.
           05  filler      pic X(5)  value 'This '.
           05  filler      pic X(31)
                           value 'record is MISSING from REPORT01'.
           05  filler      pic X(7)  value ' - the '.
           05  filler      pic X(29)
                           value 'record is PRESENT in REPORT02'.

       01  UT2-MISSING.
           05  filler      pic X(5)  value 'This '.
           05  filler      pic X(29)
                           value 'record is PRESENT in REPORT01'.
           05  filler      pic X(7)  value ' - the '.
           05  filler      pic X(31)
                           value 'record is MISSING from REPORT02'.

       01  REPORT01-TOTAL.
           05  REPORT01-RDR  pic 9(9)  value 0.
           05  filler      pic X(3)  value ' - '.
           05  filler      pic X(25) value 'Record count for REPORT01'.
       01  REPORT02-TOTAL.
           05  REPORT02-RDR  pic 9(9)  value 0.
           05  filler      pic X(3)  value ' - '.
           05  filler      pic X(25) value 'Record count for REPORT02'.
       01  REPORT01-OMIT.
           05  REPORT01-OMT  pic 9(9)  value 0.
           05  filler      pic X(3)  value ' - '.
           05  filler      pic X(25) value 'Bypass count for REPORT01'.
       01  REPORT02-OMIT.
           05  REPORT02-OMT  pic 9(9)  value 0.
           05  filler      pic X(3)  value ' - '.
           05  filler      pic X(25) value 'Bypass count for REPORT02'.
       01  COMPARE-NE-TOTAL.
           05  COMPARE-NE  pic 9(9)  value 0.
           05  filler      pic X(3)  value ' - '.
           05  COMPARE-TAG.
               10  filler  pic X(25) value 'NOT Equal count for compa'.
               10  filler  pic X(25) value 're of existing records   '.
       01  COMPACT-NE-TOTAL.
           05  COMPACT-NE  pic 9(9)  value 0.
           05  filler      pic X(3)  value ' - '.
           05  COMPACT-TAG.
               10  filler  pic X(25) value 'NOT Equal count for compa'.
               10  filler  pic X(25) value 'ct of existing records   '.
       01  COMPARE-EQ-TOTAL.
           05  COMPARE-EQ  pic 9(9)  value 0.
           05  filler      pic X(3)  value ' - '.
           05  filler      pic X(25) value 'Number of matching record'.
           05  filler      pic X(25) value ' pairs for Compare Task  '.
       01  COMPACT-EQ-TOTAL.
           05  COMPACT-EQ  pic 9(9)  value 0.
           05  filler      pic X(3)  value ' - '.
           05  filler      pic X(25) value 'Number of matching record'.
           05  filler      pic X(25) value ' pairs for Compact Task  '.

       01  FORMAT-TYPE     pic X     value 'B'.

       COPY PASSHEX4.
       COPY PASSLOGS.
       COPY PAENVARS.

      *****************************************************************
       PROCEDURE DIVISION.
           perform JOB-STARTING

           perform
               until COMPARE-STATUS = 'QT'
               or    REPORT01-STATUS not = '00'
               or    REPORT02-STATUS not = '00'
               if  READ-1 = 'Y'
                   perform REPORT01-READ
               end-if
               if  READ-2 = 'Y'
                   perform REPORT02-READ
               end-if
               if  REPORT01-STATUS = '00'
               and REPORT02-STATUS = '00'
                   move 'EQ' to COMPARE-STATUS
                   move 'N' to DUMP-STATUS
                   move all '-' to DELTA-LINE-1
                   move all '-' to DELTA-LINE-2
                   if  FF-03 = '1'
                       perform CONDITIONAL-PROCESSING
                   end-if
                   if  KEY-ACTIVE = 'Y'
                   and COMPARE-STATUS = FLAG-EQ
                       perform COMPARE-KEYS
                   end-if
                   if  COMPARE-STATUS = FLAG-EQ
                       perform COMPARE-RECORDS
                   end-if

                   if  DUMP-STATUS = 'Y'
                       if  GROUP-DELIMITER = 'Y'
                           perform DUMP-ASTERISK-ONE
                       end-if
                       add DLEN-UT1 to ZERO giving D-LEN
                       if  DUMP-RPI = 'Y'
                           perform DUMP-POSITION-INDICATOR
                       end-if
                       perform DUMP-PRIMARY-RECORD
                       perform DUMP-POSITION-DIFFERENCES-1
                       perform DUMP-SECONDARY-RECORD
                       perform DUMP-POSITION-DIFFERENCES-2
                       add DLEN-UT2 to ZERO giving D-LEN
                       move 'N' to DUMP-STATUS
                   end-if

                   if  COMPARE-STATUS = FLAG-NE
                       add 1 to COMPARE-NE
                   end-if
               else
                   move 'NE' to COMPARE-STATUS
               end-if

               if  COMPARE-STATUS = 'EQ'
                   add 1 to COMPARE-EQ
               end-if
               if  DELTA-PROCESS = 'QUIT'
               and COMPARE-NE > DELTA-MAXIMUM
                   perform JOB-FINISHED
                   move DELTA-MAX-ABEND to MESSAGE-TEXT
                   perform Z-ABEND-PROGRAM
               end-if
               if  DELTA-PROCESS = 'EOF '
               and COMPARE-NE > DELTA-MAXIMUM
                   move DELTA-MAX-ABEND to MESSAGE-TEXT
                   perform Z-DISPLAY-TO-CONSOLE
                   move 'QT' to COMPARE-STATUS
               end-if
           end-perform

           perform JOB-FINISHED

           GOBACK.

      *****************************************************************
       COMPARE-RECORDS.
      *    Physical Comparison with NE Output of ENABLED
           move 'COMPARISON' to REC-CTYPE
           move 'PHYSICAL  ' to REC-CMODE
           if REPORT01-REC(00002:00132) not = REPORT02-REC(00002:00132)
              move FLAG-NE to COMPARE-STATUS
              add 1 to COMPARE-NE
              move 'Y' to DUMP-STATUS
           end-if
           if  DUMP-DET    = 'Y'
               add 00002 to ZERO  giving POS-UT1
               add 00002 to ZERO  giving POS-UT2
               add 00132 to ZERO  giving LEN-UT1
               add 00132 to ZERO  giving LEN-UT2
               add 00132 to ZERO  giving PASSHEX4-LENGTH
               perform CALC-DELTA-FOR-NE-EQ-NO
           end-if
           exit.


      *****************************************************************
       COMPARE-KEYS.
           move YES-YES to READ-FLAGS
           if  REPORT01-REC(K-PS-1:K-LN-1)
            <  REPORT02-REC(K-PS-2:K-LN-2)
               move N-BYTE to READ-2
               move FLAG-NE to COMPARE-STATUS
               if  COMPARE-NE < DELTA-MAXIMUM
               and DUMP-DET-GRP = 'YNE'
                   perform DUMP-SECONDARY-MISSING
               end-if
           end-if
           if  REPORT01-REC(K-PS-1:K-LN-1)
            >  REPORT02-REC(K-PS-2:K-LN-2)
               move N-BYTE to READ-1
               move FLAG-NE to COMPARE-STATUS
               if  COMPARE-NE < DELTA-MAXIMUM
               and DUMP-DET-GRP = 'YNE'
                   perform DUMP-PRIMARY-MISSING
               end-if
           end-if
           exit.

      *****************************************************************
       CONDITIONAL-PROCESSING.
           move 'NN' to READ-FLAGS
           if  BYPASS-UT1-CTR > ZERO
               move 'BP' to COMPARE-STATUS
               move 'Y' to READ-1
               subtract 1 from BYPASS-UT1-CTR
           end-if
           if  BYPASS-UT2-CTR > ZERO
               move 'BP' to COMPARE-STATUS
               move 'Y' to READ-2
               subtract 1 from BYPASS-UT2-CTR
           end-if
           if  REPORT01-REC(00002:00132) = SPACES
               move 'BP' to COMPARE-STATUS
               move 'Y' to READ-1
               add 1 to REPORT01-OMT
           end-if
           if  REPORT01-REC(00001:00001) = '1'
               move 'BP' to COMPARE-STATUS
               move 'Y' to READ-1
               add 1 to REPORT01-OMT
               add 00001 to ZERO giving BYPASS-UT1-CTR
           end-if
           if  REPORT02-REC(00002:00132) = SPACES
               move 'BP' to COMPARE-STATUS
               move 'Y' to READ-2
               add 1 to REPORT02-OMT
           end-if
           if  REPORT02-REC(00001:00001) = '1'
               move 'BP' to COMPARE-STATUS
               move 'Y' to READ-2
               add 1 to REPORT02-OMT
               add 00001 to ZERO giving BYPASS-UT2-CTR
           end-if
           if  READ-FLAGS = 'NN'
               move 'YY' to READ-FLAGS
           end-if
           exit.
      *****************************************************************
       CALC-DELTA-FOR-NE-EQ-NO.
           add POS-UT1 to ZERO giving PTR-1
           add POS-UT2 to ZERO giving PTR-2
           perform until PTR-1 > POS-UT1 + LEN-UT1 - 1
                      or PTR-2 > POS-UT2 + LEN-UT2 - 1
               if REPORT01-REC(PTR-1:1)
                = REPORT02-REC(PTR-2:1)
                  move '=' to DELTA-LINE-1(PTR-1:1)
                  move '=' to DELTA-LINE-2(PTR-2:1)
               else
                  move '#' to DELTA-LINE-1(PTR-1:1)
                  move '#' to DELTA-LINE-2(PTR-2:1)
               end-if
               add 1 to PTR-1
               add 1 to PTR-2
           end-perform
           exit.

      *****************************************************************
       DUMP-TO-LOG.
      *    HexDump...
      *    Dump DD Name, Record-Number, (position,length)
           move RECORD-HEADER to SIMOLOGS-MESSAGE
           call 'SIMOLOGS' using SIMOLOGS-PASS-AREA
      *    DUMP Record Position Indicator
      *    if  DUMP-RPI = 'Y'
      *        perform DUMP-POSITION-INDICATOR
      *    end-if
           if  DUMP-ASC = 'Y'
               move PASSHEX4-ASCII(1:D-LEN) to SIMOLOGS-MESSAGE
               call 'SIMOLOGS' using SIMOLOGS-PASS-AREA
           end-if
           if  DUMP-HEX = 'Y'
               move PASSHEX4-UPPER(1:D-LEN) to SIMOLOGS-MESSAGE
               call 'SIMOLOGS' using SIMOLOGS-PASS-AREA
               move PASSHEX4-LOWER(1:D-LEN) to SIMOLOGS-MESSAGE
               call 'SIMOLOGS' using SIMOLOGS-PASS-AREA
           end-if
           if  DUMP-EBC = 'Y'
               move PASSHEX4-EBCDIC(1:D-LEN) to SIMOLOGS-MESSAGE
               call 'SIMOLOGS' using SIMOLOGS-PASS-AREA
           end-if
           exit.

      *****************************************************************
      *    Build the position header row...
      *****************************************************************
       DUMP-ASTERISK-ONE.
           move SPACES to SIMOLOGS-MESSAGE
           move '*'    to SIMOLOGS-MESSAGE(1:1)
           call 'SIMOLOGS' using SIMOLOGS-PASS-AREA
           exit.

      *****************************************************************
       DUMP-POSITION-INDICATOR.
           add 10 to ZERO giving POS-NO
           subtract 1 from D-POS giving WK-1
           divide 10 into WK-1 giving WK-1 remainder WK-2
           add 1 to WK-2
           perform varying D-P1 from 1 by 10 until D-P1 > 1020
               move DUMP-H10 to DUMP-W10
               inspect W10-POS-NO replacing leading ZEROES by '.'
               move DUMP-W10(WK-2:10) to DUMP-HEADER(D-P1:10)
               add 10 to POS-NO
           end-perform
           move DUMP-HEADER(1:D-LEN) to SIMOLOGS-MESSAGE
           call 'SIMOLOGS' using SIMOLOGS-PASS-AREA
           exit.

      *****************************************************************
       DUMP-PRIMARY-MISSING.
           if  GROUP-DELIMITER = 'Y'
               move SPACES  to SIMOLOGS-MESSAGE
               move all '*' to SIMOLOGS-MESSAGE(1:79)
               call 'SIMOLOGS' using SIMOLOGS-PASS-AREA
           end-if
           add DPOS-UT1 to ZERO giving RECORD-POS
           add DLEN-UT1 to ZERO giving RECORD-LEN
           add DPOS-UT1 to ZERO giving D-POS
           add DLEN-UT1 to ZERO giving D-LEN
      *    Present in REPORT02, missing from REPORT01...
           move UT1-MISSING to SIMOLOGS-MESSAGE
           call 'SIMOLOGS' using SIMOLOGS-PASS-AREA

           add DLEN-UT2 to ZERO giving D-LEN
           if  DUMP-RPI = 'Y'
               perform DUMP-POSITION-INDICATOR
           end-if
           perform DUMP-SECONDARY-RECORD
           move SPACES to DELTA-LINE-2
           move all '#' to DELTA-LINE-2(1:DLEN-UT2)
           perform DUMP-POSITION-DIFFERENCES-2
           exit.

      *****************************************************************
       DUMP-PRIMARY-RECORD.
           add DPOS-UT1 to ZERO giving RECORD-POS
           add DLEN-UT1 to ZERO giving RECORD-LEN
           add DPOS-UT1 to ZERO giving D-POS
           add DLEN-UT1 to ZERO giving D-LEN
           move 'REPORT01..' to RECORD-ID
           add REPORT01-RDR to ZERO giving REC-NUMBER
           move REPORT01-REC(D-POS:D-LEN) to PASSHEX4-SOURCE
           call 'SIMOHEX4' using PASSHEX4-PASS-AREA
           perform DUMP-TO-LOG
           exit.

      *****************************************************************
       DUMP-SECONDARY-MISSING.
           if  GROUP-DELIMITER = 'Y'
               move SPACES  to SIMOLOGS-MESSAGE
               move all '*' to SIMOLOGS-MESSAGE(1:79)
               call 'SIMOLOGS' using SIMOLOGS-PASS-AREA
           end-if
           add DPOS-UT2 to ZERO giving RECORD-POS
           add DLEN-UT2 to ZERO giving RECORD-LEN
           add DPOS-UT2 to ZERO giving D-POS
           add DLEN-UT2 to ZERO giving D-LEN
      *    Present in REPORT01, missing from REPORT02...
           move UT2-MISSING to SIMOLOGS-MESSAGE
           call 'SIMOLOGS' using SIMOLOGS-PASS-AREA

           add DLEN-UT1 to ZERO giving D-LEN
           if  DUMP-RPI = 'Y'
               perform DUMP-POSITION-INDICATOR
           end-if
           perform DUMP-PRIMARY-RECORD
           move SPACES to DELTA-LINE-1
           move all '#' to DELTA-LINE-1(1:DLEN-UT1)
           perform DUMP-POSITION-DIFFERENCES-1
           exit.

      *****************************************************************
       DUMP-SECONDARY-RECORD.
           move SPACES to PASSHEX4-SOURCE
           add DPOS-UT2 to ZERO giving RECORD-POS
           add DLEN-UT2 to ZERO giving RECORD-LEN
           add DPOS-UT2 to ZERO giving D-POS
           add DLEN-UT2 to ZERO giving D-LEN
           move 'REPORT02..' to RECORD-ID
           add REPORT02-RDR to ZERO giving REC-NUMBER
           move REPORT02-REC(D-POS:D-LEN) to PASSHEX4-SOURCE
           call 'SIMOHEX4' using PASSHEX4-PASS-AREA
           perform DUMP-TO-LOG
           exit.

      *****************************************************************
       DUMP-POSITION-DIFFERENCES-1.
           if  DUMP-RECL-MAX-S = 'Y'
           and DUMP-RECL-MAX < REPORT01-LRECL
               add DUMP-RECL-MAX  to ZERO giving WORK-LENGTH
           else
               add REPORT01-LRECL to ZERO giving WORK-LENGTH
           end-if
           move DELTA-LINE-1(1:DLEN-UT1) to SIMOLOGS-MESSAGE
           call 'SIMOLOGS' using SIMOLOGS-PASS-AREA
           exit.

      *****************************************************************
       DUMP-POSITION-DIFFERENCES-2.
           if  DUMP-RECL-MAX-S = 'Y'
           and DUMP-RECL-MAX < REPORT02-LRECL
               add DUMP-RECL-MAX  to ZERO giving WORK-LENGTH
           else
               add REPORT02-LRECL to ZERO giving WORK-LENGTH
           end-if
           move DELTA-LINE-2(1:DLEN-UT2) to SIMOLOGS-MESSAGE
           call 'SIMOLOGS' using SIMOLOGS-PASS-AREA
           exit.

      *****************************************************************
       JOB-FINISHED.
           if  REPORT01-STATUS = '00'
           and DELTA-PROCESS   = 'EOF '
               perform until REPORT01-STATUS not = '00'
                 perform REPORT01-READ
                 add 1 to COMPARE-NE
               end-perform
           end-if
           if  REPORT02-STATUS = '00'
           and DELTA-PROCESS   = 'EOF '
               perform until REPORT02-STATUS not = '00'
                 perform REPORT02-READ
                 add 1 to COMPARE-NE
               end-perform
           end-if
           perform REPORT02-CLOSE
           perform REPORT01-CLOSE

           if  GROUP-DELIMITER = 'Y'
               move SPACES  to SIMOLOGS-MESSAGE
               move all '*' to SIMOLOGS-MESSAGE(1:79)
               call 'SIMOLOGS' using SIMOLOGS-PASS-AREA
           end-if

           move 'Conclude' to INFO-ID
           move INFO-SHORT to SIMOLOGS-MESSAGE
           call 'SIMOLOGS' using SIMOLOGS-PASS-AREA
           move 'Finished' to INFO-ID

           move REPORT01-TOTAL to SIMOLOGS-MESSAGE
           call 'SIMOLOGS' using SIMOLOGS-PASS-AREA

           if  REPORT01-OMT > ZERO
               move REPORT01-OMIT to SIMOLOGS-MESSAGE
               call 'SIMOLOGS' using SIMOLOGS-PASS-AREA
           end-if

           move REPORT02-TOTAL to SIMOLOGS-MESSAGE
           call 'SIMOLOGS' using SIMOLOGS-PASS-AREA

           if  REPORT02-OMT > ZERO
               move REPORT02-OMIT to SIMOLOGS-MESSAGE
               call 'SIMOLOGS' using SIMOLOGS-PASS-AREA
           end-if

           if  REPORT01-RDR not = REPORT02-RDR
               move 'WARNING!  - Record counts are not equal'
                 to SIMOLOGS-MESSAGE
               call 'SIMOLOGS' using SIMOLOGS-PASS-AREA
               move 'ABENDING' to INFO-ID
           end-if

           if  FF-01 = '1'
               if  COMPARE-NE = 0
                   inspect COMPARE-TAG
                   replacing first ' of existing records '
                                by ' is ZERO             '
               else
                   move 'ABENDING' to INFO-ID
               end-if
               move COMPARE-NE-TOTAL to SIMOLOGS-MESSAGE
               call 'SIMOLOGS' using SIMOLOGS-PASS-AREA
               move COMPARE-EQ-TOTAL to SIMOLOGS-MESSAGE
               call 'SIMOLOGS' using SIMOLOGS-PASS-AREA
           end-if

           if  FF-02 = '1'
               if  COMPACT-NE = 0
                   inspect COMPACT-TAG
                   replacing first ' of existing records '
                                by ' is ZERO             '
               else
                   move 'ABENDING' to INFO-ID
               end-if
               move COMPACT-NE-TOTAL to SIMOLOGS-MESSAGE
               call 'SIMOLOGS' using SIMOLOGS-PASS-AREA
           end-if

           if  REPORT01-EOF not = 'Y'
           or  REPORT02-EOF not = 'Y'
               move 'ABENDING' to INFO-ID
           end-if
           move INFO-STATEMENT to SIMOLOGS-MESSAGE
           call 'SIMOLOGS' using SIMOLOGS-PASS-AREA

           move INFO-SHORT to MESSAGE-TEXT
           perform Z-DISPLAY-MESSAGE-TEXT

           perform Z-THANK-YOU.

           if  COMPARE-NE > 0
           or  REPORT01-RDR not = REPORT02-RDR
               add IFNECODE-VALUE to ZERO giving RETURN-CODE
           end-if
           exit.

      *****************************************************************
       JOB-STARTING.
           perform Z-POST-COPYRIGHT
           perform Z-DETERMINE-ENVIRONMENT
           perform REPORT01-OPEN
           perform REPORT02-OPEN
           move 'Y' to READ-1
           move 'Y' to READ-2
           if  DELTA-MAXIMUM not numeric
               add 100 to ZERO giving DELTA-MAXIMUM
           end-if
           if  K-PS-1 > 0
           and K-PS-2 > 0
           and K-LN-1 > 0
           and K-LN-2 > 0
               move 'Y' to KEY-ACTIVE
               move 'Key control is ENABLED...'
                 to MESSAGE-TEXT
           else
               move 'N' to KEY-ACTIVE
               move 'Key control is NOT enabled...'
                 to MESSAGE-TEXT
           end-if
           perform Z-DISPLAY-MESSAGE-TEXT

           move 'DUMP' to PASSHEX4-REQUEST
           add 128 to ZERO giving PASSHEX4-LENGTH
           move SYSLOG-OUTPUT to SIMOLOGS-REQUEST
           move SPACES       to SIMOLOGS-MESSAGE
           move all '*' to SIMOLOGS-MESSAGE(1:79)
           call 'SIMOLOGS' using SIMOLOGS-PASS-AREA
           move SIM-TITLE to SIMOLOGS-MESSAGE
           call 'SIMOLOGS' using SIMOLOGS-PASS-AREA
           move SIM-COPYRIGHT to SIMOLOGS-MESSAGE
           call 'SIMOLOGS' using SIMOLOGS-PASS-AREA
           move all '*' to SIMOLOGS-MESSAGE(1:79)
           call 'SIMOLOGS' using SIMOLOGS-PASS-AREA
           move INFO-STATEMENT to SIMOLOGS-MESSAGE
           call 'SIMOLOGS' using SIMOLOGS-PASS-AREA
           exit.

      *****************************************************************
      * I/O Routines for the Primary File...                          *
      *****************************************************************
       REPORT01-CLOSE.
           add 8 to ZERO giving APPL-RESULT.
           close REPORT01-FILE
           if  REPORT01-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
           else
               add 12 to ZERO giving APPL-RESULT
           end-if
           if  APPL-AOK
               CONTINUE
           else
               move 'CLOSE Failure with REPORT01' to MESSAGE-TEXT
               perform Z-DISPLAY-MESSAGE-TEXT
               move REPORT01-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
               perform Z-ABEND-PROGRAM
           end-if
           exit.
      *---------------------------------------------------------------*
       REPORT01-READ.
           read REPORT01-FILE
           if  REPORT01-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
               add 1 to REPORT01-RDR
           else
               if  REPORT01-STATUS = '10'
                   add 16 to ZERO giving APPL-RESULT
               else
                   add 12 to ZERO giving APPL-RESULT
               end-if
           end-if
           if  APPL-AOK
               CONTINUE
           else
               if  APPL-EOF
                   move 'Y' to REPORT01-EOF
               else
                   move 'READ Failure with REPORT01' to MESSAGE-TEXT
                   perform Z-DISPLAY-MESSAGE-TEXT
                   move REPORT01-STATUS to IO-STATUS
                   perform Z-DISPLAY-IO-STATUS
                   perform Z-ABEND-PROGRAM
               end-if
           end-if
           exit.
      *---------------------------------------------------------------*
       REPORT01-OPEN.
           add 8 to ZERO giving APPL-RESULT.
           open input REPORT01-FILE
           if  REPORT01-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
               move 'O' to REPORT01-OPEN-FLAG
           else
               add 12 to ZERO giving APPL-RESULT
           end-if
           if  APPL-AOK
               CONTINUE
           else
               move 'OPEN Failure with REPORT01' to MESSAGE-TEXT
               perform Z-DISPLAY-TO-CONSOLE
               perform Z-DISPLAY-MESSAGE-TEXT
               move REPORT01-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
               perform Z-ABEND-PROGRAM
           end-if
           exit.

      *****************************************************************
      * I/O Routines for the Secondary File...                        *
      *****************************************************************
       REPORT02-READ.
           read REPORT02-FILE
           if  REPORT02-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
               add 1 to REPORT02-RDR
           else
               if  REPORT02-STATUS = '10'
                   add 16 to ZERO giving APPL-RESULT
               else
                   add 12 to ZERO giving APPL-RESULT
               end-if
           end-if.
           if  APPL-AOK
               CONTINUE
           else
               if  APPL-EOF
                   move 'Y' to REPORT02-EOF
               else
                   move 'READ Failure with REPORT02' to MESSAGE-TEXT
                   perform Z-DISPLAY-MESSAGE-TEXT
                   move REPORT02-STATUS to IO-STATUS
                   perform Z-DISPLAY-IO-STATUS
                   perform Z-ABEND-PROGRAM
               end-if
           end-if
           exit.
      *---------------------------------------------------------------*
       REPORT02-OPEN.
           add 8 to ZERO giving APPL-RESULT.
           open input REPORT02-FILE
           if  REPORT02-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
               move 'O' to REPORT02-OPEN-FLAG
           else
               add 12 to ZERO giving APPL-RESULT
           end-if
           if  APPL-AOK
               CONTINUE
           else
               move 'OPEN Failure with REPORT02' to MESSAGE-TEXT
               perform Z-DISPLAY-TO-CONSOLE
               perform Z-DISPLAY-MESSAGE-TEXT
               move REPORT02-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
               perform Z-ABEND-PROGRAM
           end-if
           exit.
      *---------------------------------------------------------------*
       REPORT02-CLOSE.
           add 8 to ZERO giving APPL-RESULT.
           close REPORT02-FILE
           if  REPORT02-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
               move 'C' to REPORT02-OPEN-FLAG
           else
               add 12 to ZERO giving APPL-RESULT
           end-if
           if  APPL-AOK
               CONTINUE
           else
               move 'CLOSE Failure with REPORT02' to MESSAGE-TEXT
               perform Z-DISPLAY-MESSAGE-TEXT
               move REPORT02-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
               perform Z-ABEND-PROGRAM
           end-if
           exit.

      *****************************************************************
      * The following Z-ROUTINES provide administrative functions     *
      * for this program.                                             *
      *****************************************************************
      * ABEND the program, post a message to the console and issue    *
      * a STOP RUN.                                                   *
      *****************************************************************
       Z-ABEND-PROGRAM.
           if  MESSAGE-TEXT not = SPACES
               perform Z-DISPLAY-MESSAGE-TEXT
           end-if
           move 'PROGRAM-IS-ABENDING...'  to MESSAGE-TEXT
           perform Z-DISPLAY-MESSAGE-TEXT
           add 12 to ZERO giving RETURN-CODE
           STOP RUN.
      *    exit.

      *****************************************************************
       Z-DETERMINE-ENVIRONMENT.
           add 16833 to ASC-OR-EBC
           if  ASC-A = 'A'
               move 'Compiled for an ASCII environment...'
                 to MESSAGE-TEXT
           else
               if  EBC-A = 'A'
                   move 'Compiled for an EBCDIC environment...'
                     to MESSAGE-TEXT
               else
                   move 'Compiled for an UNKNOWN environment...'
                     to MESSAGE-TEXT
               end-if
           end-if
           perform Z-DISPLAY-MESSAGE-TEXT
           exit.

      *****************************************************************
      * Display to SYSOUT Device...                                   *
      *****************************************************************
       Z-DISPLAY-MESSAGE-TEXT.
           if MESSAGE-TEXT-2 = SPACES
               display MESSAGE-BUFFER(1:79)
           else
               display MESSAGE-BUFFER
           end-if
           move all SPACES to MESSAGE-TEXT
           exit.

      *****************************************************************
      * Display CONSOLE messages...                                   *
      *****************************************************************
       Z-DISPLAY-TO-CONSOLE.
           if MESSAGE-TEXT-2 = SPACES
               display MESSAGE-BUFFER(1:79) upon console
           else
               display MESSAGE-BUFFER upon console
           end-if
           exit.

      *****************************************************************
      * Display the file status bytes. This routine will display as   *
      * four digits. If the full two byte file status is numeric it   *
      * will display as 00nn. If the 1st byte is a numeric nine (9)   *
      * the second byte will be treated as a binary number and will   *
      * display as 9nnn.                                              *
      *****************************************************************
       Z-DISPLAY-IO-STATUS.
           if  IO-STATUS not NUMERIC
           or  IO-STAT1 = '9'
               move IO-STAT1 to IO-STATUS-04(1:1)
               subtract TWO-BYTES-BINARY from TWO-BYTES-BINARY
               move IO-STAT2 to TWO-BYTES-RIGHT
               add TWO-BYTES-BINARY to ZERO giving IO-STATUS-0403
               move 'File Status is: nnnn' to MESSAGE-TEXT
               move IO-STATUS-04 to MESSAGE-TEXT(17:4)
               perform Z-DISPLAY-TO-CONSOLE
               perform Z-DISPLAY-MESSAGE-TEXT
           else
               move '0000' to IO-STATUS-04
               move IO-STATUS to IO-STATUS-04(3:2)
               move 'File Status is: nnnn' to MESSAGE-TEXT
               move IO-STATUS-04 to MESSAGE-TEXT(17:4)
               perform Z-DISPLAY-TO-CONSOLE
               perform Z-DISPLAY-MESSAGE-TEXT
           end-if
           exit.

      *****************************************************************
       Z-POST-COPYRIGHT.
           move SIM-TITLE to MESSAGE-BUFFER
           perform Z-DISPLAY-MESSAGE-TEXT
           move SIM-COPYRIGHT to MESSAGE-BUFFER
           perform Z-DISPLAY-MESSAGE-TEXT
           exit.

      *****************************************************************
       Z-THANK-YOU.
           move SIM-THANKS-01 to MESSAGE-BUFFER
           perform Z-DISPLAY-MESSAGE-TEXT
           move SIM-THANKS-02 to MESSAGE-BUFFER
           perform Z-DISPLAY-MESSAGE-TEXT
           exit.
      *****************************************************************
      *           This program was generated by SimoZAPS              *
      *             A product of SimoTime Technologies                *
      *        Our e-mail address is: helpdesk@simotime.com           *
      *     Also, visit our Web Site at http://www.simotime.com       *
      *                                                               *
      *  Generation Date: 2020-06-25  Generation Time: 19:20:46:31    *
      *****************************************************************

Table of Contents Previous Section Next Section Secondary Functions

This section will focus on the items (process and programs) that do the generation and compilation of a data file compare programs.

Table of Contents Previous Section Next Section Generate a Data File Compare Program

The SimoTime Utility Program for Data File Comparison runs on a Windows System with Micro Focus and will generate the COBOL source code for a program that will do a compare of two data files. The generation of the COBOL source code requires a Windows System with Micro Focus Studio or Micro Focus Server, version 6.0 or later. The generated COBOL source code may be compiled and executed on the following systems and will do the actual comparison of the two data files.

System Description
IBM Mainframe COBOL for OS/390 or later should be used (this provides for Y2K compliance) to compile the generated source code.
Note: the SimoTime Utility program has the capability of generating COBOL Source code that can compare ASCII/Text (or LINE SEQUENTIAL) files. Programs that are generated with Line Sequential dependencies will not compile and execute in the ZOS environment of an IBM Mainframe.
Windows The Windows platform is required to generate the COBOL source code that will do the data file compare.
To compile and execute the generated COBOL programs the Micro Focus Studio is recommended. However, Net Express and Mainframe Express may be used. Once a program is compiled with Micro Focus Studio it may be executed using Micro Focus Server.
Note: the SimoTime Utility program and the generated test cases are tested on Windows/XP, Windows/7 and Windows Server using Micro Focus Studio, version 6.0 and/or later.
Linux To compile and execute the generated COBOL programs the Micro Focus Server Express is recommended. Once a program is compiled with Micro Focus Server Express it may be executed using Micro Focus Server.
UNIX To compile and execute the generated COBOL programs the Micro Focus Server Express is recommended. Once a program is compiled with Micro Focus Server Express it may be executed using Micro Focus Server.
  System Possibilities for Generated Data File Comparison Programs

 

Link to Internet   Link to Server   Explore How to Generate a Data File Compare, Validate or Hex-Dump Program using simple specification statements in a Process Control File (PCF). This link to the User Guide includes the information necessary to create a Process Control File and generate the COBOL programs that will do a data file compare, accumulate summary totals with a record count or produce a Hex-Dump of records in a VSAM, KSDS based on a list of user-defined keys. The User Guide contains a list of the PCF statements that are used for the data file compare, validate or dump process.

Table of Contents Previous Section Next Section The Process Control File, an Example

The following is the Process Control File (CPR13301.pcf) that will define the process and parameters required for generating a COBOL program that will compare two record sequential files (RSEQ) containing 133-byte, fixed length records.

***********************************************************************
*                R133BP01.pcf - a Process Control File                *
*               SimoTime Program Generation Technologies              *
*            (C) Copyright 1987-2019 All Rights Reserved              *
*              Web Site URL:   http://www.simotime.com                *
*                    e-mail:   helpdesk@simotime.com                  *
***********************************************************************
* Generate a file compare program for 133 byte print reports.
*
&SIMOPREP  call ../Env1BASE
&USERPREP  call USERCOMP
&FUNCTION  COMPARE
&CONFORM   IBM
&USRMODEL  SYSCOMP1.txt
*
*HEAD34    ....:....1....:....2....:....3....
&HEAD34    Compare-133, 2-133 and OMIT-Bypass
&progid    R133BPC1
&SYSUT1    name=REPORT01 org=Sequential recfm=FIXED rlen=133
&SYSUT2    name=REPORT02 org=Sequential recfm=FIXED rlen=133
*
&UT1OMIT   if pos  2 len 132 EQ SPACES
&UT1OMIT   if pos  1 len   1 EQ '1' bypass record +1
&UT2OMIT   if pos  2 len 132 EQ SPACES
&UT2OMIT   if pos  1 len   1 EQ '1' bypass record +1
&COMPARE   SYSUT1 pos  2 len 132 SYSUT2 pos  2 len 132
*
&DELTAMAX  2 EOF
&IFNECODE  0016
&DFORMAT   ASC HEX EBC RPI
&DISPLAY   SYSOUT
&SYSLOG    ENABLED
*
&END

Table of Contents Previous Section Next Section Delete & Define a Log File

If a NOT-Equal condition occurs during the compare process the out may be written to SYSOUT or a User-Defined log file. If the SYSLOG function is enabled then a SYSLOG file must exist prior to starting the compare process. The following two sub-sections of this document will describe and demonstrate the process to create (i.e. Delete and Define) a new SYSLOG file. The following is the Process Control File (CPR13301.pcf) that will define the process and parameters required for generating a COBOL program that will compare two record sequential file (RSEQ) containing 133-byte, fixed length records.

Table of Contents Previous Section Next Section Create a SYSLOG File using a JCL Member

This JCL Member (SYSLOGV8.jcl) will Delete and Define a new SYSLOG file for a compare process that has the SYSLOG function enabled.

//SYSLOGV8 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1
//* *******************************************************************
//*       SYSLOGV8.jcl - a JCL Member for Batch Job Processing        *
//*       This JCL Member is provided by SimoTime Technologies        *
//*           (C) Copyright 1987-2019 All Rights Reserved             *
//*             Web Site URL:   http://www.simotime.com               *
//*                   e-mail:   helpdesk@simotime.com                 *
//* *******************************************************************
//*
//* Text   - Create a new SYSLOG file.
//* Author - SimoTime Technologies
//* Date   - January 24, 1996
//*
//* *******************************************************************
//* Delete and Define a New SYSLOG file...
//*
//         SET  DDSYSLOG=SIMOTIME.SYSLOG.COMPARE
//CRTLOGS1 EXEC SYSLOGP8
//

This JCL Procedure (SYSLOGP8.jcl) is used to do the actual Delete and Define of a new SYSLOG file for a compare process that has the SYSLOG function enabled.

//SYSLOGJ8 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1
//* *******************************************************************
//*        This program is provided by SimoTime Technologies          *
//*           (C) Copyright 1987-2019 All Rights Reserved             *
//*             Web Site URL:   http://www.simotime.com               *
//*                   e-mail:   helpdesk@simotime.com                 *
//* *******************************************************************
//*
//* Text   - Create a user SYSLOG file using IEBGENER.
//* Author - SimoTime Technologies
//* Date   - January 24, 1996
//*
//* The first job step (QSAMDELT) will delete a previously created
//* file. The second job step (QCRTDIN1) will create a new file.
//*
//* This set of programs will run on a mainframe under MVS or on a
//* Personal Computer with Windows and Micro Focus Mainframe Express.
//*
//* *******************************************************************
//* Step 1 of 2, Delete a previously created log file
//*
//QSAMDELT EXEC PGM=IEFBR14
//SYSUT2   DD  DSN=SIMOTIME.UTIL.SYSLOG,DISP=(MOD,DELETE,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=V,LRECL=1055,DSORG=PS)
//*
//* *******************************************************************
//* Step 2 of 2, Create a new RSEQ file with variable length records
//*
//QCRTDIN1 EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  DUMMY
//* :....1....:....2....:....3....:....4....:....5....:....6....:....7.
//SYSUT1   DD  *
/*
//SYSUT2   DD  DSN=SIMOTIME.UTIL.SYSLOG,
//             DISP=(NEW,CATLG,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=V,LRECL=1055,DSORG=PS)
//

Table of Contents Previous Section Next Section Create a SYSLOG File using a CMD File

This Windows CMD file (SYSLOGW8.cmd) is used to do the actual Delete and Define of a new SYSLOG file for a compare process that has the SYSLOG function enabled.

@echo OFF
rem  * *******************************************************************
rem  *               SYSLOGW8.cmd - a Windows Command File               *
rem  *         This program is provided by SimoTime Technologies         *
rem  *           (C) Copyright 1987-2019 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  *
rem  * Text   - Delete and Define a New SYSLOG File.
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * This set of programs will run in a Micro Focus Environment
rem  *
rem  *                     ************
rem  *                     * SYSLOGW8 *
rem  *                     ********cmd*
rem  *                          *
rem  *                          *
rem  *                     ************     ************
rem  *                     * SYSLOGC8 *******  SYSLOG  *
rem  *                     ********cbl*     *******vrec*
rem  *                          *
rem  *                          *
rem  *                     ************
rem  *                     *   EOJ    *
rem  *                     ************
rem  *
rem  * *******************************************************************
rem  * Step 1 of 2, Delete any previously created file...
rem  *
     set TskName=SYSLOGW8
     call ..\ENV1BASE
     if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
rem  *
     call SimoNOTE "*******************************************************%TskName%"
     call SimoNOTE "Starting TskName %TskName%"
:DeleteQSAM
     call SimoNOTE "StepInfo Delete previously created file"
     if exist %SYSLOG% del %SYSLOG%
rem  *
rem  * *******************************************************************
rem  * Step 2 of 2, Define a New SYSLOG File...
rem  *
     call SimoNOTE "SYSLOG is %SYSLOG%"
     run SYSLOGC8
rem  *
     if exist %SYSLOG% goto :EojAok
     set JobStatus=0020
     goto :EojNok
:EojAok
     call SimoNOTE "Finished JobName %TskName%"
     goto :End
:EojNok
     call SimoNOTE "ABENDING JobName %TskName%"
:End

Table of Contents Previous Section Next Section Ancillary Functionality

This section provides additional detail about the CMD files and programs that are used to support this set of sample programs.

Link to Internet   Link to Server   Explore How to use Common or Shared Routines that perform repetitive tasks in a consistent manner. This link will provide information about setting common environment variables and many other utilitarian tasks.

Table of Contents Previous Section Next Section Set the Environment

A command file (ENV1BASE.cmd) is called from other command files to set commonly used environment variables. This provides a single point of definition. The following is a listing of the contents of the command file.

@echo OFF
rem  * *******************************************************************
rem  *               ENV1BASE.cmd - a Windows Command File               *
rem  *        This program is provided by SimoTime Technologies          *
rem  *           (C) Copyright 1987-2021 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  *
rem  * Text   - Provide a single point to set common environment variables.
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * Set the commonly used environment variables. This is used to provide
rem  * a single point for managing the commonly used environment variables.
rem  *
     set SimoLIBR=c:\SimoLIBR
     set BASELIB1=c:\SIMOSAM1\DEVL
     set BASELIB8=c:\SimoSAM8
     set BaseWIP1=c:\SimoSAM1\WIP1
     set DATAZERO=c:\SIMODATA\DEVL\DATA\ZERO
     set BASEAPP=%BaseLib1%
     set BASESYS=%BaseLib1%\SYS1
     set BASECAT=%BaseLib1%\DATA
     set UMAPALIB=%BASECAT%\ASC1
     set UMAPELIB=%BASECAT%\EBC1
     set SYSLOG=%BASESYS%\LOGS\SYSLOG_USER.DAT
     set SYSOUT=%BASEAPP%\LOGS\SYSOUT_SIMSAM01.txt
     set SLZMSG=%BASEAPP%\LOGS\SLZMSG_USER.TXT
     set PostNOTE=%BASEAPP%\LOGS\JOBLOG_SIMONOTE.TXT
     set SIMONOTE=%BASEAPP%\LOGS\JOBLOG_SIMONOTE.txt
     set USERPOST=%BASEAPP%\LOGS\ASSIGNED_USER_POST_FILE.txt
     if [%1]==[] goto NO_POST
     set SYSOUT=%BaseLib1%\LOGS\SYSOUT_%1.txt
     call SIMONOTE "+ ENV1BASE *"
     call SIMONOTE "+ ENV1BASE ********************************************************************%1"
     call SIMONOTE "+ ENV1BASE is preparing the System Environment..."
     call SIMONOTE "+ SIMOLIBR is %SIMOLIBR%"
     call SIMONOTE "+ MIFOSYS1 is %MIFOSYS1%"
     call SIMONOTE "+ BASELIB1 is %BASELIB1%"
:NO_POST
     call SIMONOTE "+ SIMONOTE Job Log File is %SIMONOTE% "
rem  *
     set MQBASE=C:\Program Files\IBM\WebSphere MQ
rem  *
rem  * Set the location for the Apache-Tomcat Server...
     set CATALINA_HOME=C:\APACHETC\apache-tomcat-7.0.52
rem     set CATALINA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_112
rem  *
rem  * Set the Environment for the Java Environment...
rem     set JAVABASE=C:\APACHETC\apache-tomcat-7.0.52
     set JAVABASE=C:\Program Files (x86)\Java\jdk1.8.0_112
     set JAVASDK="%JAVABASE%\bin"
     set JAVA_HOME=%JAVABASE%
     set JRE_HOME=%JAVABASE%
     set SIMOTCAT=%CATALINA_HOME%\webapps\simotcat
     set SIMPACKS=%CATALINA_HOME%\webapps\simotcat\WEB-INF\classes\simpacks
rem  *
rem  * Set the environment for the Micro Focus technology...
     set MIFOEDEV=C:\Program Files (x86)\Micro Focus\Enterprise Developer
     set MIFOVCBL=C:\Program Files (x86)\Micro Focus\Visual COBOL Build Tools
     set MIFOESTU=C:\Program Files (x86)\Micro Focus\Studio Enterprise Edition 6.0
     set MIFOEMFE="C:\Program Files (x86)\Micro Focus\Mainframe Express"
rem  *
rem  * Large file support, performance tuning and record locking of the File Handler
     set EXTFH=%BASESYS%\CONFIG\EXTFHBIG.CFG
rem  *
rem  * For IMS Support
     set ES_IMSLIB=%BASEAPP%\IMSLIB
     set ES_ACBLIB=%BASEAPP%\IMSLIB
rem  *
rem  * EZASOKETS Check EZASOKETS Enabled box or set ES_EZASOKET_SUPPORT=YES
     set EZACONFG=BASESYS1\CONFIG\EZACONFG.dat
rem  *
rem  * Resource Allocation and Performance for SORT and non-Relational Data
rem  set MFJSENGINE=SYNCSORT
     set SORTSCHEME=1
     set SORTSPACE=750000000
     set TMP=C:\SORTWORK
rem  *
     set ES_ALLOC_OVERRIDE=%BASESYS%\CONFIG\CATMAPA1.cfg
rem  * For CORE_ON_ERROR function, ABEND Dump
rem  *     set COBCONFIG_=%BASESYS%\CONFIG\diagnose.cfg
rem  *
rem  * Consolidated Trace Facility (CTF)
rem  *     set MFTRACE_CONFIG=%BASESYS%\CONFIG\ctf.cfg
rem  *     set MFTRACE_LOGS=c:\ctflogs
rem  *
rem  * For Job Restart, ABEND Recovery
     set MF_UCC11=Y
     set ES_JES_RESTART=Y
rem  *
rem  * Set environment for MFBSI (Micro Focus Batch Scheduling Interface)
     set ES_EMP_EXIT_1=mfbsiemx
     set MFBSI_DIR=%BASESYS%\LOGS\%JESSERVERNAME%
     set MFBSIEOP_CMD=ENABLE
     set MFBSIEOP_CSV=ENABLE
     set MFBSIEOP_HTM=ENABLE
     set MFBSIEOP_XML=ENABLE
rem  *
rem  * Set Behavior and Trace Flags for GETJOBDD
rem  *   Position=12345678/12345678
     set JDDFLAGS=nnnWnnnn/YYnnnnnn
rem  *
rem  * If not already set then set the PATH for Micro Focus Directories
     if "%SIMOPATH%" == "Y" goto JUMPPATH
     if "%MIFOSYS1%" == "EDEV" goto JUMPEDEV
     if "%MIFOSYS1%" == "VCBL" goto JUMPVCBL
     if "%MIFOSYS1%" == "ESTU" goto JUMPESTU
     if "%MIFOSYS1%" == "EMFE" goto JUMPEMFE
:JUMPEDEV
     set path=%BASESYS%\LOADLIB;%MIFOEDEV%\bin;%JAVASDK%;%BASEAPP%\JAVA;%PATH%;
     set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOEDEV%\CPYLIB
     set MIFOBASE=%MIFOEDEV%
     goto JUMPPATH
:JUMPVCBL
     set path=%MIFOVCBL%\bin;%MIFOVCBL%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%;
     set MIFOBASE=%MIFOVCBL%
     goto JUMPPATH
:JUMPESTU
     set MIFOBASE=%MIFOESTU%\Base
     set MIFOBIN=%MIFOBASE%\bin
     set path=%BASESYS%\LOADLIB;%MIFOBASE%;%MIFOBIN%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%;
     set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOBASE%\SOURCE
     goto JUMPPATH
:JUMPEMFE
     set MIFOBASE=%MIFOEMFE%\Base
     set MIFOBIN=%MIFOBASE%\bin
     set path=%BASESYS%\LOADLIB;%MIFOBASE%;%MIFOBIN%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%;
     set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOBASE%\SOURCE
     goto JUMPPATH
rem  *
:JUMPPATH
     set SIMOPATH=Y
rem  *
     set MAINFRAME_FLOATING_POINT=true
     set COBIDY=%BASEAPP%\COBIDY
     set COBPATH=.;%BASEAPP%\LOADLIB;%BASEAPP%\LOADLIB\GNTS;%BASESYS%\LOADLIB;%SimoLIBR%
     set LIBPATH=.;%BASEAPP%\LOADLIB;%BASEAPP%\LOADLIB\GNTS;%BASESYS%\LOADLIB;%SimoLIBR%
     set TXDIR=%BASESYS%\LOADLIB;%MIFOBASE%
     set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%
rem  *
     set USERCLASS=%BASELIB1%\LOADLIB
     set CLASSPATH=.
     set CLASSPATH=%CLASSPATH%;%JAVABASE%
     set CLASSPATH=%CLASSPATH%;%JAVABASE%\lib
     set CLASSPATH=%CLASSPATH%;\%USERCLASS%\simpacks
     set CLASSPATH=%CLASSPATH%;C:\APACHETC\apache-tomcat-7.0.52\webapps\simotcat\WEB-INF\classes
     set CLASSPATH=%CLASSPATH%;C:\APACHETC\apache-tomcat-7.0.52\webapps\simotcat\WEB-INF\classes\simpacks
rem  *
     if "%MIFOSYS1%" == "ESTU" set CLASSPATH=%CLASSPATH%;%MIFOBIN%
     if "%MIFOSYS1%" == "EDEV" set CLASSPATH=%CLASSPATH%;%MIFOEDEV%
     if "%MIFOSYS1%" == "VCBL" set CLASSPATH=%CLASSPATH%;%MIFOVCBL%
     if "%MIFOSYS1%" == "VCBL" set CLASSPATH=%CLASSPATH%;%MIFOVCBL%\bin\mfcobol.jar
rem  *
     set JobStatus=0000
     call SIMONOTE "+ ENV1BASE is returning to caller"


Table of Contents Previous Section Next Section Display and Log Messages

A command file (SIMONOTE.cmd) is called from other command files to display and write messages to a log file. The following is a listing of the contents of the command file.

@echo OFF
rem  * *******************************************************************
rem  *               SIMONOTE.cmd - a Windows Command File               *
rem  *         This program is provided by SimoTime Technologies         *
rem  *            (C) Copyright 1987-2019 All Rights Reserved            *
rem  *              Web Site URL:   http://www.simotime.com              *
rem  *                    e-mail:   helpdesk@simotime.com                *
rem  * *******************************************************************
rem  *
rem  * Text    - Display message on screen and write to a log file.
rem  * Author  - SimoTime Technologies
rem  *
rem  * This script may be called from other scripts and expects a single
rem  * parameter enclosed in double quotes. The double quotes will be
rem  * removed. Before writing to the log file a date and time stamp
rem  * will be inserted in front of the message text.
rem  *
rem  * Note: The tilde (~) removes leading/trailing double-quotes.
rem  *
if "%SimoNOTE%" == "" set SimoNOTE=c:\SimoLIBR\LOGS\SimoTime.LOG
echo %date% %time% %~1>> %SimoNOTE%
echo %~1

Table of Contents Previous Section Next Section Create Test Files

This example uses three data files to demonstrate the basic functions of the data file compare process. the first two files are sequential files containing three records of identical content. The third file is different from the first two files and is used to shows the results when a NOT-Equal condition occurs.

Table of Contents Previous Section Next Section Create Test Files using a JCL Member

This JCL Member (CPRS80J8.jcl) will create four test files that will be used by the Data File Compare program that was generated.

//CPRS80J8 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1
//* *******************************************************************
//*       CPRS80J8.JCL - a JCL Member for Batch Job Processing        *
//*       This JCL Member is provided by SimoTime Technologies        *
//*           (C) Copyright 1987-2019 All Rights Reserved             *
//*             Web Site URL:   http://www.simotime.com               *
//*                   e-mail:   helpdesk@simotime.com                 *
//* *******************************************************************
//*
//* Text   - Create Sequential Data Sets on disk using IEBGENER.
//* Author - SimoTime Technologies
//* Date   - January 24, 1996
//*
//* The first job step (QSAMDELT) will delete any previously created
//* file. The second job step (QCRTDIN1) will create a new file.
//*
//* The Steps 2-4 will create new sequential files.
//*
//* The last step will create a SYSLOG file.
//*
//* This set of programs will run on a mainframe under MVS or on a
//* Personal Computer with Windows and Micro Focus Mainframe Express.
//*
//* *******************************************************************
//* Step 1 of 5, Delete any previously created files...
//*
//QSAMDELT EXEC PGM=IEFBR14
//CRTRS801 DD  DSN=SIMOTIME.DATA.RS80TT01,DISP=(MOD,DELETE,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,DSORG=PS)
//CRTRS802 DD  DSN=SIMOTIME.DATA.RS80TT02,DISP=(MOD,DELETE,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,DSORG=PS)
//CRTRS803 DD  DSN=SIMOTIME.DATA.RS80TT03,DISP=(MOD,DELETE,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,DSORG=PS)
//SYSLOG   DD  DSN=SIMOTIME.SYSLOG.CPRS80D1,DISP=(MOD,DELETE,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,DSORG=PS)
//*
//* *******************************************************************
//* Step 2 of 5, Create and populate a new QSAM file. This step will
//*              create a sequential file with three records. The
//*              length of the records is 80 bytes.
//*
//CRTRS801 EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  DUMMY
//* :....1....:....2....:....3....:....4....:....5....:....6....:....7.
//SYSUT1   DD  *
Record 001, Text String 001...
Record 002, Text String 002...
Record 003, Text String 003...
/*
//SYSUT2   DD  DSN=SIMOTIME.DATA.RS80TT01,
//             DISP=(NEW,CATLG,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,DSORG=PS)
//*
//* *******************************************************************
//* Step 3 of 5, Create and populate a new QSAM file.
//*              This step will create a sequential file with three records. The
//*              records. The length of the records is 80 bytes.
//*              This file contains the same records as the file created
//*              in the preceding job step.
//*
//CRTRS802 EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  DUMMY
//* :....1....:....2....:....3....:....4....:....5....:....6....:....7.
//SYSUT1   DD  *
Record 001, Text String 001...
Record 002, Text String 002...
Record 003, Text String 003...
/*
//SYSUT2   DD  DSN=SIMOTIME.DATA.RS80TT02,
//             DISP=(NEW,CATLG,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,DSORG=PS)
//*
//* *******************************************************************
//* Step 4 of 5, Create and populate a new QSAM file.
//*              This step will create a sequential file with three
//*              records. The length of the records is 80 bytes.
//*              This file contains similar records as the file created
//*              in the preceding job step. However, the content of the
//*              second record contains additional text.
//*
//CRTRS803 EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  DUMMY
//* :....1....:....2....:....3....:....4....:....5....:....6....:....7.
//SYSUT1   DD  *
Record 001, Text String 001...
Record 002, Text String 002... Catch me...
Record 003, Text String 003...
/*
//SYSUT2   DD  DSN=SIMOTIME.DATA.RS80TT03,
//             DISP=(NEW,CATLG,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,DSORG=PS)
//*
//* *******************************************************************
//* Step 5 of 5, Create a new RSEQ file with variable length records
//*
//QCRTDIN1 EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  DUMMY
//* :....1....:....2....:....3....:....4....:....5....:....6....:....7.
//SYSUT1   DD  *
/*
//SYSUT2   DD  DSN=SIMOTIME.SYSLOG.CPRS80D1,
//             DISP=(NEW,CATLG,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=V,LRECL=1055,DSORG=PS)
//

Table of Contents Previous Section Next Section Create Test Files using Windows CMD Files

This Windows CMD file (CRT133W8.cmd) will call four command files to create the test files.

@echo OFF
rem  * *******************************************************************
rem  *               CRT133W8.CMD - a Windows Command File               *
rem  *         This program is provided by SimoTime Technologies         *
rem  *           (C) Copyright 1987-2019 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  *
rem  * Text   - Create 133 byte print files for testing.
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * The job will create the test files containing report-oriented data.
rem  * The test files will be used to show some of the advanced functions
rem  * of the SimoTime Compare technology.
rem  *
rem  * *******************************************************************
rem  * Prepare the environment...
     set JobName=CRT133W8
     call ..\Env1BASE %JobName%
     if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
     set SIMOGENS=BATCH
rem  *
     call SimoNOTE "*******************************************************%JobName%"
     call SimoNOTE "Starting JobName %JobName% Date and Time stamps are different"
     call SimoNOTE "Continue JobName %JobName% Create a Baseline test file"
     call CRT133W1
     call SimoNOTE "Continue JobName %JobName% Create a copy of the Baseline file"
     call CRT133W2
     call SimoNOTE "Continue JobName %JobName% Create a truncated copy of the Baseline file"
     call CRT133W3
     call SimoNOTE "Continue JobName %JobName% Create a modified copy of the Baseline file"
     call CRT133W4
     call SimoNOTE "Finished JobName %JobName% %JobName%"
:End
     pause

Table of Contents Previous Section Next Section Baseline, Primary Test File

This Windows CMD file (CRT133W1.cmd) will use the Windows ECHO Command to create the baseline ASCII/Text (or Line Sequential) file. The ASCII/Text file will then be converted to a sequential file that will be used to test the Data File Compare program that was generated.

@echo OFF
rem  * *******************************************************************
rem  *               CRT133W1.CMD - a Windows Command File               *
rem  *         This program is provided by SimoTime Technologies         *
rem  *           (C) Copyright 1987-2019 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  *
rem  * Text   - Create 133 byte print files for testing.
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * The job will read an 80-byte file that contains REPORT
rem  * information.
rem  *
rem  * The job will create three (3) test files containing REPORT-oriented
rem  * information.
rem  *
rem  *                     ************
rem  *                     * CRT133W1 *
rem  *                     ********cmd*
rem  *                          *
rem  *                          *
rem  *                     ************     ************
rem  *                     *   echo   ******* RPT080T1 *
rem  *                     ********win*     *******lseq*
rem  *                          *
rem  *    ************     ************     ************
rem  *    * GETLS080 ******* CV80ALAR ******* PUTRS080 *   See Note-1
rem  *    *******lseq*     ********cbl*     *******rseq*
rem  *                          *
rem  *    ************     ************     ************
rem  *    * RPT080D1 ******* RPT133C8 ******* RPT133D1 *   See Note-2
rem  *    *******lseq*     ********cbl*     *******rseq*
rem  *                          *
rem  *                          *
rem  *                     ************
rem  *                     *   EOJ    *
rem  *                     ************
rem  *
rem  *    Note-1: RPT080T1 will be mapped to GETLS080
rem  *    Note-1: GETLS080 will be mapped to RPT080D1
rem  *
rem  * *******************************************************************
rem  * Prepare the environment...
     set CmdName=CRT133W1
     call ..\Env1BASE %CmdName%
     if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
rem  *
     call SimoNOTE "*******************************************************%CmdName%"
     call SimoNOTE "Starting CmdName %CmdName%"
rem  *
rem  * *******************************************************************
     set RPT080T1=%BaseLib1%\DATA\TXT1\RPT080T1.TXT
     call SimoNOTE "DataMake %RPT080T1% "
rem  *    ....:....1....:....2....:....3....:....4....:....5....:....6.
     echo 1Report Identifier     Primary Header              2010/01/05>%RPT080T1%
     echo  Page: 0001            Sub-Title Info              12:05:22pm>>%RPT080T1%
     echo  Left Data-01          Center Data 01           Right Data 01>>%RPT080T1%
     echo  Left Data-02          Center Data 02           Right Data 02>>%RPT080T1%
     echo  Left Data-03          Center Data 03           Right Data 03>>%RPT080T1%
     echo  Left Data-04          Center Data 04           Right Data 04>>%RPT080T1%
     echo  Left Data-05          Center Data 05           Right Data 05>>%RPT080T1%
     echo 1Report Identifier     Primary Header              2010/01/05>>%RPT080T1%
     echo  Page: 0002            Sub-Title Info              12:05:22pm>>%RPT080T1%
     echo  Left Data-21          Center Data 21           Right Data 21>>%RPT080T1%
     echo  Left Data-22          Center Data 22           Right Data 22>>%RPT080T1%
     echo  Left Data-23          Center Data 23           Right Data 23>>%RPT080T1%
     echo  Left Data-24          Center Data 24           Right Data 24>>%RPT080T1%
     echo  Left Data-25          Center Data 25           Right Data 25>>%RPT080T1%
rem  *
rem  * *******************************************************************
     call SimoNOTE "Continue Convert LSEQ to RSEQ 80 Bytes"
     set GETLS080=%RPT080T1%
     set PUTRS080=%BaseLib1%\DATA\APPL\SIMOTIME.DATA.RPT080D1.DAT
     call SimoNOTE "DataTake %GETLS080% "
     call SimoNOTE "DataMake %PUTRS080% "
     if exist %PUTRS080% del %PUTRS080%
     run CV80ALAR
     if not exist %PUTRS080% set JobStatus=0003
     if not "%JobStatus%" == "0000" goto EojNok
rem  *
rem  * *******************************************************************
     call SimoNOTE "Convert RSEQ 80 Bytes to RSEQ 133 bytes report file"
     set RPT080D1=%PUTRS080%
     set RPT133D1=%BaseLib1%\DATA\APPL\SIMOTIME.DATA.RPT133D1.DAT
     call SimoNOTE "DataTake %RPT080D1% "
     call SimoNOTE "DataMake %RPT133D1% "
     if exist %RPT133D1% del %RPT133D1%
     run RPT133C8
     if exist %RPT133D1% goto :EojAok
     set JobStatus=0020
     goto :EojNok
rem  *
rem  * *******************************************************************
:EojAok
     call SimoNOTE "Finished CmdName %CmdName%, Job Status is %JobStatus%"
     goto :End
:EojNok
     call SimoNOTE "ABENDING CmdName %CmdName%, Job Status is %JobStatus%"
:End
     if not "%SIMOGENS%" == "BATCH" pause

Table of Contents Previous Section Next Section 2nd Baseline, Different Data/Time Stamps

This Windows CMD file (CRT133W2.cmd) will use the Windows ECHO Command to create the logical copy of the baseline file. The user data will be identical. The date and time stamp in the header records will be different. The ASCII/Text file will then be converted to a sequential file that will be used to test the Data File Compare program that was generated.

@echo OFF
rem  * *******************************************************************
rem  *               CRT133W2.CMD - a Windows Command File               *
rem  *         This program is provided by SimoTime Technologies         *
rem  *           (C) Copyright 1987-2019 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  *
rem  * Text   - Create 133 byte print files for testing.
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * The job will create three (3) test files containing REPORT-oriented
rem  * information.
rem  *
rem  *                     ************
rem  *                     * CRT133W2 *
rem  *                     ********cmd*
rem  *                          *
rem  *                          *
rem  *                     ************     ************
rem  *                     *   echo   ******* RPT080T1 *
rem  *                     ********win*     *******lseq*
rem  *                          *
rem  *    ************     ************     ************
rem  *    * GETLS080 ******* CV80ALAR ******* PUTRS080 *   See Note-1
rem  *    *******lseq*     ********cbl*     *******rseq*
rem  *                          *
rem  *    ************     ************     ************
rem  *    * RPT080D1 ******* RPT133C8 ******* RPT133D1 *   See Note-2
rem  *    *******lseq*     ********cbl*     *******rseq*
rem  *                          *
rem  *                          *
rem  *                     ************
rem  *                     *   EOJ    *
rem  *                     ************
rem  *
rem  *    Note-1: RPT080T1 will be mapped to GETLS080
rem  *    Note-1: GETLS080 will be mapped to RPT080D1
rem  *
rem  * *******************************************************************
rem  * Prepare the environment...
     set CmdName=CRT133W2
     call ..\Env1BASE %CmdName%
     if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
rem  *
     call SimoNOTE "*******************************************************%CmdName%"
     call SimoNOTE "Starting CmdName %CmdName%"
rem  *
rem  * *******************************************************************
     set RPT080T1=%BaseLib1%\DATA\TXT1\RPT080T2.TXT
     call SimoNOTE "DataMake %RPT080T2% "
rem  *    ....:....1....:....2....:....3....:....4....:....5....:....6.
     echo 1Report Identifier     Primary Header              2010/02/14>%RPT080T1%
     echo  Page: 0001            Sub-Title Info              16:14:44pm>>%RPT080T1%
     echo  Left Data-01          Center Data 01           Right Data 01>>%RPT080T1%
     echo  Left Data-02          Center Data 02           Right Data 02>>%RPT080T1%
     echo  Left Data-03          Center Data 03           Right Data 03>>%RPT080T1%
     echo  Left Data-04          Center Data 04           Right Data 04>>%RPT080T1%
     echo  Left Data-05          Center Data 05           Right Data 05>>%RPT080T1%
     echo 1Report Identifier     Primary Header              2010/02/14>>%RPT080T1%
     echo  Page: 0002            Sub-Title Info              16:14:44pm>>%RPT080T1%
     echo  Left Data-21          Center Data 21           Right Data 21>>%RPT080T1%
     echo  Left Data-22          Center Data 22           Right Data 22>>%RPT080T1%
     echo  Left Data-23          Center Data 23           Right Data 23>>%RPT080T1%
     echo  Left Data-24          Center Data 24           Right Data 24>>%RPT080T1%
     echo  Left Data-25          Center Data 25           Right Data 25>>%RPT080T1%
rem  *
rem  * *******************************************************************
     call SimoNOTE "Continue Convert LSEQ to RSEQ 80 Bytes"
     set GETLS080=%RPT080T1%
     set PUTRS080=%BaseLib1%\DATA\APPL\SIMOTIME.DATA.RPT080D2.DAT
     call SimoNOTE "DataTake %GETLS080% "
     call SimoNOTE "DataMake %PUTRS080% "
     if exist %PUTRS080% del %PUTRS080%
     run CV80ALAR
     if not exist %PUTRS080% set JobStatus=0003
     if not "%JobStatus%" == "0000" goto EojNok
rem  *
rem  * *******************************************************************
     call SimoNOTE "Convert RSEQ 80 Bytes to RSEQ 133 bytes report file"
     set RPT080D1=%PUTRS080%
     set RPT133D1=%BaseLib1%\DATA\APPL\SIMOTIME.DATA.RPT133D2.DAT
     call SimoNOTE "DataTake %RPT080D1% "
     call SimoNOTE "DataMake %RPT133D1% "
     if exist %RPT133D1% del %RPT133D1%
     run RPT133C8
     if exist %RPT133D1% goto :EojAok
     set JobStatus=0020
     goto :EojNok
rem  *
rem  * *******************************************************************
:EojAok
     call SimoNOTE "Finished CmdName %CmdName%, Job Status is %JobStatus%"
     goto :End
:EojNok
     call SimoNOTE "ABENDING CmdName %CmdName%, Job Status is %JobStatus%"
:End
     if not "%SIMOGENS%" == "BATCH" pause

Table of Contents Previous Section Next Section Truncated Test File, Different Record Count

This Windows CMD file (CRT133W3.cmd) will use the Windows ECHO Command to create the truncated copy of the baseline file. The user data in the line items will be identical. The date and time stamp in the header records will be different. The ASCII/Text file will then be converted to a sequential file that will be used to test the Data File Compare program that was generated.

@echo OFF
rem  * *******************************************************************
rem  *               CRT133W3.CMD - a Windows Command File               *
rem  *         This program is provided by SimoTime Technologies         *
rem  *           (C) Copyright 1987-2019 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  *
rem  * Text   - Create 133 byte print files for testing.
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * The job will read an 80-byte file that contains REPORT
rem  * information.
rem  *
rem  * The job will create three (3) test files containing REPORT-oriented
rem  * information.
rem  *
rem  *                     ************
rem  *                     * CRT133W3 *
rem  *                     ********cmd*
rem  *                          *
rem  *                          *
rem  *                     ************     ************
rem  *                     *   echo   ******* RPT080T1 *
rem  *                     ********win*     *******lseq*
rem  *                          *
rem  *    ************     ************     ************
rem  *    * GETLS080 ******* CV80ALAR ******* PUTRS080 *   See Note-1
rem  *    *******lseq*     ********cbl*     *******rseq*
rem  *                          *
rem  *    ************     ************     ************
rem  *    * RPT080D1 ******* RPT133C8 ******* RPT133D1 *   See Note-2
rem  *    *******lseq*     ********cbl*     *******rseq*
rem  *                          *
rem  *                          *
rem  *                     ************
rem  *                     *   EOJ    *
rem  *                     ************
rem  *
rem  *    Note-1: RPT080T1 will be mapped to GETLS080
rem  *    Note-1: GETLS080 will be mapped to RPT080D1
rem  *
rem  * *******************************************************************
rem  * Prepare the environment...
     set CmdName=CRT133W3
     call ..\Env1BASE %CmdName%
     if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
rem  *
     call SimoNOTE "*******************************************************%CmdName%"
     call SimoNOTE "Starting CmdName %CmdName%"
rem  *
rem  * *******************************************************************
     set RPT080T1=%BaseLib1%\DATA\TXT1\RPT080T3.TXT
     call SimoNOTE "DataMake %RPT080T1% "
rem  *    ....:....1....:....2....:....3....:....4....:....5....:....6.
     echo 1Report Identifier     Primary Header              2010/02/14>%RPT080T1%
     echo  Page: 0001            Sub-Title Info              16:14:44pm>>%RPT080T1%
     echo  Left Data-01          Center Data 01           Right Data 01>>%RPT080T1%
     echo  Left Data-02          Center Data 02           Right Data 02>>%RPT080T1%
     echo  Left Data-03          Center Data 03           Right Data 03>>%RPT080T1%
     echo  Left Data-04          Center Data 04           Right Data 04>>%RPT080T1%
     echo  Left Data-05          Center Data 05           Right Data 05>>%RPT080T1%
     echo 1Report Identifier     Primary Header              2010/02/14>>%RPT080T1%
     echo  Page: 0002            Sub-Title Info              16:14:44pm>>%RPT080T1%
     echo  Left Data-21          Center Data 21           Right Data 21>>%RPT080T1%
rem  *
rem  * *******************************************************************
     call SimoNOTE "Continue Convert LSEQ to RSEQ 80 Bytes"
     set GETLS080=%RPT080T1%
     set PUTRS080=%BaseLib1%\DATA\APPL\SIMOTIME.DATA.RPT080D3.DAT
     call SimoNOTE "DataTake %GETLS080% "
     call SimoNOTE "DataMake %PUTRS080% "
     if exist %PUTRS080% del %PUTRS080%
     run CV80ALAR
     if not exist %PUTRS080% set JobStatus=0003
     if not "%JobStatus%" == "0000" goto EojNok
rem  *
rem  * *******************************************************************
     call SimoNOTE "Convert RSEQ 80 Bytes to RSEQ 133 bytes report file"
     set RPT080D1=%PUTRS080%
     set RPT133D1=%BaseLib1%\DATA\APPL\SIMOTIME.DATA.RPT133D3.DAT
     call SimoNOTE "DataTake %RPT080D1% "
     call SimoNOTE "DataMake %RPT133D1% "
     if exist %RPT133D1% del %RPT133D1%
     run RPT133C8
     if exist %RPT133D1% goto :EojAok
     set JobStatus=0020
     goto :EojNok
rem  *
rem  * *******************************************************************
:EojAok
     call SimoNOTE "Finished CmdName %CmdName%, Job Status is %JobStatus%"
     goto :End
:EojNok
     call SimoNOTE "ABENDING CmdName %CmdName%, Job Status is %JobStatus%"
:End
     if not "%SIMOGENS%" == "BATCH" pause

Table of Contents Previous Section Next Section Modified Test File, Different Record Content

This Windows CMD file (CRT133W4.cmd) will use the Windows ECHO Command to modified copy of the baseline file. The record content will have an embedded difference. The date and time stamp in the header records will be different. The ASCII/Text file will then be converted to a sequential file that will be used to test the Data File Compare program that was generated.

@echo OFF
rem  * *******************************************************************
rem  *               CRT133W4.CMD - a Windows Command File               *
rem  *         This program is provided by SimoTime Technologies         *
rem  *           (C) Copyright 1987-2019 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  *
rem  * Text   - Create 133 byte print files for testing.
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * The job will create three (3) test files containing REPORT-oriented
rem  * information.
rem  *
rem  *                     ************
rem  *                     * CRT133W4 *
rem  *                     ********cmd*
rem  *                          *
rem  *                          *
rem  *                     ************     ************
rem  *                     *   echo   ******* RPT080T1 *
rem  *                     ********win*     *******lseq*
rem  *                          *
rem  *    ************     ************     ************
rem  *    * GETLS080 ******* CV80ALAR ******* PUTRS080 *   See Note-1
rem  *    *******lseq*     ********cbl*     *******rseq*
rem  *                          *
rem  *    ************     ************     ************
rem  *    * RPT080D1 ******* RPT133C8 ******* RPT133D1 *   See Note-2
rem  *    *******lseq*     ********cbl*     *******rseq*
rem  *                          *
rem  *                          *
rem  *                     ************
rem  *                     *   EOJ    *
rem  *                     ************
rem  *
rem  *    Note-1: RPT080T1 will be mapped to GETLS080
rem  *    Note-1: GETLS080 will be mapped to RPT080D1
rem  *
rem  * *******************************************************************
rem  * Prepare the environment...
     set CmdName=CRT133W4
     call ..\Env1BASE %CmdName%
     if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
rem  *
     call SimoNOTE "*******************************************************%CmdName%"
     call SimoNOTE "Starting CmdName %CmdName%"
rem  *
rem  * *******************************************************************
     set RPT080T1=%BaseLib1%\DATA\TXT1\RPT080T4.TXT
     call SimoNOTE "DataMake %RPT080T1% "
rem  *    ....:....1....:....2....:....3....:....4....:....5....:....6.
     echo 1Report Identifier     Primary Header              2010/02/14>%RPT080T1%
     echo  Page: 0001            Sub-Title Info              16:14:44pm>>%RPT080T1%
     echo  Left Data-01          Center Data 0l           Right Data 01>>%RPT080T1%
     echo  Left Data-02          Center Data 02           Right Data 02>>%RPT080T1%
     echo  Left Data-03          Center Data 03           Right Data 03>>%RPT080T1%
     echo  Left Data-04          Center Data 04           Right Data 04>>%RPT080T1%
     echo  Left Data-05          Center Data 05           Right Data 05>>%RPT080T1%
     echo 1Report Identifier     Primary Header              2010/02/14>>%RPT080T1%
     echo  Page: 0002            Sub-Title Info              16:14:44pm>>%RPT080T1%
     echo  Left Data-21          Center Data 21           Right Data 21>>%RPT080T1%
     echo  Left Data-22          Center Data 22           Right Data 22>>%RPT080T1%
     echo  Left Data-23          Center Data 23           Right Data 23>>%RPT080T1%
     echo  Left Data-24          Center Data 24           Right Data 24>>%RPT080T1%
     echo  Left Data-25          Center Data 25           Right Data 25>>%RPT080T1%
rem  *
rem  * *******************************************************************
     call SimoNOTE "Continue Convert LSEQ to RSEQ 80 Bytes"
     set GETLS080=%RPT080T1%
     set PUTRS080=%BaseLib1%\DATA\APPL\SIMOTIME.DATA.RPT080D4.DAT
     call SimoNOTE "DataTake %GETLS080% "
     call SimoNOTE "DataMake %PUTRS080% "
     if exist %PUTRS080% del %PUTRS080%
     run CV80ALAR
     if not exist %PUTRS080% set JobStatus=0003
     if not "%JobStatus%" == "0000" goto EojNok
rem  *
rem  * *******************************************************************
     call SimoNOTE "Convert RSEQ 80 Bytes to RSEQ 133 bytes report file"
     set RPT080D1=%PUTRS080%
     set RPT133D1=%BaseLib1%\DATA\APPL\SIMOTIME.DATA.RPT133D4.DAT
     call SimoNOTE "DataTake %RPT080D1% "
     call SimoNOTE "DataMake %RPT133D1% "
     if exist %RPT133D1% del %RPT133D1%
     run RPT133C8
     if exist %RPT133D1% goto :EojAok
     set JobStatus=0020
     goto :EojNok
rem  *
rem  * *******************************************************************
:EojAok
     call SimoNOTE "Finished CmdName %CmdName%, Job Status is %JobStatus%"
     goto :End
:EojNok
     call SimoNOTE "ABENDING CmdName %CmdName%, Job Status is %JobStatus%"
:End
     if not "%SIMOGENS%" == "BATCH" pause

Table of Contents Previous Section Next Section Summary

The primary focus of this document is on the items (process and procedures) that do the actual data file compare. A secondary focus discusses items that are used to generate the compare program and prepare the environment for the compare tasks. This document may be used as a tutorial for new programmers or as a quick reference for experienced programmers.

In the world of programming there are many ways to solve a problem. This documentation and software were developed and tested on systems that are configured for a SIMOTIME environment based on the hardware, operating systems, user requirements and security requirements. Therefore, adjustments may be needed to execute the jobs and programs when transferred to a system of a different architecture or configuration.

SIMOTIME Services has experience in moving or sharing data or application processing across a variety of systems. For additional information about SIMOTIME Services or Technologies please contact us using the information in the  Contact or Feedback  section of this document.

Table of Contents Previous Section Next Section Software Agreement and Disclaimer

Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Technologies. Once the fee is received by SimoTime the latest version of the software, documentation or training material will be delivered and a license will be granted for use within an enterprise, provided the SimoTime copyright notice appear on all copies of the software. The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Technologies.

SimoTime Technologies makes no warranty or representations about the suitability of the software, documentation or learning material for any purpose. It is provided "AS IS" without any expressed or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement. SimoTime Technologies shall not be liable for any direct, indirect, special or consequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software, documentation or training material.

Table of Contents Previous Section Next Section Downloads and Links

This section includes links to documents with additional information that are beyond the scope and purpose of this document. The first group of documents may be available from a local system or via an internet connection, the second group of documents will require an internet connection.

Note: A SimoTime License is required for the items to be made available on a local system or server.

Table of Contents Previous Section Next Section Current Server or Internet Access

The following links may be to the current server or to the Internet.

Note: The latest versions of the SimoTime Documents and Program Suites are available on the Internet and may be accessed using the Link to Internet icon. If a user has a SimoTime Enterprise License the Documents and Program Suites may be available on a local server and accessed using the Link to Server icon.

Link to Internet   Link to Server   Explore the Principles of Data File Validation. This link includes guidelines for defining requirements and determining the scope of effort for a data validation effort. This effort includes a data file compare process, a technique for accumulating summary totals with a record count and a technique for reading a VSAM, KSDS and producing a hex-dump output based on a list of user-defined keys.

Link to Internet   Link to Server   Explore How to Generate a Data File Compare, Validate or Hex-Dump Program using simple specification statements in a Process Control File (PCF). This link to the User Guide includes the information necessary to create a Process Control File and generate the COBOL programs that will do a data file compare, accumulate summary totals with a record count or produce a Hex-Dump of records in a VSAM, KSDS based on a list of user-defined keys. The User Guide contains a list of the PCF statements that are used for the data file compare, validate or dump process.

Link to Internet   Link to Server   Explore An Enterprise System Model that describes and demonstrates how Applications that were running on a Mainframe System and non-relational data that was located on the Mainframe System were copied and deployed in a Microsoft Windows environment with Micro Focus Enterprise Server.

Link to Internet   Link to Server   Explore the COBOL Connection for more examples of COBOL programming techniques and sample code.

Link to Internet   Link to Server   Explore an Extended List of Software Technologies that are available for review and evaluation. The software technologies (or Z-Packs) provide individual programming examples, documentation and test data files in a single package. The Z-Packs are usually in zip format to reduce the amount of time to download.

Link to Internet   Link to Server   Explore The ASCII and EBCDIC Translation Tables. These tables are provided for individuals that need to better understand the bit structures and differences of the encoding formats.

Link to Internet   Link to Server   Explore The File Status Return Codes that are used to interpret the results of accessing VSAM data sets and/or QSAM files.

Table of Contents Previous Section Next Section Internet Access Required

The following links will require an internet connection.

This suite of programs and documentation is available for download. Link to an Evaluation zPAK Option that includes the program members, documentation and control files.

A good place to start is The SimoTime Home Page for access to white papers, program examples and product information. This link requires an Internet Connection

Explore The Micro Focus Web Site for more information about products (including Micro Focus COBOL) and services available from Micro Focus. This link requires an Internet Connection.

Table of Contents Previous Section Next Section Glossary of Terms

Link to Internet   Link to Server   Explore the Glossary of Terms for a list of terms and definitions used in this suite of documents and white papers.

Table of Contents Previous Section Next Section Comments or Feedback

This document was created and is maintained by SimoTime Technologies. If you have any questions, suggestions, comments or feedback please use the following contact information.

1. Send an e-mail to our helpdesk.
1.1. helpdesk@simotime.com.
2. Our telephone numbers are as follows.
2.1. 1 415 763-9430 office-helpdesk
2.2. 1 415 827-7045 mobile

 

We appreciate hearing from you.

Table of Contents Previous Section Next Section Company Overview

SimoTime Technologies was founded in 1987 and is a privately owned company. We specialize in the creation and deployment of business applications using new or existing technologies and services. We have a team of individuals that understand the broad range of technologies being used in today's environments. Our customers include small businesses using Internet technologies to corporations using very large mainframe systems.

Quite often, to reach larger markets or provide a higher level of service to existing customers it requires the newer Internet technologies to work in a complementary manner with existing corporate mainframe systems. We specialize in preparing applications and the associated data that are currently residing on a single platform to be distributed across a variety of platforms.

Preparing the application programs will require the transfer of source members that will be compiled and deployed on the target platform. The data will need to be transferred between the systems and may need to be converted and validated at various stages within the process. SimoTime has the technology, services and experience to assist in the application and data management tasks involved with doing business in a multi-system environment.

Whether you want to use the Internet to expand into new market segments or as a delivery vehicle for existing business functions simply give us a call or check the web site at http://www.simotime.com


Return-to-Top
Data File Compare of Two Report Files of 133 Byte Records
Copyright © 1987-2025
SimoTime Technologies and Services
All Rights Reserved
When technology complements business
http://www.simotime.com