Compare VSAM Data Sets
Positional Compare within Records
  Table of Contents  v-24.01.01 - cup30301.htm 
  Introduction
  Primary Functions
  Batch Job Scripts
  JCL Members, Data Set Compare
  Record Positions Defined at Compile Time
  Record Positions Defined at Execution Time
  CMD Files, Data Set Compare
  Record Positions Defined at Compile Time
  Record Positions Defined at Execution Time
  COBOL Program Members
  COBOL Programs, Data Set Compare
  Record Positions Defined at Compile Time
  Record Positions Defined at Execution Time
  Secondary Functions
  Generate a Data Set Compare Program
  Process Control File, PCF Members
  Record Positions Defined at Compile Time
  Record Positions Defined at Execution Time
  Ancillary Functionality
  Set the Environment
  Display and Log Messages
  Create Test Files
  Create Test Files, use a JCL Member
  Create Test Files, use a Windows CMD File
  Summary
  Software Agreement and Disclaimer
  Downloads and Links
  Current Server or Internet Access
  Internet Access Required
  Glossary of Terms
  Contact 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 VSAM KSDS's (Key-Sequenced-Data-Sets). The 2nd section (Secondary Functions) will focus on the preparation tasks required prior to doing VSAM KSDS compare. The 3rd section (Ancillary Functionality) will describe some of the supporting tasks (such as creating test data sets) that are required.

This suite of programs is provided as one of the many possible solutions for comparing data sets. This example includes JCL Members, Windows CMD Files and a COBOL programs. It is a Data Set Compare with moderate complexity. It will compare two VSAM, Keyed-Sequence-Data-Sets (KSDS). This example does a partial record compare. The positions within a record to be compared are defined by the user at compile time using the Process Control File or at execution time using a control (or parameter) file. Also, this example will track added or deleted records.

When the records within the data sets are compared and if a difference is found the COBOL compare program will call SIMOHEX4.CBL and SIMOLOGS.CBL to display (or log) information about the difference. 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.

This example will use IDCAMS create two VSAM KSDS's. The Data Sets will be used to demonstrate the capabilities of the data compare processes. During the compare process only selected positions within a record will be compared. Since the records contain fields that have the last activity date and time a NOT-Equal condition will always exist. Therefore, we want to do a compare and not have these fields (or positions within the record) be include in the compare process.

Many companies are looking for ways to compare data files using a mainframe system and/or 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 or a Mainframe System with ZOS or VSE.


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-2024
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 set 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.

Table of Contents Previous Section Next Section Batch Job Scripts

This section describes the batch job scripts that are used to prepare the environment and execute the test cases. A Job Script will identify and allocate resources (data files, memory, work areas, control information, etc.) for the Job or Job Step and execute programs that will process, access or utilize the allocated resources.

Table of Contents Previous Section Next Section JCL Members, Data Set Compare

This section will focus on two JCL Members that execute a data set compare process. Since the Data Sets are in sequence by a key field it is possible to identify added or deleted records. The first JCL Member will read records from the two data sets and compare segments within each record based on a predetermined position and length. The second JCL Member will compare record segments based on the position and length specified in a parameter file at execution time. The Data Set Compare programs will find the differences, produce a NOT-Equal result and display/record the information to SYSOUT and SYSLOG.

Table of Contents Previous Section Next Section Record Positions Defined at Compile Time

This JCL Member (CUP303J1.jcl) will read two key sequenced data sets (Micro Focus Indexed Files or IBM VSAM KSDS) and compare record segments based on position and length. The job execution will produce a NOT-Equal result with a non-zero return code. Information about the differences will be displayed/recorded with record counts to the SYSOUT device and/or a user-defined SYSLOG file. The position and length of the record segments to be compared is determined at compile time.

//CUP303J1 JOB (SIMOTIME),'VSAM KSDS COMPARE',CLASS=1,MSGCLASS=0,
//             NOTIFY=CSIP1
//* *******************************************************************
//*       CUP303J1.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 VSAM Key-Sequenced-Data-Sets (KSDS).
//* Author - SimoTime Technologies
//* Date   - January 24, 1996
//*
//* This example will do a compare of part of the records in the
//* data set. The actual record length is 512 bytes but the compare
//* will only compare the first 303 positions of a record.
//*
//* Since the files are in sequence by the key-field the program
//* will explicity identify deleted or added records.
//*
//* This set of programs will run on a mainframe under MVS or on a
//* Personal Computer with Windows and Micro Focus Technologies.
//*
//*                     ************
//*                     * CUP303J1 *
//*                     ********jcl*
//*                          *
//*    ************     ************     ************
//*    * CUEXPECT *--*--* CUP303C1 *-----*  SYSLOG  *
//*    *******ksds*  *  ********cbl*     ************
//*                  *       *
//*    ************  *       *
//*    * CUACTUAL *--*       *
//*    *******ksds*          *
//*                          *
//*                     ************
//*                     *   EOJ    *
//*                     ************
//*
//* *******************************************************************
//* Compare two VSAM KSDS's or Customer Master Files...
//* The positions within the records to be compared are determined by
//* the COMPARE statements in the Process Control File. This is done
//* when the compare program is generated.
//*
//* The results of the compare processing is posted to the SYSLOG File.
//* The results file must exist and new information is appended to the
//* end of the file. For more information about how to create an empty
//* log file (SYSOUT) refer to the SYSLOGJ8.JCL Member.
//*
//* *******************************************************************
//* Step 1 of 1, this is a single step job.
//*
//CUSTCOMP EXEC PGM=CUP303C1
//STEPLIB  DD  DSN=SIMOTIME.DEMO.LOADLIB1,DISP=SHR
//CUEXPECT DD  DSN=SIMOTIME.DATA.CUSTMAST,DISP=SHR
//CUACTUAL DD  DSN=SIMOTIME.DATA.CUS512D2,DISP=SHR
//SYSLOG   DD  SYSOUT=*
//SYSOUT   DD  SYSOUT=*
//

Table of Contents Previous Section Next Section Record Positions Defined at Execution Time

This JCL Member (CUP303J2.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 and/or a user-defined SYSLOG file. The position and length of the record segments to be compared is determined at execution time by the COMPARE statement in the SYSUT3 Control File.

//CUP303J2 JOB (SIMOTIME),'VSAM KSDS COMPARE',CLASS=1,MSGCLASS=0,
//             NOTIFY=CSIP1
//* *******************************************************************
//*       CUP303J2.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 VSAM Key-Sequenced-Data-Sets (KSDS).
//* Author - SimoTime Technologies
//* Date   - January 24, 1996
//*
//* This example will do a compare of part of the records in the
//* data set. The actual record length is 512 bytes but the compare
//* will only compare the first 303 positions of a record.
//*
//* Since the files are in sequence by the key-field the program
//* will explicity identify deleted or added records.
//*
//* This set of programs will run on a mainframe under MVS or on a
//* Personal Computer with Windows and Micro Focus Technologies.
//*
//*                     ************
//*                     * CUP303J2 *
//*                     ********jcl*
//*                          *
//*    ************     ************     ************
//*    * CUEXPECT *--*--* CUP303C2 *-----*  SYSLOG  *
//*    *******ksds*  *  ********cbl*     ************
//*                  *       *
//*    ************  *       *
//*    * CUACTUAL *--*       *
//*    *******ksds*  *       *
//*                  *       *
//*    ************  *       *
//*    *  SYSUT3  *--*       *
//*    *******rseq*          *
//*                          *
//*                     ************
//*                     *   EOJ    *
//*                     ************
//*
//* *******************************************************************
//* STEP 1 of 3, Delete the previously created SYSLOG file.
//*
//SYSLOGDT EXEC PGM=IEFBR14
//SYSLOG   DD  DSN=SIMOTIME.DATA.SYSLOGCM,DISP=(MOD,DELETE,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=V,LRECL=1055,DSORG=PS)
//*
//* *******************************************************************
//* STEP 2 of 3, Allocate a new SYSLOG file.
//* Note: The LRECL is four (4) bytes bigger than the logical record
//*       that is defined in the program that writes to SYSLOG. This
//*       allows for the four (4) byte Record Descriptor Word (RDW)
//*       that is appended to the front of each record. The program
//*       defines the records as varying in size from 64 to 1,051.
//* Note: It is necessary to pre-allocate the SYSLOG file. The program
//*       that does the actual file compare will do an "OPEN EXTEND".
//*       If the file is not pre-allocated, an open error will be
//*       posted and the program will execute but will only display
//*       truncated information to SYSOUT.
//*
//SYSLOGCT EXEC PGM=IEFBR14
//SYSLOG   DD  DSN=SIMOTIME.DATA.SYSLOGCM,DISP=(NEW,CATLG,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=V,LRECL=1055,DSORG=PS)
//*
//* *******************************************************************
//* STEP 3 of 3, Execute the compare program.
//* Note: when a difference occurs the information will be written to
//*       the SYSLOG file
//* *******************************************************************
//* Compare two VSAM KSDS's or Customer Master Files...
//* The positions within the records to be compared are determined by
//* the COMPARE statements in the SYSUT3 file. This is done when the
//* compare program is executed.
//*
//* The results of the compare processing is posted to the SYSLOG File.
//* The results file must exist and new information is appended to the
//* end of the file. For more information about how to create an empty
//* log file (SYSLOG) refer to the SYSLOGJ8.JCL Member.
//*
//CUSTCOMP EXEC PGM=CUP303C2
//STEPLIB  DD  DSN=SIMOTIME.DEMO.LOADLIB1,DISP=SHR
//CUACTUAL DD  DSN=SIMOTIME.DATA.CUSTMAST,DISP=SHR
//CUEXPECT DD  DSN=SIMOTIME.DATA.CUS512D2,DISP=SHR
//SYSUT3   DD  DSN=SIMOTIME.PDS.PARMLIB(CUCOMPD2),DISP=SHR
//SYSLOG   DD  DSN=SIMOTIME.DATA.SYSLOGCM,DISP=SHR
//SYSOUT   DD  SYSOUT=*
//

Table of Contents Previous Section Next Section CMD Files, Data Set Compare

This section will focus on two Windows CMD Files that execute a data set compare process. Since the Data Sets are in sequence by a key field it is possible to identify added or deleted records. The first CMD File will read records from the two data sets and compare segments within each record based on a predetermined position and length. The second CMD File will compare record segments based on the position and length specified in a parameter file at execution time. The Data Set Compare programs will find the differences, produce a NOT-Equal result and display/record the information to SYSOUT and SYSLOG.

Table of Contents Previous Section Next Section Record Positions Defined at Compile Time

This CMD File (CUP30W1.cmd) will read two key sequenced data sets (Micro Focus Indexed Files or IBM VSAM KSDS)) and compare record segments based on position and length. The job execution will produce a NOT-Equal result with a non-zero return code. Information about the differences will be displayed/recorded with record counts to the SYSOUT device and/or a user-defined SYSLOG file. The position and length of the record segments to be compared is determined at compile time.

@echo OFF
     set CmdName=CUP303W1
rem  * *******************************************************************
rem  *               CUP303W1.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 Customer Master Files.
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * The job will compare the records in two Customer Files. Since
rem  * a date and time stamp is located in the second half of a record
rem  * only the first 303 bytes of each record are compared.
rem  *
rem  * Since the files are in sequence by the key-field the program
rem  * will explicity identify deleted or added records.
rem  *
rem  *                     ************
rem  *                     * CUP303W1 *
rem  *                     ********cmd*
rem  *                          *
rem  *    ************     ************     ************
rem  *    * CUEXPECT *--*--* CUP303C1 *-----*  SYSLOG  *
rem  *    *******ksds*  *  ********cbl*     ************
rem  *                  *       *
rem  *    ************  *       *
rem  *    * CUACTUAL *--*       *
rem  *    *******ksds*          *
rem  *                          *
rem  *                     ************
rem  *                     *   EOJ    *
rem  *                     ************
rem  *
rem  * *******************************************************************
rem  * Compare two VSAM KSDS's or Customer Master Files...
rem  * The positions within the records to be compared are determined by
rem  * the COMPARE statements in the Process Control File. This is done
rem  * when the compare program is generated.
rem  *
rem  * The results of the compare processing is posted to the SYSLOG File.
rem  * The results file must exist and new information is appended to the
rem  * end of the file. For more information about how to create an empty
rem  * log file refer to the CRTLOGJ1.JCL Member.
rem  *
rem  * *******************************************************************
rem  * Step 1 of 2, Set the environment...
rem  *
     call ..\Env1BASE %CmdName%
     if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
     set SYSLOG=%BaseLib1%\LOGS\SYSLOG_RSEQ_CUP303W1.DAT
     set SYSOUT=%BaseLib1%\LOGS\SYSOUT_LSEQ_CUP303W1.txt
rem  *
     call SimoNOTE "*******************************************************%CmdName%"
     call SimoNOTE "Starting CmdName %CmdName%"
     run SYSLOGC8
     set CUACTUAL=%BaseLib1%\Data\APPL\SIMOTIME.DATA.CUSTMAST.DAT
     set CUEXPECT=%BaseLib1%\Data\APPL\SIMOTIME.DATA.CUS512D2.DAT
rem  *
rem  * *******************************************************************
rem  * Step 2 of 2,  Compare two VSAM KSDS's or Customer Master File...
rem  *
     call SimoNOTE "DataTake CUACTUAL=%CUACTUAL%"
     call SimoNOTE "DataTake CUEXPECT=%CUEXPECT%"
     run CUP303C1
     set ERRORLEVELTWO=%ERRORLEVEL%
     if not "%ERRORLEVELTWO%" == "0" set JobStatus=0010
     if "%ERRORLEVELTWO%" == "4" set JobStatus=0004
     if not %JobStatus% == 0000 goto :EojNok
rem  *
rem  * *******************************************************************
:EojAok
     call SimoNOTE "DataMake SYSOUT=%SYSOUT%"
     call SimoNOTE "Finished CmdName %CmdName%, Job Status is %JobStatus% "
     goto :End
:EojNok
     call SimoNOTE "DataMake SYSOUT=%SYSOUT%"
     call SimoNOTE "ABENDING CmdName %CmdName%, Job Status is %JobStatus% "
:End
rem  * Convert VREC to LSEQ and display using NotePad...
     if not "SIMOGENS" == "BATCH" call SYSLOGW1
     call SimoNOTE "Conclude Data Set Compare Status is  %ERRORLEVELTWO% "
     if not "SIMOGENS" == "BATCH" pause

Table of Contents Previous Section Next Section Record Positions Defined at Execution Time

This CMD File (CUP30W2.cmd) 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 and/or a user-defined SYSLOG file. The position and length of the record segments to be compared is determined at execution time by the COMPARE statement in the SYSUT3 Control File.

@echo OFF
     set CmdName=CUP303W2
rem  * *******************************************************************
rem  *               CUP303W2.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 Customer Master Files.
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * The job will compare the records in two Customer Files. Since
rem  * a date and time stamp is located in the second half of a record
rem  * only the first 303 bytes of each record are compared.
rem  *
rem  * Since the files are in sequence by the key-field the program
rem  * will explicity identify deleted or added records.
rem  *
rem  *                     ************     ************
rem  *                     * CUP303W2 *-----*  JOBLOG  *
rem  *                     ********jcl*     ************
rem  *                          *
rem  *    ************     ************     ************
rem  *    * CUEXPECT *--*--* CUP303C2 *-----*  SYSLOG  *
rem  *    *******ksds*  *  ********cbl*     ************
rem  *                  *       *
rem  *    ************  *       *
rem  *    * CUACTUAL *--*       *
rem  *    *******ksds*  *       *
rem  *                  *       *
rem  *    ************  *       *
rem  *    *  SYSUT3  *--*       *
rem  *    *******rseq*          *
rem  *                          *
rem  *                     ************
rem  *                     *   EOJ    *
rem  *                     ************
rem  *
rem  * *******************************************************************
rem  * Compare two VSAM KSDS's or Customer Master Files...
rem  * The positions within the records to be compared are determined by
rem  * the COMPARE statements in the SYSUT3 file. This is done when the
rem  * compare program is executed.
rem  *
rem  * The results of the compare processing is posted to the SYSLOG File.
rem  * The results file must exist and new information is appended to the
rem  * end of the file. For more information about how to create an empty
rem  * log file refer to the CRTLOGJ1.JCL Member.
rem  *
rem  * *******************************************************************
rem  * Step 1 of 2, Set the environment...
rem  *
     call ..\Env1BASE %CmdName%
     if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
     set syslog=%BaseLib1%\Data\APPL\SIMOTIME.SYSLOG.CUP303W2.DAT
rem  *
     call SimoNOTE "*******************************************************%CmdName%"
     call SimoNOTE "Starting CmdName %CmdName%"
     run SYSLOGC8
     set CUACTUAL=%BaseLib1%\DATA\APPL\SIMOTIME.DATA.CUSTMAST.DAT
     set CUEXPECT=%BaseLib1%\DATA\APPL\SIMOTIME.DATA.CUS512D2.DAT
     set SYSUT3=%BaseLib1%\PARMLIB2\CUCOMPD2.DAT
rem  *
rem  * *******************************************************************
rem  * Step 2 of 2,  Compare two VSAM KSDS's or Customer Master File...
rem  *
     call SimoNOTE "DataTake CUACTUAL=%CUACTUAL%"
     call SimoNOTE "DataTake CUEXPECT=%CUEXPECT%"
     run CUP303C2
     set ERRORLEVELTWO=%ERRORLEVEL%
     if not "%ERRORLEVELTWO%" == "0" set JobStatus=0010
     if "%ERRORLEVELTWO%" == "4" set JobStatus=0004
rem  *
rem  * *******************************************************************
:EojAok
     call SimoNOTE "DataTake SYSUT3=%SYSUT3%"
     call SimoNOTE "DataMake SYSOUT=%SYSOUT%"
     call SimoNOTE "Finished CmdName %CmdName%, Job Status is %JobStatus% "
     goto :End
:EojNok
     call SimoNOTE "DataTake SYSUT3=%SYSUT3%"
     call SimoNOTE "DataMake SYSOUT=%SYSOUT%"
     call SimoNOTE "ABENDING CmdName %CmdName%, Job Status is %JobStatus% "
:End
rem  * Convert VREC to LSEQ and display using NotePad...
     if not "SIMOGENS" == "BATCH" call SYSLOGW1
     call SimoNOTE "Conclude Data Set Compare Status is  %ERRORLEVELTWO% "
     if not "SIMOGENS" == "BATCH" pause

Table of Contents Previous Section Next Section COBOL Program Members

This section describes the COBOL Members that are are included in this test case.

Table of Contents Previous Section Next Section COBOL Programs, Data Set Compare

The Data File Compare Utility program (UTCOMPPE) does not do the compare. It generates the COBOL source code for a program that will compare the data files. The generated COBOL source code may be compiled and executed on an LUW platform with Micro Focus or a Mainframe system with ZOS or VSE.

Table of Contents Previous Section Next Section Record Positions Defined at Compile Time

This generated File Compare Program (CUP303C1.cbl) will read two key sequenced data sets (Micro Focus Indexed Files or IBM VSAM KSDS) and compare record segments based on position and length. Information about the differences will be displayed/recorded with record counts to the SYSOUT device and the SYSLOG File. The position and length of the record segments to be compared is determined at compile time and included in this program.

Review The Generated COBOL Source Code that does a record-by-record compare of two VSAM Key-Sequenced-Data-Sets (KSDS's).

Table of Contents Previous Section Next Section Record Positions Defined at Execution Time

This generated File Compare Program (CUP303C2.cbl) will read two key sequenced data sets (Micro Focus Indexed Files or IBM VSAM KSDS) and compare record segments based on position and length. Information about the differences will be displayed/recorded with record counts to the SYSOUT device and the SYSLOG File. The position and length of the record segments to be compared is determined at execution time. This program contains the code to read the SYSUT3 control file that has the COMPARE statements defining the segments to be compared.

Review The Generated COBOL Source Code that does a partial record-by-record compare of two VSAM Key-Sequenced-Data-Sets (KSDS's). The positions within the records to be compared are determined by a third control file that is read at exection time.

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 Set 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
Mainframe The Compilation and Execution of the generated COBOL source code is supported.
COBOL for OS/390 or later should be used (this provided 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.
Linux The Compilation and Execution of the generated COBOL source code is supported.
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 The Compilation and Execution of the generated COBOL source code is supported.
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.
Windows The Generation, Compilation and Execution of the generated COBOL source code is supported.
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.
  System Possibilities for Generated Data Set Comparison Programs

This link provides additional information for using  The Data File Compare Utility Program.  This utility program 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 on a record by record basis.

Refer to the Download and Links section of this document for links to additional documents that discuss this topic.

Table of Contents Previous Section Next Section Process Control File, PCF Members

The Process Control File or PCF contains the specification used by the Program Generator (UTCOMPRT). UTCOMPRT will read the PCF and generate the COBOL Source Code for a data set comparison program. This COBOL source code may be compiled and executed on an IBM Mainframe or a distributed system that is supported by Micro Focus COBOL technologies.

Table of Contents Previous Section Next Section Record Positions Defined at Compile Time

The following is the Process Control File (CUP30301.pcf) that will define the process and parameters required for generating a COBOL program that will compare two VSAM Key-Sequenced-Data-Sets (KSDS's). The positions within a record to be compared were determined when the program was generated. The compare positions were determined by the COMPARE statements in the Process Control File.

***********************************************************************
*                CUP30301.pcf - a Process Control File                *
*                   Provided by SimoTime Technologies                 *
*            (C) Copyright 1987-2019 All Rights Reserved              *
*              Web Site URL:   http://www.simotime.com                *
*                    e-mail:   helpdesk@simotime.com                  *
***********************************************************************
*
* The following group of statements will define the high level
* functions and processes to be performed.
*
&SIMOPREP  call ..\..\ENV1BASE
&USERPREP  call USERCOMP
&COPYFILE  CUSTCB01.cpy
&HTMLFILE  custcb01.htm
&FUNCTION  COMPARE
&CONFORM   IBM
&USRMODEL  SYSCOMP1.txt
*
* The following group of statements will define the behavioral
* characteristics and environment variables for the file I/O
* functions within the Program to be generated.
*
*HEAD34    ....:....1....:....2....:....3....
&HEAD34    Comparison, CustMAST from 1 to 303
&progid    CUP303C1
&SYSUT1    name=CUACTUAL org=Indexed recfm=VARIABLE rmin=512 rmax=512 kpos=1 klen=12
&SYSUT2    name=CUEXPECT org=Indexed recfm=VARIABLE rmin=512 rmax=512 kpos=1 klen=12
*
* The following group of statements will define the behavioral
* characteristics and environment variables for the compare functions
* within the Program to be generated.
*
* ..:....1....:....2....:....3....:....4....:....5....:....6....
&KEYFIELD  SYSUT1 pos  1 len  12 SYSUT2 pos  1 len  12
&COMPARE   SYSUT1 pos  1 len 348 SYSUT2 pos  1 len 348
*
* The following statements define what actions to take when a not-equal
* condition is encountered.
*
&DELTAMAX  5 EOF
&IFNECODE  0016
*
&SYSLOG    SIMOLOGS TEXT LOG1
&DFORMAT   ASC HEX EBC RPI
&DSTRING   1 348
&DISPLAY   LOG1
&SYSOUT    ENABLED
&SYSCON    ENABLED
*
&END

Table of Contents Previous Section Next Section Record Positions Defined at Execution Time

The following is the Process Control File (CUP30302.pcf) that will define the process and parameters required for generating a COBOL program that will compare two VSAM Key-Sequenced-Data-Sets (KSDS's). The positions within a record to be compared will be determined when the program is executed. The compare positions were determined by the COMPARE statements in the SYSUT3 control file.

***********************************************************************
*                CUP30302.pcf - a Process Control File                *
*                       SimoTime Technologies                         *
*            (C) Copyright 1987-2019 All Rights Reserved              *
*              Web Site URL:   http://www.simotime.com                *
*                    e-mail:   helpdesk@simotime.com                  *
***********************************************************************
* This is an example of the compare specifications to generate a Data
* File Compare Program. The specifications are processed by UTCOMPRT.
*
* The following group of statements will define the high level
* functions and processes to be performed.
*
&SIMOPREP  call ..\..\ENV1BASE
&USERPREP  call USERCOMP
&COPYFILE  CUSTCB01.CPY
&HTMLFILE  custcb01.htm
&FUNCTION  COMPARE
&CONFORM   IBM
&USRMODEL  SYSCOMP2.txt
*
* The following group of statements will define the behavioral
* characteristics and environment variables for the file I/O
* functions within the Program to be generated.
*
*HEAD34    ....:....1....:....2....:....3....
&HEAD34    /COMPARE defined at Execution Time
&progid    CUP303C2
&SYSUT1    name=CUACTUAL org=Indexed     recfm=VARIABLE rmin=512 rmax=512 kpos=1 klen=12
&SYSUT2    name=CUEXPECT org=Indexed     recfm=VARIABLE rmin=512 rmax=512 kpos=1 klen=12
&SYSUT3    name=SYSUT3   org=SEQUENTIAL  recfm=FIXED rlen=80
*
* The following group of statements will define the behavioral
* characteristics and environment variables for the compare functions
* within the Program to be generated.
* The KEYFIELD statement will enable the record INSERT/DELETE functions
* Note: the positions within the records to be compared are defined at
* execution time using the SYSUT3 parameter file.
*
&KEYFIELD  SYSUT1 pos  1 len  12 SYSUT2 pos  1 len  12
&KEYRECID  SYSUT1 pos  1 len  32 SYSUT2 pos  1 len  32
*COMPARE   SYSUT1 pos  1 len 348 SYSUT2 pos  1 len 348
*
* The following statements define what actions to take when a not-equal
* condition is encountered.
*
&DELTAMAX  5 EOF
&IFNECODE  0016
&DFORMAT   ASC HEX EBC
&DISPLAY   SYSOUT
&SYSLOG    ENABLED
*
&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.

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/or write messages to a log file with a data and time stamp. This provides a single, callable member that presents messages and logging information in a consistent manner and format. 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, use a JCL Member

This JCL Member (CPRS80J8.jcl) will use IEBGENER to create three sequential files that will be used to test 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, use a Windows CMD File

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

@echo OFF
rem  * *******************************************************************
rem  *               CPMK80W8.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 Sequential Data Sets on disk using IEBGENER.
rem  * Author - SimoTime Technologies
rem  * Date   = January 24, 1996
rem  *
rem  * The first job step (DeleteTEXT) will delete any previously created
rem  * files.
rem  * The second job step (CreateTEXT) will create a new ASCII/Text file.
rem  * The third step will convert the Line Sequential file to a Record
rem  * Sequential file.
rem  *
rem  * This set of programs will run on a Personal Computer with Windows
rem  * and Micro Focus Net Express.
rem  *
     set CmdName=CPMK80W8
     call ..\Env1BASE %CmdName%
     if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
rem  *
     call SimoNOTE "*******************************************************%CmdName%"
     call SimoNOTE "Starting CmdName %CmdName%, User is %USERNAME%"
     call SimoNOTE "StepInfo Delete previously created files"
     set CPLS80D1=%BaseLib1%\DATA\APPL\SIMOTIME.TEST.CPLS80D1.TXT
     set CPLS80D2=%BaseLib1%\DATA\APPL\SIMOTIME.TEST.CPLS80D2.TXT
     set CPLS80D3=%BaseLib1%\DATA\APPL\SIMOTIME.TEST.CPLS80D3.TXT
rem  *
rem  * *******************************************************************
rem  * Step   1 of 6  Create and populate a new ASCII/TEXT file...
rem  * This step will create a sequential file with three records. The
rem  * length of the records is 80 bytes.
rem  *
     call SimoNOTE "StepInfo Create an ASCII/Text File"
     if exist %CPLS80D1% del %CPLS80D1%
rem  * ..1....:....2....:....3....:....4....:....5....:....6....:....7.
echo Record 001, Text String 001...>%CPLS80D1%
echo Record 002, Text String 002...>>%CPLS80D1%
echo Record 003, Text String 003...>>%CPLS80D1%
     if exist %CPLS80D1% call SimoNOTE "DataMake %CPLS80D1%"
     if not exist %CPLS80D1% set JobStatus=9001
     if not %JobStatus% == 0000 goto :EojNok
rem  *
rem  * *******************************************************************
rem  * Step   2 of 6  Create and populate a new ASCII/TEXT file...
rem  * This step will create a sequential file with three records. The
rem  * length of the records is 80 bytes.
rem  * This file contains the same records as the file created in the
rem  * preceding job step.
rem  *
     call SimoNOTE "StepInfo Create an ASCII/Text File"
     if exist %CPLS80D2% del %CPLS80D2%
rem  * ..1....:....2....:....3....:....4....:....5....:....6....:....7.
echo Record 001, Text String 001...>%CPLS80D2%
echo Record 002, Text String 002...>>%CPLS80D2%
echo Record 003, Text String 003...>>%CPLS80D2%
     if exist %CPLS80D2% call SimoNOTE "DataMake %CPLS80D2%"
     if not exist %CPLS80D2% set JobStatus=9001
     if not %JobStatus% == 0000 goto :EojNok
rem  *
rem  * *******************************************************************
rem  * Step   3 of 6  Create and populate a new ASCII/TEXT file...
rem  * This step will create a sequential file with three records. The
rem  * length of the records is 80 bytes.
rem  * This file contains similar records as the file created in the
rem  * preceding job step. However, the content of the second record
rem  * contains additional text.
rem  *
     call SimoNOTE "StepInfo Create an ASCII/Text File"
     if exist %CPLS80D3% del %CPLS80D3%
rem  * ..1....:....2....:....3....:....4....:....5....:....6....:....7.
echo Record 001, Text String 001...>%CPLS80D3%
echo Record 002, Text String 002... Catch me...>>%CPLS80D3%
echo Record 003, Text String 003...>>%CPLS80D3%
     if exist %CPLS80D3% call SimoNOTE "DataMake %CPLS80D3%"
     if not exist %CPLS80D3% set JobStatus=9001
     if not %JobStatus% == 0000 goto :EojNok
rem  *
rem  * *******************************************************************
rem  * Step   4 of 6  Convert ASCII/TEXT file to ASCII RSEQ File...
rem  *
     call SimoNOTE "StepInfo Convert Line Sequential to Record Sequential"
     set GETLS080=%CPLS80D1%
     set PUTRS080=%BaseLib1%\DATA\APPL\SIMOTIME.TEST.RS80TT01.DAT
     if exist %PUTRS080% del %PUTRS080%
     run CV80ALAR
     if not ERRORLEVEL = 0 set JobStatus=0030
     if not %JobStatus% == 0000 goto :EojNok
     call SimoNOTE "DataTake %GETLS080%"
     call SimoNOTE "DataMake %PUTRS080%"
rem  *
rem  * *******************************************************************
rem  * Step   5 of 6  Convert ASCII/TEXT file to ASCII RSEQ File...
rem  *
     call SimoNOTE "StepInfo Convert Line Sequential to Record Sequential"
     set GETLS080=%CPLS80D2%
     set PUTRS080=%BaseLib1%\DATA\APPL\SIMOTIME.TEST.RS80TT02.DAT
     if exist %PUTRS080% del %PUTRS080%
     run CV80ALAR
     if not ERRORLEVEL = 0 set JobStatus=0030
     if not %JobStatus% == 0000 goto :EojNok
     call SimoNOTE "DataTake %GETLS080%"
     call SimoNOTE "DataMake %PUTRS080%"
rem  *
rem  * *******************************************************************
rem  * Step   4 of 6  Convert ASCII/TEXT file to ASCII RSEQ File...
rem  *
     call SimoNOTE "StepInfo Convert Line Sequential to Record Sequential"
     set GETLS080=%CPLS80D3%
     set PUTRS080=%BaseLib1%\DATA\APPL\SIMOTIME.TEST.RS80TT03.DAT
     if exist %PUTRS080% del %PUTRS080%
     run CV80ALAR
     if not ERRORLEVEL = 0 set JobStatus=0030
     if not %JobStatus% == 0000 goto :EojNok
     call SimoNOTE "DataTake %GETLS080%"
     call SimoNOTE "DataMake %PUTRS080%"
rem  *
:EojAok
     call SimoNOTE "Finished CmdName %CmdName%, Job Status is %JobStatus% "
     goto :End
:EojNok
     call SimoNOTE "NOTE ABENDING CmdName %CmdName%, Job Status is %JobStatus% "
:End
     if not "%1" == "nopause" pause

Table of Contents Previous Section Next Section Summary

This suite of programs is provided as a COBOL programming example of one of the possible solutions to the problem of comparing data files. This example uses an approach of generating the COBOL Source Code for a program that will compare two data files. 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 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 How to Generate a Data File Convert 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 the actual data file conversion. The User Guide contains a list of the PCF statements that are used for the data file convert 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 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 connect.

This suite of programs and documentation is available to download for review and evaluation purposes. Other uses will require a SimoTime Software License. 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 Contact 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
Compare Two VSAM Data Sets, a Positional Compare within a the Records
Copyright © 1987-2024
SimoTime Technologies and Services
All Rights Reserved
When technology complements business
http://www.simotime.com