Convert, Review and Compare
Run Book for Text Strings and Numeric Values
  Table of Contents  v-23.01.01 - tcnbrsrb.htm 
  Introduction
  Requirements
  Objectives
  Create or Acquire Test Data
  Execute Full Test Case
  Execute Test Segments
  Data Convert Segments
  Convert EBCDIC to ASCII
  Review EBCDIC Input
  Review ASCII Output
  Convert ASCII to EBCDIC
  Convert RSEQ to LCSV
  Review LSEQ/CSV with Text Editor
  Data File Compare
  Physical Compare
  Review EQ Results of Physical Compare
  Review NE Results of Physical Compare
  Logical Compare
  Review EQ Results of Logical Compare
  Review NE Results of Logical Compare
  Numeric Integrity
  Accumulate Summary Totals
  Review SYSOUT for Summary Totals
  Validate Numeric Content
  Review SYSOUT for Numeric Content
  Review Field Dump of Corrupt Number
  Additional Functions
  Export or Extract by Field Name
  Numeric Check
  Human Observation of Data
  Execute Unit Test Scripts
  Record Structure and Field Format
  RSEQ/FFL to LSEQ/CSV
  CMD Job Script, RSEQ/FFL to LSEQ/CSV
  Review LSEQ/CSV with Text Editor
  Validate Data & Review Results
  Field Dump of Record Content
  SYSOUT for Field Dump
  CMD Job Script for Field Dump
  Ancillary Task
  LSEQ/CSV to RSEQ/FFL
  CMD Job Script, LSEQ/CSV to RSEQ/FFL
  File Compare
  CMD Job Script for File Compare
  Technical Details
  COBOL Copy Files
  Copy File for Binary, Packed or Zoned
  Copy File for Sign, Leading, Separate
  Summary
  Software Agreement and Disclaimer
  Downloads and Links
  Current Server or Internet Access
  Internet Access Required
  Glossary of Terms
  Contact, Comments or Feedback
  Company Overview
The SimoTime Home Page 

Table of Contents Previous Section Next Section Introduction

This test case will focus on the SimoTime Technologies and Processing Techniques that assist in the management of data in a multi-system network that shares or transfers data between a variety of indivudual systems that may include IBM Mainframe Systems, Windows Systems or Linux Systems.

In many cases a user request to convert data between EBCDIC and ASCII will expand into a request to convert a file format (typically a record sequential file) and its record content from a mainframe-oriented, EBCDIC-encoded record structure to a file format and ASCII-encoded, record structure that may be easily imported and accessed from within a relational data base or a spread sheet using Excel or LibreOffice Calc. This expanded request will involve more than a simple conversion between the EBCDIC and ASCII encoding schemas.

This is the Run Book for the TCNBRS01 Test Case. This test case will describe and demonstrate the process of converting an EBCDIC-encoded, Record Sequential file to an ASCII/Text file. The convert process includes file format, record content and field format conversion. The tasks within this conversion process are executed as separate steps to allow a user to review the results. The steps may be consolidated into a single job.

The following provides an overview of the numeric data structures commonly used on an IBM Mainframe System and supported by the COBOL programming Language.

1. The Input file for this test case is a Record Sequential (RSEQ) File.
1.1. Each record contains Text strings that may be ASCII or EBCDIC-encoded.
1.2. Each record contains Numeric values that may be stored in a Binary (COMP), Packed-Decimal (COMP-3) or Zoned-Decimal format.
1.2.1. A numeric structure using a Binary (or COMP) format
1.2.2. A numeric structure using a Packed-Decimal (COMP-3) format
1.2.3. A numeric structure using a Zoned-Decimal format
1.3. The record structure is a Fixed-Field-Length (FFL) format. The record size is a fixed length of 512 bytes.
1.3.1. The record structure is defined within a COBOL Copy File.
1.4. The programs used in this test case for the convert, compare and review functions are generated COBOL programs.
1.4.1. The program generation process is described in the System Preparation Guide.

 

Hyperlink Navigation: The hyperlinks in the text strings of the preceding overview will access the SimoTime Web Site server and requires an internet connection. If the outline level numer is highlighted the hyperlink will access the Current Browser Site.

The COBOL conversion programs used within this test case are generated using SimoTime Technologies. The generation process to create the programs will require a Windows or Linux System with a COBOL compiler and the SimoTime Library.

The generated COBOL programs may be compiled and executed on other systems that have a COBOL Compiler that is compatible with ANSI 2002 or later. Depending on the options used at program generation time a copy of the SimoTime Library may be required.

The remaining sections in this Run Book will describe how to use Job Scripts the will map physical file names to program file names and execute the generated programs.

Explore the SIMOTIME Web Site for additional information about the technologies and services that are available.


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

Table of Contents Previous Section Next Section Requirements

This Test Case or the individual Unit Test modules will run on the following platforms.

1. Executes on Windows/7, Windows/10 and/or Windows Server using Micro Focus Technologies.
2. May be ported to run on a Linux platform supported by Micro Focus COBOL or GnuCOBOL.
3. The generated COBOL Member may be transferred, compiled and executed on an IBM Mainframe System with ZOS or a Windows System using Micro Focus Enterprise Developer.

 

Table of Contents Previous Section Next Section Objectives

This Test Case or the individual Unit Test modules will perform the following functions.

1. Provide a process to create test data
2. Provide individual Unit Test Members to convert files between file formats, record structures and record content
3. Provide individual Unit Test Members to observe file content
4. Provide individual Unit Test Members to validate numeric integrity for numeric values that are stored in a Binary, Packed-Decimal or Zoned-Decimal format.
5. Provide individual Unit Test Members to compare the content of two data files.
6. Provide a capability to view the record content via Human Observation.
7. Provide a capability to validate numeric integrity.

 

Table of Contents Previous Section Next Section Create or Acquire Test Data

The following describes the process for creating Test Data.

1. Create or Acquire Test Data - Execute a user defined job script that will define the environment and create or acquire the test data.
1.1. Prepare locally on a server, desktop or Laptop machine, this job script will create an ASCII-encoded and an EBCDIC-encoded file by accessing an ASCII/Text File with CSV formatted records. The text-oriented numeric values from the CSV data structure will be used to create numeric values that are stored in a Binary (COMP), Packed-Decimal (COMP-3) and Zoned-Decimal format.
1.1.1. Review EBCDIC File, this job script will present each record using hexadecimal notation. This will allow the user to determine the binary structure of the data. This can be very helpful when a file contains numeric values that are stored in a Binary, Packed-Decimal or Zoned-Decimal format.
1.1.2. Review ASCII File, this job script will present each record using hexadecimal notation. This will allow the user to determine the binary structure of the data. This can be very helpful when a file contains numeric values that are stored in a Binary, Packed-Decimal or Zoned-Decimal format.
1.1.3. Review spreadsheet that contains primary test data using Excel or Libre Office Calc
1.2. Transfer from an IBM Mainframe to a local server, desktop or Laptop machine. There are many options available when moving and converting data between an IBM Mainframe System and a Windows, Linux or UNIX System.
1.2.1. This link will discuss the cycle of how to convert a VSAM, KSDS to a flat Sequential file on the mainframe, download the flat sequential file from the Mainframe System to a Windows, UNIX or Linux System and create an Indexed file of ASCII content using Micro Focus.
1.2.2. This is a link to a white paper that provides a Quick Overview of the Data File Transfer options available when transferring or sharing data between a Mainframe system and a Windows, Linux or UNIX system.
1.2.3. This is a link to a white paper that provides a quick overview of the various Micro Focus File Formats provided for the Windows, Linux and UNIX environments supported by Micro Focus
1.2.4. This document was created and is maintained by SimoTime Technologies and Services. If you have any questions, suggestions, comments or feedback please use the following contact information.
1.2.4.1. Send an e-mail to our helpdesk.
helpdesk@simotime.com
1.2.4.2. Our telephone numbers are as follows.
1 415 763-9430 office-helpdesk
1 415 827-7045 mobile

 

Table of Contents Previous Section Next Section Execute Full Test Case

This is a single batch job with multiple job steps that do calls to job scripts that do the individual unit testing.

1. Execute the Full Test Case, this job script will define the environment and call additional job scipts to perform the individual unit tests that support the file conversion and review functions.
1.1. Convert EBCDIC to ASCII, this job script will convert the EBCDIC-encoded file to ASCII-encoding and preserve the numeric integrity of the numeric values that are stored in a Binary (COMP), Packed-Decimal (COMP-3) and Zoned-Decimal format.
1.1.1. Hex dump of the record content, this job script will present each record using hexadecimal notation. This will allow the user to determine the binary structure of the data. This can be very helpful when a file contains numeric values that are stored in a Binary, Packed-Decimal or Zoned-Decimal format.
1.1.1.1. Review Record Content of record information that shows the possible EBCDIC or ASCII translation and hex dump of the record content within an ASCII-encoded file. The results may be viewed by humans using a browser or text editor of choice.
1.1.2. Hex dump of the field content, this job script will present each field within a record using hexadecimal notation. This will allow the user to determine the binary structure of the data. This can be very helpful when a file contains numeric values that are stored in a Binary, Packed-Decimal or Zoned-Decimal format.
1.1.2.1. Review Field Content of field information that shows the numeric value and hex dump of the field content of the record content within an ASCII-encoded file. The results may be viewed by humans using a browser or text editor of choice.
1.1.3. Produce Summary Totals, this job script will accumulate summary totals and calculate the number of records in the file.
1.1.3.1. Review Totals, review the information that shows a summary total for each numeric field within each record. A record count of the number of records within the ASCII-encoded file is included. The results may be viewed by humans using a browser or text editor of choice.
1.1.4. Process a Compare, this job script will access two ASCII-encoded files that contain identical record content and are expected to produce an EQUAL result.
1.1.4.1. Review EQ SYSLUSER information that will show the EQUAL results of the data file compare. The results may be viewed by humans using a browser or text editor of choice.
1.1.5. Process a Compare, this job script will access two ASCII-encoded files that contain a minor difference in record content and are expected to produce a NOT EQUAL result.
1.1.5.1. Review NE SYSLUSER information that will show the NOT Equal results of the data file compare. The results may be viewed by humans using a browser or text editor of choice.
1.2. Convert ASCII to EBCDIC, this job script will convert the ASCII-encoded file to EBCDIC-encoding and preserve the numeric integrity of the numeric values that are stored in a Binary (COMP), Packed-Decimal (COMP-3) and Zoned-Decimal format.
1.2.1. Hex dump of the record content, this job script will present each record using hexadecimal notation. This will allow the user to determine the binary structure of the data. This can be very helpful when a file contains numeric values that are stored in a Binary, Packed-Decimal or Zoned-Decimal format.
1.2.1.1. Review Record Content of record information that shows the possible ASCII or EBCDIC translation and hex dump of the record content within an EBCDIC-encoded file. The results may be viewed by humans using a browser or text editor of choice.
1.3. Extract Field Content, this job script that will do a field format convert of a file containing text data and numeric values. The generated convert program will convert the record structure from a fixed field length format to a CSV format. Numeric values stored in a Binary, Packed-Decimal or Zoned-Decimal format will be converted to a text format with a separate, leading sign character and an explicit decimal point.
1.3.1. Review CSV Record Content that shows the text fields and expanded numeric values of the record content within an ASCII-Text file. The results may be viewed by humans using a browser or text editor of choice.

 

The following sections of this document will provide additional information about the user data files, job scripts and log files that are accessed or created during the conversion process.

Table of Contents Previous Section Next Section Execute Test Segments

The following is an outline of the individual job scripts that do the unit test of the functions within the complete test case.

Table of Contents Previous Section Next Section Data Convert Segments

WIP

Table of Contents Previous Section Next Section Convert EBCDIC to ASCII

Since the Input File contains EBCDIC-encoded text strings and numeric values stored in a Zoned-Decimal and Packed Decimal format the EBCDIC to ASCII conversion will be done at the Record and Field level using two COBOL programs that are generated using SimoTime Technologies.

1. The 1st program will do the file I/O processing and call a 2nd program to do the records content conversion.
2. The 2nd program will do the record content conversion at the field level using the field definitions that are defined in a COBOL Copy File.

 

To review the job script that does EBCDIC to ASCII Conversion click on one of the following Current Browser Site or SimoTime Web Site.

Table of Contents Previous Section Next Section Review EBCDIC Input

The following two links provide examples of how the content of each record is presented using hexadecimal notation. The first link will access the current or local server. The second link will access the SimoTime Web Site.

Review an example of the EBCDIC-encoded record content that uses hexadecimal notation with a possible translation of the character set for ASCII or EBCDIC encoding. Click on one of the following Current Browser Site or SimoTime Web Site to access this information. The hexadecimal notation will allow the user to determine the binary structure of each byte within a record. This can be very helpful when a file contains numeric values that are stored in a Binary, Packed-Decimal or Zoned-Decimal format. The possible ASCII or EBCDIC translation can be helpful when doing data conversions and data sharing between systems that use different encoding schemas.

Table of Contents Previous Section Next Section Review ASCII Output

The following two links provide examples of how the content of each record is presented using hexadecimal notation. The first link will access the current or local server. The second link will access the SimoTime Web Site.

Review an example of the ASCII-encoded record content that uses hexadecimal notation with a possible translation of the character set for ASCII or EBCDIC encoding. Click on one of the following Current Browser Site or SimoTime Web Site to access this information. The hexadecimal notation will allow the user to determine the binary structure of each byte within a record. This can be very helpful when a file contains numeric values that are stored in a Binary, Packed-Decimal or Zoned-Decimal format. The possible ASCII or EBCDIC translation can be helpful when doing data conversions and data sharing between systems that use different encoding schemas.

Table of Contents Previous Section Next Section Convert ASCII to EBCDIC

Since the Input File contains ASCII-encoded text strings and numeric values stored in a Zoned-Decimal and Packed Decimal format the ASCII to EBCDIC conversion will be done at the Record and Field level using two COBOL programs that are generated using SimoTime Technologies.

1. The 1st program will do the file I/O processing and call a 2nd program to do the records content conversion.
2. The 2nd program will do the record content conversion at the field level using the field definitions that are defined in a COBOL Copy File.

 

To review the job script that does ASCII to EBCDIC Conversion click on one of the following Current Browser Site  or  SimoTime Web Site.

Table of Contents Previous Section Next Section Convert RSEQ to LCSV

Since the Input File contains ASCII-encoded text strings and numeric values stored in a Zoned-Decimal and Packed Decimal format the data conversion will be done at the Record and Field level using two COBOL programs that are generated using SimoTime Technologies.

1. The 1st program will do the file I/O processing that includes a file format conversion. A 2nd program will be called to do the record format and record content conversion.
2. The 2nd program will do the record format and record content conversion at the field level using the field definitions that are defined in a COBOL Copy File.

 

To review a job script that does RSEQ to LCSV Conversion click on one of the following Current Browser Site  or  SimoTime Web Site.

Table of Contents Previous Section Next Section Review LSEQ/CSV with Text Editor

The following shows the content of the CSV file created by the preceding job script. The first record in the file contains the names of the field as defined in a COBOL Copy File. Inserting this record in the file is an optional feature of the SimoTime Technologies that generate the conversion programs. Identifying the field names can be quite helpful when accessing the CSV file using Excel or LibreOffice CALC.

TCNTXT01-STATUS,TCNTXT01-ZDS-09-00,TCNTXT01-PKS-00-10,TCNTXT01-PKS-00-07,TCNTXT01-PKS-01-07,TCNTXT01-PKS-07-02,TCNTXT01-BNS-00-10,TCNTXT01-BNS-00-07,TCNTXT01-BNS-01-07,TCNTXT01-BNS-07-02,
A,+987654321,+.0123456789,+.0123456,+0.1234567,+0000024.95,+.0123456789,+.0123456,+0.0000615,+0000024.95,
A,+876543210,+.1234567890,+.1234567,+1.2345678,+0000024.95,+.0123456789,+.0123456,+0.0003338,+0000033.38,
A,+765432102,+.2345678901,+.2345678,+2.3456789,+0000024.95,+.0123456789,+.0123456,+0.0001000,+0000000.10,
 

The remaining records in the file contain the converted user data. The text data strings are ASCII-encoded and the numeric values have been expanded and converted to include a separate Leading Sign character and an explicit decimal point. Each field (or data string) in the record structure is delimited by a comma (,).

Table of Contents Previous Section Next Section Data File Compare

The SimoTime technology offers various types of comparison methodologies. The compare methodology used to do a data file compare will depend on the user requirements, record content and file structure.

Table of Contents Previous Section Next Section Physical Compare

A physical compare is the primary methodology for comparing files. This compare is performed by specified positions within each record. The bit-pattern of the specified positions within each record within the range of positions must match to produce an equal result. This section provides additional technical details about the modules that are included in this test case.

To review the job script that does a Physical File Compare click on one of the following Current Browser Site  or  SimoTime Web Site.

Table of Contents Previous Section Next Section Review EQ Results of Physical Compare

The following is the SYSLUSER information that is available for review after executing the TCNCP1W1 Job Script.

Review the output of a Physical File Compare that produces an Equal Result. Click on one of the following Current Browser Site  or  SimoTime Web Site to access this information.

WIP

Table of Contents Previous Section Next Section Review NE Results of Physical Compare

The following is the SYSLUSER information that is available for review after executing the TCNCP1W9 Job Script.

Review the output of a Physical File Compare that produces a NOT Equal Result. Click on one of the following Current Browser Site  or  SimoTime Web Site to access this information.

WIP

Table of Contents Previous Section Next Section Logical Compare

This section provides additional technical details about the modules that are included in this Logical Compare process. This will perform a special type of data file compare that is referred to as a reasonability check. The program will compare the content of an ASCII-encoded file with the content of an EBCDIC-encoded file. The ASCII-encoded file must be defined by SYSUT1. The EBCDIC-encoded file must be defined by SYSUT2.

The Logical Compare process will do a left to right scan of each record and do a physical compare of each byte based on it binary content. If the content of the bytes are the same then it is accepted as equal and the processing logic advances to the next byte. If the bytes are not equal then a second compare is performed based on the ASCII and EBCDIC character set.

To review the job script that does a Logical File Compare click on one of the following Current Browser Site  or  SimoTime Web Site.

Table of Contents Previous Section Next Section Review EQ Results of Logical Compare

The following is the SYSLUSER information that is available for review after executing the TCNCP1W1 Job Script.

Review the output of a Logical File Compare that produces an Equal Result. Click on one of the following Current Browser Site  or  SimoTime Web Site to access this information.

WIP

Table of Contents Previous Section Next Section Review NE Results of Logical Compare

The following is the SYSLUSER information that is available for review after executing the TCNCP1W9 Job Script.

Review the output of a Logical File Compare that produces a NOT Equal Result. Click on one of the following Current Browser Site  or  SimoTime Web Site to access this information.

WIP

Table of Contents Previous Section Next Section Numeric Integrity

This suite of programs and documentation will describe and demonstrate an approach for reading a file, calculating record counts and producing summary totals for a set of pre-defined currency or numeric fields that are defined as Binary, Packed Decimal or Zoned Decimal. This may be used to validate Data integrity for all currency or numeric fields but is especially useful for currency amounts.

Table of Contents Previous Section Next Section Accumulate Summary Totals

This section provides additional technical details about the modules that are included in this test case.

To review the job script that will Accumulate Summary Totals click on one of the following Current Browser Site  or  SimoTime Web Site.

Table of Contents Previous Section Next Section Review SYSOUT for Summary Totals

The following is the SYSOUT information that is available for review after executing the TCNTOTW2 Job Script.

* TCNTOTC1 Accumulate Summary Totals for RSEQ v22.01.01   helpdesk@simotime.com
* TCNTOTC1 A Program to Calculate Totals was generated by SimoTime Technologies
* TCNTOTC1 * HEX20  parameter is HEX20_TAG
* TCNTOTC1 * HEX40  parameter is HEX40_TAG
* TCNTOTC1 * HEXTR  parameter is ENABLE
* TCNTOTC1 * NUMCHK parameter is NUMCHK_TAG
* VARIANCE (000000002/0000083:0000005) TCNBRS01-PKS-01-07, HEX=4040404040

In the preceding report the rightmost column (TYPE) uses the following notation to identify the format of the numeric type.
BNS - Binary-Signed
PKS - Packed-Decimal-Signed
ZDS - Zoned-Decimal-Signed
BNU - Binary-Unsigned
PKU - Packed-Decimal-Unsigned
ZDU - Zoned-Decimal-Unsigned

Note: A numeric value that is defined as "Unsigned" is treated as an implied positive value.

Table of Contents Previous Section Next Section Validate Numeric Content

This section provides additional technical details about the modules that are included in this test case.

To review the job script that will validate the Content of Numeric Data Strings click on one of the following Current Browser Site  or  SimoTime Web Site.

Table of Contents Previous Section Next Section Review SYSOUT for Numeric Content

The following is the SYSOUT information that is available for review after executing the TCNTOTW9 Job Script.

* TCNTOTC1 Accumulate Summary Totals for RSEQ v22.01.01   helpdesk@simotime.com
* TCNTOTC1 A Program to Calculate Totals was generated by SimoTime Technologies
* TCNTOTC1 * HEX20  parameter is HEX20_TAG
* TCNTOTC1 * HEX40  parameter is HEX40_TAG
* TCNTOTC1 * HEXTR  parameter is ENABLE
* TCNTOTC1 * NUMCHK parameter is NUMCHK_TAG
* VARIANCE (000000002/0000083:0000005) TCNBRS01-PKS-01-07, HEX=4040404040

In the preceding report the rightmost column (TYPE) uses the following notation to identify the format of the numeric type.
BNS - Binary-Signed
PKS - Packed-Decimal-Signed
ZDS - Zoned-Decimal-Signed
BNU - Binary-Unsigned
PKU - Packed-Decimal-Unsigned
ZDU - Zoned-Decimal-Unsigned

Note: A numeric value that is defined as "Unsigned" is treated as an implied positive value.

Table of Contents Previous Section Next Section Review Field Dump of Corrupt Number

This job will do a field level dump of the records in a sequential file that contain Text strings and numeric values stored in a Zoned-Decimal, Packed-Decimal and Binary format. This dump format may be very useful in validating the content of each field, the positioning within a record and the alignment of digits within the field.

The following is the SYSOUT information that is available for review after executing the TCNPEKW9 Job Script.

Review the output of a Field Dump of Record Content containing Corrupt Numeric Values. Click on one of the following Current Browser Site  or  SimoTime Web Site to access this information.

WIP

Table of Contents Previous Section Next Section Additional Functions

WIP

Table of Contents Previous Section Next Section Export or Extract by Field Name

WIP

Table of Contents Previous Section Next Section Numeric Check

WIP

Table of Contents Previous Section Next Section Human Observation of Data

WIP

Table of Contents Previous Section Next Section Execute Unit Test Scripts

The following is an outline of the individual job scripts that do the unit test of the functions within the complete test case.

Table of Contents Previous Section Next Section Record Structure and Field Format

Converting between a fixed-length record structure containing concatenated, fixed-length fields and a variable-length record structure (with record delimiters) containing concatenated, variable-length fields (with field delimiters) requires special processing at the field level.

1. Extract (or Export) Functions by Field within Record
1.1. Convert the File Format
1.1.1. Read a Record Sequential File
1.1.2. Create a New Line Sequential (or ASCII/Text) File
1.2. Modify the Record Structure
1.2.1. Input is a Fixed-Field-Length (FFL) format
1.2.2. Output is a Comma-Separated-Values (CSV) format
1.3. Field Level Conversion
1.3.1. Copy Text Data Strings
1.3.2. Expand Numeric values using explicit sign and decimal
1.4. Optional Feature
1.4.1. Insert a Header Record
1.4.2. Use Field Names defined in a COBOL Copy File
2. Import (or Create) Functions by Field within Record
2.1. Convert the File Format
2.1.1. Read a Line Sequential File
2.1.2. Create a New Record Sequential File
2.2. Modify the Record Structure
2.2.1. Input is a Comma-Separated-Values (CSV) format
2.2.2. Output is a Fixed-Field-Length (FFL) format
2.3. Field Level Conversion
2.3.1. Replicate Text Data Strings (Left Justified with trailing pad characters).
2.3.2. Format Numeric values based on field definitions from a COBOL Copy File.
2.4. Optional Feature
2.4.1. Drop a Header Record
2.4.2. Uses Field Names defined in a COBOL Copy File
3. Compare
3.1. Read the following two files using matching record logic
3.1.1. Record Sequential File accessed as Input for the Export Function
3.1.2. Record Sequential File created as Output from the Import Function
3.2. Review the Results

 

Table of Contents Previous Section Next Section RSEQ/FFL to LSEQ/CSV

Since the Input File contains ASCII-encoded text strings and numeric values stored in a Signed-Zoned-Decimal and Packed Decimal format the text string conversion and expansion of numeric values will be done at the Record and Field level using two COBOL programs that are generated using SimoTime Technologies.

The 1st program will do the file I/O processing and call a 2nd program to do the records content and field format conversion.

The 2nd program will do the record content conversion at the field level conversion using the field definitions that are defined in a COBOL Copy File.

Table of Contents Previous Section Next Section CMD Job Script, RSEQ/FFL to LSEQ/CSV

The  TCNEXTW5.cmd  is the job script that will do a field format convert of a file containing text data and numeric values. The generated convert program will convert the record structure from a fixed field length format to a CSV format. Numeric values stored in a Signed-Zoned-Decimal or Packed-Decimal format will be converted to a text format with a separate, leading sign character and an explicit decimal point.

@echo OFF
     set JOB_NAME=TCNEXTW5
rem  * *******************************************************************
rem  *        This Job Script is provided by SimoTime Technologies       *
rem  *           (C) Copyright 1987-2020 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  *
rem  * Text   - Read RSEQ containing Packed-Decimal, Make LSEQ_CSV.
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * The job will execute a program that will read an ASCII encoded,
rem  * Record Sequential file that contains various numeric values stored
rem  * in a zoned-decimal or packed-decimal format.
rem  * Next, the program will write to a new ASCII encoded, Line Sequential
rem  * {LSEQ) file that contains Comma-Separated-Values (CSV)
rem  * Record structure.
rem  *
rem  *    ************
rem  *    * TCNEXTW5 *
rem  *    ********cmd*
rem  *         *
rem  *         *
rem  *    ************
rem  *    * ENV1BASE *
rem  *    ********cmd*
rem  *         *
rem  *         *
rem  *    ************
rem  *    * SIMONOTE *
rem  *    ********cmd*
rem  *         *
rem  *         *
rem  *    ************
rem  *    *   RUN    *---------------------------*
rem  *    ********rts*                           *
rem  *         *           ************     ************     ************
rem  *         *           *  SYSUT1  *--*--* TCNEXTC5 *--*--*  SYSUT2  *
rem  *         *           *  Note-1  *  *  ********cbl*  *  *  Note-2  *
rem  *         *           *******rseq*  *                *  *******lseq*
rem  *         *                         *                *
rem  *         *           ************  *                *  ************
rem  *         *           *  CSVHDR  *--*                *--*  SYSOUT  *
rem  *         *           *  Note-3  *                      *  Note-4  *
rem  *         *           *******lseq*                      *******lseq*
rem  *    ************
rem  *    *   EOJ    *
rem  *    ************
rem  *
rem  *    Note-1: SYSUT1 is an ASCII-encoded, record sequential (RSEQ)
rem  *            file. The record content imcludes numeric values that
rem  *            are stored in a Packed-Decimal format.
rem  *
rem  *    Note-2: SYSUT2 is an ASCII-encoded,Line Sequential (LSEQ) file.
rem  *            Also, referred to as an ASCII/Text File.
rem  *            The record format is Comma-Separated-values (CSV).
rem  *
rem  *    Note-3: This file contains a list of field names that are
rem  *            extracted and re-formatted. The field names are obtained
rem  *            from a COPOL Copy File.
rem  *            This file is used to insert header information as the
rem  *            first record of the SYSUT2 file.
rem  *            Note: This is optional optional feature.
rem  *
rem  *    Note-4: SYSOUT is an ASCII-encoded, line sequential (LSEQ)
rem  *            file.
rem  *
rem  * *******************************************************************
rem  * Step 1, Set Environment Variables
rem  *         Delete any previously created ASCII-encoded file...
rem  *
     call ..\ENV1BASE
rem  *
     call SIMONOTE "*******************************************************************************%JOB_NAME%"
     call SIMONOTE "* Starting JobName %JOB_NAME%, User is %USERNAME%"
     call SIMONOTE "* Job_Step 01 of 03, Preparing the System and Job Environments"
     set JobStatus=0
     set PGMFLAGS=NNNNNNNN/NNNNYNNN
     set SYSOUT=%BaseLib1%\LOGS\SYSOUT_%JOB_NAME%.txt
     set SYSUT1=%BaseLib1%\DATA\ASC1\TCNTXTD1.DAT
     set SYSUT2=%BaseLib1%\DATA\CSV1\TCNTXTT1.csv
     set CSVHDR=%BaseLib1%\DATA\GENS\TCNTXTB1_EXTRACT.txt
     if exist %SYSUT2% del %SYSUT2%
rem  *
     call SIMONOTE "* --------------------------------------------------------------------------- *"
     call SIMONOTE "* Job_Step 02 of 03, Execute RSEQ_FFL to LSEQ_CSV Conversion"
     call SIMONOTE "* DataTake SYSUT1=%SYSUT1% "
     call SIMONOTE "* DataMake SYSUT2=%SYSUT2% "
     run TCNEXTC5
     if not "%ERRORLEVEL%" == "0" set JobStatus=10
     if not "%JobStatus%" == "0" goto EOJTAG
     if exist %SYSUT2% goto EOJTAG
     set JobStatus=20
rem  *
:EOJTAG
     call SIMONOTE "* --------------------------------------------------------------------------- *"
     call SIMONOTE "* Job_Step 03 of 03, End of Job Processing"
     if not "%JobStatus%" == "0" goto EojNOK
:EojAOK
     call SIMONOTE "* Produced  %SYSUT2% "
     call SIMONOTE "* Finished JOB_NAME %JOB_NAME%, Job Status is %JobStatus% "
     goto :End
:EojNOK
     call SIMONOTE "* ABENDING JOB_NAME %JOB_NAME%, Job Status is %JobStatus% "
     goto :End
:End
     call SIMONOTE "* Conclude SYSOUT is %SYSOUT% "
     if not "%1" == "nopause" pause
     exit /B %JobStatus%

Table of Contents Previous Section Next Section Review LSEQ/CSV with Text Editor

The following shows the content of the CSV file created by the preceding job script. The first record in the file contains the names of the field as defined in a COBOL Copy File. Inserting this record in the file is an optional feature of the SimoTime Technologies that generate the conversion programs. Identifying the field names can be quite helpful when accessing the CSV file using Excel or LibreOffice CALC.

TCNTXT01-STATUS,TCNTXT01-ZDS-09-00,TCNTXT01-PKS-00-10,TCNTXT01-PKS-00-07,TCNTXT01-PKS-01-07,TCNTXT01-PKS-07-02,TCNTXT01-BNS-00-10,TCNTXT01-BNS-00-07,TCNTXT01-BNS-01-07,TCNTXT01-BNS-07-02,
A,+987654321,+.0123456789,+.0123456,+0.1234567,+0000024.95,+.0123456789,+.0123456,+0.0000615,+0000024.95,
A,+876543210,+.1234567890,+.1234567,+1.2345678,+0000024.95,+.0123456789,+.0123456,+0.0003338,+0000033.38,
A,+765432102,+.2345678901,+.2345678,+2.3456789,+0000024.95,+.0123456789,+.0123456,+0.0001000,+0000000.10,
 

The remaining records in the file contain the converted user data. The text data strings are ASCII-encoded and the numeric values have been expanded and converted to include a separate Leading Sign character and an explicit decimal point. Each field (or data string) in the record structure is delimited by a comma (,).

Table of Contents Previous Section Next Section Validate Data & Review Results

In today's environments there are a variety of data validation alternatives. This section will focus on three popular techniques.

1. Human Observation.
1.1. Hex-Dump of full record content
1.2. User display and Hex-Dump by Field Name
2. Data File Compare
2.1. Compare full record content
2.2. Compare user-defined segment within records
3. Accumulation and Review of Summary Totals
3.1. Accumulate Summary Totals by user-defined fields
3.2. Accumulate a Record Count

 

Table of Contents Previous Section Next Section Field Dump of Record Content

This job will do a field level dump of the records in a sequential file that contain Text strings and nereic values stored in a Zoned-Decimal, Packed-Decimal and Binary format. This dump format may be very useful in validating the content of each field, the positioning within a record and the alignment of digets within the field.

Table of Contents Previous Section Next Section SYSOUT for Field Dump

The following is the SYSOUT information that is available for review after executing the TCNUSRW1 Job Script.

* TCNUSRC1 User review of Records within RSEQ v20.00.00 http://www.simotime.com
* TCNUSRC1 Copyright - 1987-2020 by SimoTime Technologies - All Rights Reserved
* TCNUSRC1 Behavior Flags (PGMFLAGS) = NNNNNNNN/NNNNNNNN
* TCNUSRC1 PCF_LIBR=
* TCNUSRC1 Display Record Content by Field for User Review
* TCNUSRC1 *
* TCNUSRC1 SYSUT1 Line count..........=000000001
TCNTXT01-STATUS....................TXT=A
TCNTXT01-ZDS-09-00.................DEC=987654321+
TCNTXT01-PKS-00-10.................DEC=+0123456789
TCNTXT01-PKS-00-10.................HEX=00123456789C
TCNTXT01-PKS-00-07.................DEC=+0123456
TCNTXT01-PKS-00-07.................HEX=0123456C
TCNTXT01-PKS-01-07.................DEC=+01234567
TCNTXT01-PKS-01-07.................HEX=001234567C
TCNTXT01-PKS-07-02.................DEC=+000002495
TCNTXT01-PKS-07-02.................HEX=000002495C
TCNTXT01-BNS-00-10.................DEC=+00000000000123456789
TCNTXT01-BNS-00-10.................HEX=00000000075BCD15
TCNTXT01-BNS-00-07.................DEC=+0000123456
TCNTXT01-BNS-00-07.................HEX=0001E240
TCNTXT01-BNS-01-07.................DEC=+0000000615
TCNTXT01-BNS-01-07.................HEX=00000267
TCNTXT01-BNS-07-02.................DEC=+0000002495
TCNTXT01-BNS-07-02.................HEX=000009BF
* TCNUSRC1 *
* TCNUSRC1 SYSUT1 Line count..........=000000002
TCNTXT01-STATUS....................TXT=A
TCNTXT01-ZDS-09-00.................DEC=876543210+
TCNTXT01-PKS-00-10.................DEC=+1234567890
TCNTXT01-PKS-00-10.................HEX=01234567890C
TCNTXT01-PKS-00-07.................DEC=+1234567
TCNTXT01-PKS-00-07.................HEX=1234567C
TCNTXT01-PKS-01-07.................DEC=+12345678
TCNTXT01-PKS-01-07.................HEX=012345678C
TCNTXT01-PKS-07-02.................DEC=+000002495
TCNTXT01-PKS-07-02.................HEX=000002495C
TCNTXT01-BNS-00-10.................DEC=+00000000000123456789
TCNTXT01-BNS-00-10.................HEX=00000000075BCD15
TCNTXT01-BNS-00-07.................DEC=+0000123456
TCNTXT01-BNS-00-07.................HEX=0001E240
TCNTXT01-BNS-01-07.................DEC=+0000003338
TCNTXT01-BNS-01-07.................HEX=00000D0A
TCNTXT01-BNS-07-02.................DEC=+0000003338
TCNTXT01-BNS-07-02.................HEX=00000D0A
* TCNUSRC1 *
* TCNUSRC1 SYSUT1 Line count..........=000000003
TCNTXT01-STATUS....................TXT=A
TCNTXT01-ZDS-09-00.................DEC=765432102+
TCNTXT01-PKS-00-10.................DEC=+2345678901
TCNTXT01-PKS-00-10.................HEX=02345678901C
TCNTXT01-PKS-00-07.................DEC=+2345678
TCNTXT01-PKS-00-07.................HEX=2345678C
TCNTXT01-PKS-01-07.................DEC=+23456789
TCNTXT01-PKS-01-07.................HEX=023456789C
TCNTXT01-PKS-07-02.................DEC=+000002495
TCNTXT01-PKS-07-02.................HEX=000002495C
TCNTXT01-BNS-00-10.................DEC=+00000000000123456789
TCNTXT01-BNS-00-10.................HEX=00000000075BCD15
TCNTXT01-BNS-00-07.................DEC=+0000123456
TCNTXT01-BNS-00-07.................HEX=0001E240
TCNTXT01-BNS-01-07.................DEC=+0000001000
TCNTXT01-BNS-01-07.................HEX=000003E8
TCNTXT01-BNS-07-02.................DEC=+0000000010
TCNTXT01-BNS-07-02.................HEX=0000000A
* TCNUSRC1 SYSUT1 Line count..........=000000003
* TCNUSRC1 Complete, User review of Records within RSEQ http://www.SimoTime.com
* TCNUSRC1 Thank you for using this program provided from SimoTime Technologies
* TCNUSRC1 Please send all inquires or suggestions to the helpdesk@simotime.com

Table of Contents Previous Section Next Section CMD Job Script for Field Dump

This Windows Commamd File  TCNUSRW1.cmd  is the job script that will prepare the environment and execute the program that will display the Text Strings and Hex-Dump information for each field in a record structure.

@echo OFF
     set JOB_NAME=TCNUSRW1
rem  * *******************************************************************
rem  *        This Job Script is provided by SimoTime Technologies       *
rem  *           (C) Copyright 1987-2020 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  *
rem  * Text   - User Review of record content within a Sequential File.
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * The job will read a Record Sequential (RSEQ) File and display
rem  * the record content to the SYSOUT device.
rem  *
rem  * The input file (SYSUT1) is programmatically created as part of
rem  * an EBCDIC to ASCII convesion process.
rem  *
rem  *    ************
rem  *    * TCNUSRW1 *
rem  *    ********cmd*
rem  *         *
rem  *         *
rem  *    ************
rem  *    * ENV1BASE *
rem  *    ********cmd*
rem  *         *
rem  *         *
rem  *    ************
rem  *    * SIMONOTE *
rem  *    ********cmd*
rem  *         *
rem  *         *
rem  *    ************
rem  *    *   RUN    *---------------------------*
rem  *    ********rts*                           *
rem  *         *           ************     ************
rem  *         *           *  SYSUT1  *-----* TCNUSRC1 *
rem  *         *           *  Note-1  *     ********cbl*
rem  *         *           *******rseq*          *
rem  *         *                                 *
rem  *    ************                      ************
rem  *    *   EOJ    *                      * TCNA2ER1 *
rem  *    ************                      ********cbl*
rem  *                                           *
rem  *                                      ************     ************
rem  *                                      * STPEEKC1 *-----*  SYSOUT  *
rem  *                                      ********cbl*     *******lseq*
rem  *
rem  *
rem  *    Note-1: SYSUT1 is an ASCII-encoded, record sequential (RSEQ)
rem  *            file. The Record structure is defined by TCNTXTB1.cpy.
rem  *
rem  *    Note-2: SYSOUT is an ASCII-encoded, line sequential (LSEQ) file
rem  *            or may be referred to as an ASCII/Text File.
rem  *            The Record structure is defined as a single text string.
rem  *
rem  * *******************************************************************
rem  *
     call ..\ENV1BASE
rem  *
     call SIMONOTE "*******************************************************************************%JOB_NAME% "
     call SIMONOTE "* Starting JobName %JOB_NAME%, User is %USERNAME% "
     call SIMONOTE "* Job_Step 01 of 03, Preparing System and Job Environment"
     set SYSOUT=%BaseLib1%\LOGS\SYSOUT_%JOB_NAME%.txt
     set SYSUT1=%BaseLib1%\DATA\ASC1\TCNTXTD1.dat
rem  *
     call SIMONOTE "* --------------------------------------------------------------------------- *"
     call SIMONOTE "* Job_Step 02 of 03, Execute LSEQ to RSEQ Conversion"
     call SIMONOTE "* DataTake SYSUT1=%SYSUT1% "
     call SIMONOTE "* DataMake SYSOUT=%SYSOUT% "
     run TCNUSRC1
     if not "%ERRORLEVEL%" == "0" set JobStatus=%ERRORLEVEL%
     if not "%JobStatus%" == "0000" goto EOJTAG
:EOJTAG
     call SIMONOTE "* --------------------------------------------------------------------------- *"
     call SIMONOTE "* Job_Step 03 of 03, End of JOB Processing..."
     if not "%JobStatus%" == "0000" goto EojNOK

:EojAOK
     call SIMONOTE "* Produced SYSOUT=%SYSOUT% "
     call SIMONOTE "* Finished JOB_NAME %JOB_NAME%, Job Status is %JobStatus% "
     goto :End
:EojNOK
     call SIMONOTE "* ABENDING JOB_NAME %JOB_NAME%, Job Status is %JobStatus% "
     goto :End
:End
     if not "%1" == "nopause" pause
     exit /B %JobStatus%

Table of Contents Previous Section Next Section Ancillary Task

This section provides additional technical details about the modules that are included in this test case.

Table of Contents Previous Section Next Section LSEQ/CSV to RSEQ/FFL

THE input file (SYSUT1) is an ASCII-encoded,Line Sequential (LSEQ) file. Also, this file may be referred to as an ASCII/Text File. The record format is Comma-Separated-values (CSV). Since the Output File (SYSUT2) contains ASCII-encoded text strings and numeric values stored in a Signed-Zoned-Decimal, Packed Decimal or Binary format the text string conversion and formatting of numeric values will be done at the Record and Field level using two COBOL programs that are generated using SimoTime Technologies.

The 1st program will do the file I/O processing and call a 2nd program to do the records content and field format conversion.

The 2nd program will do the record content conversion at the field level conversion using the field definitions that are defined in a COBOL Copy File.

Table of Contents Previous Section Next Section CMD Job Script, LSEQ/CSV to RSEQ/FFL

The  TCNIMPW5.cmd  is the job script that will do a field format convert of a file containing text data and numeric values. The job will execute a program that will read an ASCII encoded, Line Sequential{LSEQ) file that contains a Comma-Separated-Values (CSV) Record structure and write to a Record Sequential (RSEQ) file that contains a Fixed-Field-Length (FFL) Record structure.

@echo OFF
     set JOB_NAME=TCNIMPW5
rem  * *******************************************************************
rem  *        This Job Script is provided by SimoTime Technologies       *
rem  *           (C) Copyright 1987-2020 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  *
rem  * Text   - Read LSEQ_CSV, Make RSEQ containing Packed-Decimal.
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * The job will execute a program that will read an ASCII encoded,
rem  * Line Sequential{LSEQ) file that contains a Comma-Separated-Values
rem  * (CSV) Record structure.
rem  * Next, the program will write to a new ASCII encoded,
rem  * Record Sequential file that contains various numeric values stored
rem  * in a zoned-decimal or packed-decimal or binary format.
rem  *
rem  *    ************
rem  *    * TCNIMPW5 *
rem  *    ********cmd*
rem  *         *
rem  *         *
rem  *    ************
rem  *    * ENV1BASE *
rem  *    ********cmd*
rem  *         *
rem  *         *
rem  *    ************
rem  *    * SIMONOTE *
rem  *    ********cmd*
rem  *         *
rem  *         *
rem  *    ************
rem  *    *   RUN    *---------------------------*
rem  *    ********rts*                           *
rem  *         *           ************     ************     ************
rem  *         *           *  SYSUT1  *--*--* TCNIMPC5 *--*--*  SYSUT2  *
rem  *         *           *  Note-1  *  *  ********cbl*  *  *  Note-2  *
rem  *         *           *******lseq*  *                *  *******rseq*
rem  *         *                         *                *
rem  *         *           ************  *                *  ************
rem  *         *           *  CSVHDR  *--*                *--*  SYSOUT  *
rem  *         *           *  Note-3  *                      *  Note-4  *
rem  *         *           *******lseq*                      *******lseq*
rem  *    ************
rem  *    *   EOJ    *
rem  *    ************
rem  *
rem  *    Note-1: SYSUT1 is an ASCII-encoded,Line Sequential (LSEQ) file.
rem  *            Also, referred to as an ASCII/Text File.
rem  *            The record format is Comma-Separated-values (CSV).
rem  *
rem  *    Note-2: SYSUT2 is an ASCII-encoded, record sequential (RSEQ)
rem  *            file. The record content imcludes numeric values that
rem  *            are stored in a Zoned-Decimal, Packed-Decimal or
rem  *            Binary format.
rem  *
rem  *    Note-3: This file contains a list of field names that are
rem  *            extracted and re-formatted. The field names are obtained
rem  *            from a COBOL Copy File.
rem  *            This file is used to insert header information as the
rem  *            first record of the SYSUT2 file.
rem  *            Note: This is optional optional feature.
rem  *
rem  *    Note-4: SYSOUT is an ASCII-encoded, line sequential (LSEQ)
rem  *            file.
rem  *
rem  * *******************************************************************
rem  * Step 1, Set Environment Variables
rem  *         Delete any previously created ASCII-encoded file...
rem  *
     call ..\ENV1BASE
rem  *
     call SIMONOTE "*******************************************************************************%JOB_NAME% "
     call SIMONOTE "* Starting JobName %JOB_NAME%, User is %USERNAME% "
     call SIMONOTE "* Job_Step 01 of 03, Prepare the System and Job Environments"
     set JobStatus=0
     set PGMFLAGS=NNNNNNNN/NNNNYNNN
     set SYSOUT=%BaseLib1%\LOGS\SYSOUT_%JOB_NAME%.txt
     set SYSUT1=%BaseLib1%\DATA\CSV1\TCNTXTT1.csv
     set SYSUT2=%BaseLib1%\DATA\ASC1\TCNTXTD5.DAT
     set CSVHDR=%BaseLib1%\DATA\GENS\TCNTXTB1_IMPORT.txt
     if exist %SYSUT2% del %SYSUT2%
rem  *
     call SIMONOTE "* --------------------------------------------------------------------------- * "
     call SIMONOTE "* Job_Step 02 of 03, Execute LSEQ_CSV to RSEQ_FFL Conversion"
     call SIMONOTE "* DataTake SYSUT1=%SYSUT1% "
     call SIMONOTE "* DataMake SYSUT2=%SYSUT2% "
     run TCNIMPC5
     if not "%ERRORLEVEL%" == "0" set JobStatus=10
     if not "%JobStatus%" == "0" goto EOJTAG
     if exist %SYSUT2% goto EOJTAG
     set JobStatus=20
rem  *
:EOJTAG
     call SIMONOTE "* --------------------------------------------------------------------------- * "
     call SIMONOTE "* Job_Step 03 of 03, End of Job Processing"
     if not "%JobStatus%" == "0" goto EojNOK
:EojAOK
     call SIMONOTE "* Produced  %SYSUT2% "
     call SIMONOTE "* Finished JOB_NAME %JOB_NAME%, Job Status is %JobStatus% "
     goto :End
:EojNOK
     call SIMONOTE "* ABENDING JOB_NAME %JOB_NAME%, Job Status is %JobStatus% "
     goto :End
:End
     call SIMONOTE "* Conclude SysOut is %SYSOUT% "
     if not "%1" == "nopause" pause
     exit /B %JobStatus%

Table of Contents Previous Section Next Section File Compare

A batch job script is used to map the file names and execute the compare programs.

Table of Contents Previous Section Next Section CMD Job Script for File Compare

The  TCNVALW1.cmd  is the job script that will do a record-by-record compare of two files. The files are Record Sequential (RSEQ) files that contain a Fixed-Field-Length (FFL) Record structure.

@echo OFF
     set JOB_NAME=TCNVALW1
rem  * *******************************************************************
rem  *        This Job Script is provided by SimoTime Technologies       *
rem  *           (C) Copyright 1987-2020 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  *
rem  * Text   - Compare two Record Sequential Files.
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * The job will read an EBCDIC-encoded Record Sequential file (RSEQ)
rem  * containing fixed-length records of 512 bytes. This job will create
rem  * a new ASCII-encoded  Record Sequential file (RSEQ) containing
rem  * fixed-length records of 512 bytes.
rem  *
rem  *    ************
rem  *    * TCNVALW1 *
rem  *    ********cmd*
rem  *         *
rem  *         *
rem  *    ************
rem  *    * ENV1BASE *
rem  *    ********cmd*
rem  *         *
rem  *         *
rem  *    ************
rem  *    * SIMONOTE *
rem  *    ********cmd*
rem  *         *
rem  *         *
rem  *    ************
rem  *    *   RUN    *---------------------------*
rem  *    ********rts*                           *
rem  *         *           ************     ************     ************
rem  *         *           *  SYSUT1  *-----* TCNVALC1 *--*--*  SYSUT2  *
rem  *         *           *  Note-1  *     ********cbl*  *  *  Note-2  *
rem  *         *           *******rseq*                   *  *******rseq*
rem  *         *                                          *
rem  *         *                                          *  ************
rem  *         *                                          *--*  SYSOUT  *
rem  *         *                                             *  Note-3  *
rem  *         *                                             *******lseq*
rem  *    ************
rem  *    *   EOJ    *
rem  *    ************
rem  *
rem  *    Note-1: SYSUT1 is an EBCDIC-encoded, record sequential (RSEQ)
rem  *            file.
rem  *
rem  *    Note-2: SYSUT2 is an ASCII-encoded, record sequential (RSEQ)
rem  *            file.
rem  *
rem  *    Note-3: SYSOUT is an ASCII-encoded, line sequential (LSEQ)
rem  *            file.
rem  *
rem  * *******************************************************************
rem  * Step 1, Set Environment Variables
rem  *         Delete any previously created ASCII-encoded file...
rem  *
     call ..\ENV1BASE
rem  *
     call SIMONOTE "*******************************************************************************%JOB_NAME% "
     call SIMONOTE "* Starting JobName %JOB_NAME%, User is %USERNAME%"
     call SIMONOTE "* Job_Step 01 of 03, Preparing System and Job Environment"
     set SYSOUT=%BaseLib1%\LOGS\SYSOUT_%JOB_NAME%.txt
     set SYSUT1=%BaseLib1%\DATA\ASC1\TCNTXTD1.dat
     set SYSUT2=%BaseLib1%\DATA\ASC1\TCNTXTD5.dat
     set SYSLUSER=%BaseLib1%\LOGS\SYSLUSER_%JOB_NAME%.htm
rem  *
rem  * *******************************************************************
rem  * Step 2, Read EBCDIC-encoded RSEQ, create a new ASCII-encoded RSEQ
rem  *
     call SIMONOTE "* --------------------------------------------------------------------------- *"
     call SIMONOTE "* Job_Step 02 of 03, Execute RSEQ to RSEQ Data File Compare "
     call SIMONOTE "* DataTake SYSUT1=%SYSUT1%"
     call SIMONOTE "* DataTake SYSUT2=%SYSUT2%"
     run TCNVALC1
     if not "%ERRORLEVEL%" == "0" set JobStatus=0010
     if not "%JobStatus%" == "0000" goto :EOJTAG
     if exist %SYSUT2% goto :EOJTAG
     set JobStatus=0020
     goto :EOJTAG
rem  *
:EOJTAG
     call SIMONOTE "* --------------------------------------------------------------------------- *"
     call SIMONOTE "* JOB_STEP 03 of 03, End of Job Processing"
     call SIMONOTE "* SIMONOTE Job Log is %SIMONOTE% "
     if "%JOB_STATUS%" == "0" goto EOJAOK
:EojAOK
     call SIMONOTE "* Produced  %SYSUT2%"
     call SIMONOTE "* Finished JOB_NAME %JOB_NAME%, Job Status is %JobStatus%"
     goto :End
:EojNOK
     call SIMONOTE "* ABENDING JOB_NAME %JOB_NAME%, Job Status is %JobStatus%"
     goto :End
:End
     call SIMONOTE "* Conclude SysOut is %SYSOUT%"
     if not "%1" == "nopause" pause
     exit /B %JobStatus%

Table of Contents Previous Section Next Section Technical Details

This section provides additional technical details about the modules that are included in this test case.

Table of Contents Previous Section Next Section COBOL Copy Files

WIP

Table of Contents Previous Section Next Section Copy File for Binary, Packed or Zoned

The following link provides a description of the COBOL Copy File that defines a fixed length record structure containing data strings (or fields) of a fixed field length. The data strings may be defined as Text strings or Numeric values stored in a Binary, Packed-Decimal or Zoned Decimal format.

Link to Internet   Link to Server   Explore a COBOL Copy File that defines a record structure containing numeric values stored in a Binary (COMP), Packed-Decimal (COMP-3) or Zoned-Decimal Format. Files that use this record structure may be used in test cases that do data conversion between EBCDIC and ASCII encoded text strings and expansion of Binary (COMP), Packed-Decimal (COMP-3) or Zoned-Decimal numeric values.

Table of Contents Previous Section Next Section Copy File for Sign, Leading, Separate

The following link provides a description of the COBOL Copy File that defines a fixed length record structure containing data strings (or fields) of a fixed field length. The data strings may be defined as Text strings or Numeric values stored in a text oriented (Zoned Decimal) format with a leading byte reserved for the sign symbol.

Link to Internet   Link to Server   Explore a COBOL Copy File that defines a fixed length record structure containing data strings (or fields) of a fixed field length. The data strings may be defined as Text strings or Numeric values stored in a text oriented (Zoned Decimal) format with a leading byte reserved for the sign symbol.

Table of Contents Previous Section Next Section Summary

This document and referenced programs describes and demonstrates the process of converting an EBCDIC-encoded, Record Sequential file to an ASCII/Text file. Also, the convert process includes a file format, record content and field format conversion that will expand the numeric values that are stored in a Zoned-Decimal or Packed-Decimal format. This document may be used to assist as a tutorial for new assembler programmers or as a quick reference for experienced programmers. The samples focus on the coding techniques of the individual instructions. As always, it is the programmer's responsibility to thoroughly test all programs.

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, Comment 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.

Link to Internet   Link to Server   This is the System Information Manual for the TCNBRS01 Test Case. This test case will convert the file format, record content and record structure of an EBCDIC-encoded file that was created and transferred from an IBM Mainframe System to a format and structure that may be easily imported and accessed from within an ASCII-oriented relational data base or a spread sheet using Excel or LibreOffice Calc. This expanded request will involve more than a simple EBCDIC to ASCII conversion. This test case will describe and demonstrate how to identify and convert text strings between EBCDIC and ASCII and how to identify, expand and convert numeric values that are formatted as Binary, Packed-Decimal or Signed-Zoned-Decimal.

Link to Internet   Link to Server   Explore a COBOL Copy File that defines a record structure containing numeric values stored in a Binary (COMP), Packed-Decimal (COMP-3) or Zoned-Decimal Format. Files that use this record structure may be used in test cases that do data conversion between EBCDIC and ASCII encoded text strings and expansion of Binary (COMP), Packed-Decimal (COMP-3) or Zoned-Decimal numeric values.

Link to Internet   Link to Server   Explore the non-Relational Data Connection for more examples of accessing methodologies and coding techniques for Data Files and VSAM Data Sets.

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.

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 Internet Access Required

The following links will require an internet connect.

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.

Explore the GnuCOBOL Technologies available from SourceForge. SourceForge is an Open Source community resource dedicated to helping open source projects be as successful as possible. GnuCOBOL (formerly OpenCOBOL) is a COBOL compiler with run time support. The compiler (cobc) translates COBOL source to executable using intermediate C, designated C compiler and linker. This link will require 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, 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
RUN_BOOK, Test Data with Numeric Values
Copyright © 1987-2023
SimoTime Technologies and Services
All Rights Reserved
When technology complements business
http://www.simotime.com