Validate Summary Totals
Compare SYSOUT Files
  Table of Contents  v-16.01.01 - cptots01.htm 
  Introduction
  Execute
  Execute, Display a Flowchart
  Execute the Compare Job
  Prepare
  Prepare Programs for File Compare
  The Process Control File
  Generate the Programs
  Compile the Programs
  Technical Details
  Define Record Positions for Compare
  Record Structure for Test File
  COBOL Copy File for Test File
  HTML Document for Test File
  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 SimoTime Technologies have the capability to read a data file or VSAM Data Set and accumulate summary totals for the user-defined, numeric fields within a record. Once the summary totals are accumulated they are written to a user-defined output device that may be a file or a SYSOUT device.

The execution of this suite of programs is the 3rd task within a group of three (3) tasks.

Link to Internet   Link to Server   Explore how to Create Test Data Files. For this suite of jobs and programs the file format will be record sequential and the record format will be a fixed-length of 80-byte records containing text strings and packed-decimal numeric fields.

Link to Internet   Link to Server   Explore how to Calculate a Record Count and Accumulate Summary Totals by reading a Record Sequential Data File. Each record contains numeric fields with a packed-decimal (COMP-3) format. The count and totals will be posted to the SYSOUT device.

Link to Internet   Link to Server   Explore how to Validate the Content of Two Data Files by doing a record-by-record compare of two sequential files with 121-byte records. The COBOL source code for the program was generated using SimoTime technologies. This suite of programs was originally inteneded to compare two SYSOUT files since a SYSOUT device is typically configured as a record sequential file with 121-byte records.

The "Execute" section of this document will describe and demonstrate how to run a job that will compare two line sequential files that contain summary totals. The "Prepare" section of this document will describe and demonstrate how to generate the programs that will do the data file compare.


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-2019
SimoTime Technologies and Services
All Rights Reserved

Table of Contents Previous Section Next Section Execute

This section describes a job that will compare two data files using a record-by-record comparison process. Both the files are record sequential files with a fixed recor4d length of 121-bytes. The records contain text strings and numeric fields that use a packed-decimal format.

The test files are created to cause a "not-equal" condition to occur. This is done to assist the user in becoming familiar with the information that is produced when a "not-equal" condition is encountered.

Table of Contents Previous Section Next Section Execute, Display a Flowchart

The following shows the logic and data flow for the job that compares two data files.

             
CPTOTSW1
cmd
Start the Compare Process
   
   
 
 
 
 
   
   
   
SYSUT1
see Note-1
   
   
VLS121C3
cbl
 
 
SYSOUT
see Note-4
Get User-defined Compare positions,
Read files using Matching Record Logic
   
   
   
   
SYSUT2
see Note-2
   
   
End-of-File
 
 
Yes
 
 
EOJ
if End-of-File go to End-of-Job
   
   
   
   
SYSUT3
see Note-3
   
   
No
   
   
 
 
 
 
   
   
 
Note-1: SYSUT1 identifies an ASCII/Text or Line Sequential (LSEQ) file containing summary totals and record counts.
Note-2: SYSUT2 identifies an ASCII/Text or Line Sequential (LSEQ) file containing summary totals and record counts.
Note-3: Defines the positions within a record to be compared.
Note-4: SYSOUT is configured to be an ASCII/Text file with a maximum record length of 121 bytes.
Compare SYSOUT Files configured as Line Sequential with 121 byte records

Table of Contents Previous Section Next Section Execute the Compare Job

The following Windows Command File (CPTOTSW1.cmd) will set the environment and execute the program that compares the two data files.

@echo OFF
rem  * *******************************************************************
rem  *               CPTOTSW1.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 line sequential files
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * This set of programs will run on a Windows System with Micro Focus
rem  * Enterprise Developer.
rem  *
rem  *                     ************
rem  *                     * CPTOTSW1 *
rem  *                     ********cmd*
rem  *                          *
rem  *                          *
rem  *    ************     ************     ************
rem  *    *  SYSUT1  *-----* VLS121C3 *-----*  SYSOUT  *
rem  *    *******lseq*  *  ********cbl*     ************
rem  *                  *       *
rem  *    ************  *       *
rem  *    *  SYSUT2  *--*       *
rem  *    *******lseq*  *       *
rem  *                  *       *
rem  *    ************  *       *
rem  *    *  SYSUT3  *--*       *
rem  *    *******lseq*          *
rem  *                          *
rem  *                     ************
rem  *                     *   EOJ    *
rem  *                     ************
rem  *
rem  * Note: SYSUT3 is used to specifiy the positions within a record
rem  *       to be compared.
rem  *
rem  * *******************************************************************
rem  * Step 1 of 2, Prepare the environment...
rem  *
     set CmdName=CPTOTSW1
     call ..\Env1BASE %CmdName%
     set JobStatus=0000
rem  *
     call SimoNOTE "*******************************************************%CmdName%"
     call SimoNOTE "Starting CmdName %CmdName%"
     call SimoNOTE "StepInfo Prepare the File Name Mapping"
     set SYSUT1=%BaseLib1%\LOGS\SYSOUT_PKTOTSW1.txt
     set SYSUT2=%BaseLib1%\LOGS\SYSOUT_PKTOTSW2.txt
     set SYSUT3=%BaseLib1%\PARMLIB\CPTOTST1.CTL
     set SYSOUT=%BaseLib1%\LOGS\SYSOUT_%CMDNAME%
     if exist %SYSOUT% erase %SYSOUT%
rem  *
rem  * *******************************************************************
rem  * Step 2 of 2, Compare the two files...
rem  *
:ExecuteCompareRoutine
     call SimoNOTE "StepInfo Execute the Compare Program"
     run VLS121C3
     set ERRORLEVELTWO=%ERRORLEVEL%
     if not "%ERRORLEVELTWO%" == "0" set JobStatus=0010
     if "%ERRORLEVELTWO%" == "4" set JobStatus=0004
     if not %JobStatus% == 0000 goto :EojNok
     call SimoNOTE "Compare-One is %SYSUT1%"
     call SimoNOTE "Compare-Two is %SYSUT2%"
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
rem  * Convert VREC to LSEQ and display using NotePad...
     if "SIMOGENS" == "BATCH" goto End2
     if %JobStatus% == 0004 start NOTEPAD %SYSOUT%
     if "%ERRORLEVELTWO%" == "4" set JobStatus=0004
     pause
:End2
     exit /b

Table of Contents Previous Section Next Section Prepare

Before the jobs can be executed some preparation work will be required. The compare program needs to be generated. Test data will need to be created. The environment will need to be configured. The program will need to be compiled and the executable member will need to be promoted to the load library.

Table of Contents Previous Section Next Section Prepare Programs for File Compare

This section will describe the Process Control File and how it is used to generate and compile the programs that will do a compare of two data files on a record-by-record basis.

Table of Contents Previous Section Next Section The Process Control File

The following member is the Process Control File (CPTOTSV1.pcf) that is used to generate the data file compare program.

***********************************************************************
*                CPTOTSV1.pcf - a Process Control File                *
*    This is an example of the compare specifications to generate a   *
*        Data File Comparison Program. This is used by SimoZAPS       *
*                       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
&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    Compare two LSEQ/121 Files
&progid    CPTOTSV1
&SYSUT1    name=SYSUT1 org=ASCII/Text recfm=variable rmin=121 rmax=121
&SYSUT2    name=SYSUT2 org=ASCII/Text recfm=variable rmin=121 rmax=121
*
* The following group of statements will define the behavioral
* characteristics and environment variables for the compare functions
* within the Program to be generated.
*
&COMPARE   SYSUT1 pos 0001 len 121  SYSUT2 pos  1 len 121
*
* The following statements determine when to stop the compare process
* and what to do when a not-equal condition occurs.
*
&IFNECODE  4
&DELTAMAX  250 EOF
&DFORMAT   ASC HEX EBC
&DISPLAY   SYSOUT
&SYSLOG    DISABLED
*
&END

Table of Contents Previous Section Next Section Generate the Programs

The SimoTime Technologies are used to generate the COBOL programs that will actually do the data file compare process.

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 Compile the Programs

For the Micro Focus environment the programs are compiled using the following compiler directives.

DIALECT"MF"
CHARSET"ASCII"
ASSIGN"EXTERNAL"
RTNCODE-SIZE"2"
ANIM
NOQUERY
NOOPTIONAL-FILE
outdd"SYSOUT 121 L"
SHARE-OUTDD
DATAMAP
settings
list()
noform

The following links will provide additional information about the Micro Focus compiler directives.

Link to Internet   Link to Server   Explore the Compiler Directives available for the Micro Focus COBOL technologies.

Table of Contents Previous Section Next Section Technical Details

This section provides additional details about the programs and control files that are used in this suite of programs.

Table of Contents Previous Section Next Section Define Record Positions for Compare

The following member (CPTOTST1.ctl) contains the control statements that define the positions within the record to be compared.

/COMPARE SYSUT1 pos 1 len 121 SYSUT2 pos 1 len 121

Table of Contents Previous Section Next Section Record Structure for Test File

The file format for the test file is record sequential with a fixed record length of eighty (80) bytes. The record content has one text string and three (3) numeric fields that are defined as packed-decimal (or COMP-3) format.

Table of Contents Previous Section Next Section COBOL Copy File for Test File

The following source member (PKTOTSB1.cpy) is the COBOL Copy File that defines the record structure for the test file.

      *****************************************************************
      *               PKTOTSB1.CPY - a COBOL Copy File                *
      *         A Record Structure Containing Numeric Fields          *
      *       Used for Calculating and Testing CheckSum Totals        *
      *         Copyright (C) 1987-2019 SimoTime Technologies         *
      *                     All Rights Reserved                       *
      *              Provided by SimoTime Technologies                *
      *        Our e-mail address is: helpdesk@simotime.com           *
      *     Also, visit our Web Site at http://www.simotime.com       *
      *****************************************************************
      *
       01  PKTOTSD1-RECORD.                                             01-80
           05  PKTOTS01-ALPHA-01 PIC X(32).                             01-32
           05  FILLER            PIC X.                                 33-33
           05  PKTOTS01-VALUE-01 PIC 9(10)V99  COMP-3.                  34-40
           05  FILLER            PIC X.                                 41-41
           05  PKTOTS01-VALUE-02 PIC 9(8)V999  COMP-3.                  42-47
           05  FILLER            PIC X.                                 48-48
           05  PKTOTS01-VALUE-03 PIC S9(5)     COMP-3.                  49-51
           05  FILLER            PIC X.                                 52-52
           05  FILLER            PIC X(28).                             53-80
      *
      ***  PKTOTSB1 - End-of-Copy File - - - - - - - - - - - PKTOTSB1 *
      *****************************************************************
      *

Table of Contents Previous Section Next Section HTML Document for Test File

The SimoTime Technologies have the ability to scan a COBOL copy file and create an HTML document of a record structure or record layout. The HTML documentation provides information that is not easy to obtain by viewing the COBOL copy file. For example, the physical position of a field within a record as calculated during the copy file scan and placed in the HTML document.

Link to Internet   Link to Server   Explore an HTML document that describes the Record Structure of the Test File used by the job that accumulates Summary Totals and calculates a record count. The numeric fields are packed-decimal (or COMP-3) format. The record structure and generated HTML document for this file are based on a User-Supplied COBOL copyfile.

Table of Contents Previous Section Next Section Summary

The purpose of this document is to assist as a tutorial for new programmers or as a quick reference for experienced programmers that are interested in improving their testing process by leveraging additional functionality and data validation techniques.

In the world of programming there are many ways to solve a problem. This document and the links to other documents are intended to provide a greater awareness of the Data Management and Application Processing alternatives.

The 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 send an e-mail to: helpdesk@simotime.com or call 415 883-6565. We appreciate hearing from you.

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 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 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 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 copyrighted and maintained by SimoTime Technologies.

If you have any questions, suggestions, comments or feedback please call at 1 415 827-7045 or send an e-mail to: helpdesk@simotime.com.

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
Summary Totals Validation, Compare SYSOUT Files
Copyright © 1987-2019
SimoTime Technologies and Services
All Rights Reserved
When technology complements business
http://www.simotime.com