Data File Convert
Run Book for RSEQ to LCSV
|
|
|
Table of Contents |
v-20.00.00 - tcntxtrb.htm |
|
|
Introduction
In many cases a user request to convert data from EBCDIC to ASCII will expand into a request to convert a file format (typically a record sequential file) and its record content from a mainframe-oriented record structure to a format and 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 EBCDIC to ASCII conversion.
This is the Run Book for the TCNTXT01 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 expanded conversion process.
1.
|
The Input file for this test case is a Record Sequential (RSEQ) File
|
1.1.
|
Contains Text fields that are EBCDIC-encoded.
|
1.2.
|
Contains Numeric fields that are stored in a Zoned_Decimal, Packed-Decimal (or COMP-3) and Binary (or COMP) format.
|
1.2.2.
|
Packed-Decimal (or COMP-3) format
|
1.2.3.
|
Binary (or COMP) format
|
1.3.
|
The record structure is a Fixed-Field-Length (FFL) format. The record size is a fixed length of 512 bytes.
|
2.
|
The Output file for this test case is a Line Sequential (LSEQ) File. Also, this file type is referred to as an ASCII/Text file.
|
2.1.
|
The Text fields are ASCII-encoded.
|
2.2.
|
The Numeric fields are expanded and converted from a Packed-Decimal (or COMP-3) format to an ASCII-encoded, Text format with a separate leading sign character and an explicit decimal point.
|
2.3.
|
The record structure is a Comma-Separated-Values (CSV) format. The record size is variable.
|
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.
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-2020
SimoTime Technologies and Services
All Rights Reserved
Execute the Convert Process
This example illustrates the following functions.
1.
|
Execute the EBCDIC to ASCII Convert Programs - Execute a user defined job script that will define the environment and execute the convert programs.
|
1.1.
|
TCNE2AW1.cmd is the job script that will convert a file containing embedded text strings from EBCDIC to ASCII.
|
1.1.1.
|
Access - %BASELIB1%\DEVL\DATA\EBC1\TCNTXTD1.dat
|
1.1.2.
|
Convert embedded text strings from EBCDIC to ASCII
|
1.1.3.
|
Maintain numeric (or arithmetic) integrity for packed-decimal and binary strings that contain numeric values.
|
1.1.4.
|
Create - %BASELIB1%\DEVL\DATA\ASC1\TCNTXTD1.dat
|
2.
|
Review the EBCDIC to ASCII Convert Results - Execute a user defined job script that will define the environment and execute the Hexadecimal Dump program.
|
2.1.
|
TCNHXRW1.cmd is the job script that will read a record sequential file containing text data and numeric values and produce an ASCII/Text file containing hexadecimal dump information.
|
2.1.1.
|
Access - SYSUT1=%BASELIB1%\DEVL\DATA\ASC1\TCNTXTD1.dat
|
2.1.2.
|
Create - SYSUT2=%BASELIB1%\DEVL\DATA\LOGS\REC_DUMP_ASC_TCNTXTD1.txt
|
2.1.3.
|
Using a text editor of choice review the content of the REC_DUMP_ASC_TCNTXTD1.txt file.
|
3.
|
Execute the RSEQ/FFL to LSEQ/CSV Convert Programs - Execute a user defined job script that will define the environment and execute the convert programs.
|
3.1.
|
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.
|
3.1.1.
|
Access - SYSUT1=%BASELIB1%\DATA\ASC1\TCNTXTD1.dat
|
3.1.2.
|
Do the Record Structure and Field Format conversion.
|
3.1.3.
|
Create - SYSUT2=%BASELIB1%\DATA\CSV1\TCNTXTT1.csv
|
3.1.4.
|
Build a record containing the fields names to be used as column headers. Write this record to the CSV file. This is an optional feature.
|
3.1.5.
|
The last step of this job will start NOTEPAD and show the content of the CSV file in a separate window for user review.
|
4.
|
Review the RSEQ/FFL to LSEQ/CSV Convert Results - Execute a user defined job script that will define the environment and show the content of the CSV file.
|
4.1.
|
The TCNPADW1.cmd is a stand alone job script that will execute NOTEPAD as the text editor to view the CSV file created in the previous step. This will show the converted numeric values with a separate, leading sign character and an explicit decimal point.
|
4.1.1.
|
The first record shows the field names of each column. The field names and properties were obtained from a COBOL Copy File.
|
4.1.2.
|
The remaining records contain user defined data strings.
|
4.1.3.
|
Since the file name has a "CSV" extension it may be easily viewed using spread sheet software such as Excel or LibreOffice Calc.
|
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.
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.
The 1st program will do the file I/O processing and call a 2nd program to do the records content 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.
CMD Job Script, EBCDIC to ASCII
The TCNE2AW1.cmd is the job script that will do an EBCDIC to ASCII conversion of the fields containing text data. The numeric values stored in a Packed-Decimal format will maintain their Packed-Decimal format.
@echo OFF
set JOB_NAME=TCNE2AW1
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 EBC Record Sequential, write ASC Record Sequential.
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 * * TCNE2AW1 *
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 *-----* TCNE2AC1 *--*--* 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\EBC1\TCNTXTD1.dat
set SYSUT2=%BaseLib1%\DATA\ASC1\TCNTXTD1.dat
if exist %SYSUT2% del %SYSUT2%
rem *
call SIMONOTE "* --------------------------------------------------------------------------- *"
call SIMONOTE "* Job_Step 02 of 03, Read EBCDIC-encoded RSEQ, create a new ASCII-encoded RSEQ"
call SIMONOTE "* DataTake SYSUT1=%SYSUT1% "
call SIMONOTE "* DataMake SYSUT2=%SYSUT2% "
run TCNE2AC1
if not "%ERRORLEVEL%" == "0" set JobStatus=0010
if not "%JobStatus%" == "0000" goto EOJTAG
if exist %SYSUT2% goto EOJTAG
set JobStatus=0020
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 %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%
Review Content of EBCDIC Input file
The following shows the content of the EBCDIC-encoded input file. This is a record sequential file. The record length is 512 bytes. The Test Case file contains three (3) records. The record content contains EBCDIC-encoded text data strings and numeric values stored in a Signed-Zoned-Decimal and Packed-Decimal format.
*******************************************************************************
* TCNHXDC1 HEX-Dump from RSEQ_512 to HTML v20.00.00 helpdesk@simotime.com
* TCNHXDC1 This Data File HexDump Member was generated by SimoTime Technologies
*******************************************************************************
Starting - HEX-Dump from RSEQ_512 to HTML http://www.SimoTime.com
* Record Count is 000000001-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
....:...10....:...20....:...30....:...40....:...50....:...60....:...70....:...80....:...90....:..100....:..110....:..120....:..130....:..140....:..150....:..160....:..170....:..180....:..190....:..200....:..210....:..220....:..230....:..240....:..250....:..260....:..270....:..280....:..290....:..300....:..310....:..320....:..330....:..340....:..350....:..360....:..370....:..380....:..390....:..400....:..410....:..420....:..430....:..440....:..450....:..460....:..470....:..480....:..490....:..500....:..510..
Áùø.öõôóòÁ..4Vx..#El..4V|...I\.....[Í...â@...g....@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
CFFFFFFFFC01357902460135700045000005C100E40006000B444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444
198765432102468C135C0246C0029C00007BD501200027009F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
A98765432A...îÌÆ..á%...î@...ñ*.....$ò...S ...Å....
* Record Count is 000000002-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
....:...10....:...20....:...30....:...40....:...50....:...60....:...70....:...80....:...90....:..100....:..110....:..120....:..130....:..140....:..150....:..160....:..170....:..180....:..190....:..200....:..210....:..220....:..230....:..240....:..250....:..260....:..270....:..280....:..290....:..300....:..310....:..320....:..330....:..340....:..350....:..360....:..370....:..380....:..390....:..400....:..410....:..420....:..430....:..440....:..450....:..460....:..470....:..480....:..490....:..500....:..510..
Áø.öõôóòñÀ.#Eg©..4V|.#Eg....I\.....[Í...â@........@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
CFFFFFFFFC02468013570246800045000005C100E400000000444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444
187654321013579C246C1357C0029C00007BD5012000DA00DA000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
A87654321{..áÅi...î@..áÅ....ñ*.....$ò...S ........
* Record Count is 000000003-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
....:...10....:...20....:...30....:...40....:...50....:...60....:...70....:...80....:...90....:..100....:..110....:..120....:..130....:..140....:..150....:..160....:..170....:..180....:..190....:..200....:..210....:..220....:..230....:..240....:..250....:..260....:..270....:..280....:..290....:..300....:..310....:..320....:..330....:..340....:..350....:..360....:..370....:..380....:..390....:..400....:..410....:..420....:..430....:..440....:..450....:..460....:..470....:..480....:..490....:..500....:..510..
Á.öõôóòñ.Â.4Vx..#Eg..4Vx....I\.....[Í...â@...è....@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
CFFFFFFFFC03579124680357900045000005C100E4000E0000444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444
176543210224680C357C2468C0029C00007BD501200038000A000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
A76543210B..îÌ...áÅ...îÌÆ...ñ*.....$ò...S ...Y....
*******************************************************************************
Conclude - HEX-Dump from RSEQ_512 to HTML
000000003 - Record count for SYSUT1
000000002 - Record count for SYSUT3
The following provides additional detail about each line of the preceding hex-dump information.
1. | The yellow background color identifies two lines of record information. The 1st line shows the record properties. The 2nd line shows the record positions. |
2. | The maroon or dark red font identifies a possible translation for an ASCII encoded data string. |
3. | The light-green background color identifies the two lines of Hexadecimal dump information. |
4. | The blue font identifies a possible translation for an EBCDIC encoded data string. |
Hex-Dump Job Script for EBCDIC to ASCII
The following if the job script that will prepare the environment, map the file names and execute the EBCDIC to ASCII Convert process while maintaining numeric integrity. The job script writes the hex-dump information to an ASCII/Text file and may be viewed using a text editor of choice.
@echo OFF
set JOB_NAME=TCNHXRW2
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 - Create a Hex-Dump of a Record Sequential file.
rem * Author - SimoTime Technologies
rem * Date - January 24, 1996
rem *
rem * The program executed by this job will read an ASCII-encoded,
rem * Record Sequential File (RSEQ) with fixed length records (512 bytes)
rem * records containing text data strings and numeric values that are
rem * stored in a Signed-Zoned-Decimal, Packed-Decimal or Binary format.
rem *
rem * Numeric Type COBOL Notation
rem * -------------------- ---------------------------------------
rem * 1. Signed-Zoned-Decimal ... USAGE IS DISPLAY
rem * 2. Packed-Decimal ......... USAGE IS COMP-3
rem * 3. Binary ................. USAGE IS COMP
rem *
rem * The HEX-Dump information will be written to a new ASCII-encoded
rem * line sequential or ASCII/Text File. The HEX-Dump information is
rem * provided in a text format and may be viewed with a text editor
rem * of choice.
rem * *******************************************************************
rem *
call ..\ENV1BASE
set JOB_STATUS=0
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 SYSOUT=%BaseLib1%\LOGS\SYSOUT_%JOB_NAME%.txt
set SYSUT1=%BaseLib1%\DATA\ASC1\TCNTXTD1.dat
set SYSUT2=%BaseLib1%\LOGS\REC_DUMP_ASC_TCNTXTD1.txt
set SYSUT3=%BaseLib1%\PARMLIB\TCNHEXT1.txt
if exist %SYSUT2% del %SYSUT2%
rem *
call SIMONOTE "* --------------------------------------------------------------------------- *"
call SIMONOTE "* Job_Step 02 of 03, Execute REC_DUMP Program"
call SIMONOTE "* DataTake SYSUT1=%SYSUT1% "
call SIMONOTE "* DataMake SYSUT2=%SYSUT2% "
call SIMONOTE "* DataCNTL SYSUT3=%SYSUT3% "
run TCNHXRC1
if not "%ERRORLEVEL%" == "0" set JOB_STATUS=10
if not "%JobStatus%" == "0000" goto EOJTAG
if exist %SYSUT2% goto EOJTAG
set JOB_STATUS=20
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
:EOJNOK
call SIMONOTE "* ABENDING JOB_STATUS=%JOB_STATUS% JobName %JOB_NAME% "
goto :EOJEND
:EOJAOK
start NOTEPAD %SYSUT2%
call SIMONOTE "* Conclude HEX_Dump information should be displayed in a separate window "
call SIMONOTE "* Finished JOB_STATUS=%JOB_STATUS% JobName %JOB_NAME% "
goto :EOJEND
:EOJEND
if not "%SIMOGENS%" == "BATCH" pause
exit /B %JOB_STATUS%
The ASCII Output File
The following shows the content of the ASCII-encoded Output file. This is a record sequential file. The record length is 512 bytes. The Test Case file contains three (3) records. The record content contains ASCII-encoded text data strings and numeric values stored in a Signed-Zoned-Decimal and Packed-Decimal format.
*******************************************************************************
* TCNHXDC1 HEX-Dump from RSEQ_512 to HTML v20.00.00 helpdesk@simotime.com
* TCNHXDC1 This Data File HexDump Member was generated by SimoTime Technologies
*******************************************************************************
Starting - HEX-Dump from RSEQ_512 to HTML http://www.SimoTime.com
* Record Count is 000000001-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
....:...10....:...20....:...30....:...40....:...50....:...60....:...70....:...80....:...90....:..100....:..110....:..120....:..130....:..140....:..150....:..160....:..170....:..180....:..190....:..200....:..210....:..220....:..230....:..240....:..250....:..260....:..270....:..280....:..290....:..300....:..310....:..320....:..330....:..340....:..350....:..360....:..370....:..380....:..390....:..400....:..410....:..420....:..430....:..440....:..450....:..460....:..470....:..480....:..490....:..500....:..510..
A987654321..4Vx..#El..4V|...I\.....[Í...â@...g....
433333333301357902460135700045000005C100E40006000B222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
198765432102468C135C0246C0029C00007BD501200027009F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
.............îÌÆ..á%...î@...ñ*.....$ò...S ...Å....€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€
* Record Count is 000000002-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
....:...10....:...20....:...30....:...40....:...50....:...60....:...70....:...80....:...90....:..100....:..110....:..120....:..130....:..140....:..150....:..160....:..170....:..180....:..190....:..200....:..210....:..220....:..230....:..240....:..250....:..260....:..270....:..280....:..290....:..300....:..310....:..320....:..330....:..340....:..350....:..360....:..370....:..380....:..390....:..400....:..410....:..420....:..430....:..440....:..450....:..460....:..470....:..480....:..490....:..500....:..510..
A876543210.#Eg©..4V|.#Eg....I\.....[Í...â@........
433333333302468013570246800045000005C100E400000000222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
187654321013579C246C1357C0029C00007BD5012000DA00DA000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
............áÅi...î@..áÅ....ñ*.....$ò...S ........€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€
* Record Count is 000000003-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
....:...10....:...20....:...30....:...40....:...50....:...60....:...70....:...80....:...90....:..100....:..110....:..120....:..130....:..140....:..150....:..160....:..170....:..180....:..190....:..200....:..210....:..220....:..230....:..240....:..250....:..260....:..270....:..280....:..290....:..300....:..310....:..320....:..330....:..340....:..350....:..360....:..370....:..380....:..390....:..400....:..410....:..420....:..430....:..440....:..450....:..460....:..470....:..480....:..490....:..500....:..510..
A765432102.4Vx..#Eg..4Vx....I\.....[Í...â@...è....
433333333303579124680357900045000005C100E4000E0000222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
176543210224680C357C2468C0029C00007BD501200038000A000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
............îÌ...áÅ...îÌÆ...ñ*.....$ò...S ...Y....€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€
*******************************************************************************
Conclude - HEX-Dump from RSEQ_512 to HTML
000000003 - Record count for SYSUT1
000000002 - Record count for SYSUT3
The following provides additional detail about each line of the preceding hex-dump information.
1. | The yellow background color identifies two lines of record information. The 1st line shows the record properties. The 2nd line shows the record positions. |
2. | The maroon or dark red font identifies a possible translation for an ASCII encoded data string. |
3. | The light-green background color identifies the two lines of Hexadecimal dump information. |
4. | The blue font identifies a possible translation for an EBCDIC encoded data string. |
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.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.1.
|
Drop a Header Record
|
2.4.2.
|
Uses Field Names defined in a COBOL Copy File
|
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
|
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.
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%
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 (,).
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.1.
|
Hex-Dump of full record content
|
1.2.
|
User display and Hex-Dump by Field Name
|
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
|
Validate Numeric Integrity
This section provides additional technical details about the modules that are included in this test case.
1.
|
Validate Summary Totals - Execute a user defined job script that executes a program that will accumulate Summary Totals for the numeric fields that are stored in Zoned-Decimal, Packed-Decimal and Binary format.
|
1.1.
|
The TCNTOTW1.cmd is a stand alone job script that accumulate the summary totals. The last step will execute NOTEPAD as the text editor to view the file containing the summary totals.
|
1.1.1.
|
Access - SYSUT1=%BASELIB1%\DEVL\DATA\ASC1\TCNTXTD1.dat
|
1.1.2.
|
Create - SYSUT2=%BASELIB1%\DEVL\DATA\LOGS\SYSOUT_TCNTOTW1.txt
|
1.1.3.
|
Using a text editor of choice review the content of the SYSOUT_TCNTOTW1.txt file.
|
The following show the output that includes the summary totals.
SYSOUT for Summary Totals
The following is the SYSOUT information that is available for review after executing the TCNUSRW1 Job Script.
* TCNTOTC1 Accumulate Totals for Numeric Data v19.00.00 helpdesk@simotime.com
* TCNTOTC1 A Program to Calculate Totals was generated by SimoTime Technologies
* TCNTOTC1 * HEX20 parameter is DISABLE
* TCNTOTC1 * HEX40 parameter is DISABLE
* TCNTOTC1 * HEXTR parameter is DISABLE
* TCNTOTC1 * NUMCHK parameter is DISABLE
* TCNTOTC1 ************************************************************************************************************
* TCNTOTC1 Field Name Summary.Total HEX40 HEX20 NUMCHK TYPE
* TCNTOTC1 TCNTXT01-ZDS-09-00 2,629,629,633 ZDS
* TCNTOTC1 TCNTXT01-PKS-00-10 0.3703703580 PKS
* TCNTOTC1 TCNTXT01-PKS-00-07 0.3703701 PKS
* TCNTOTC1 TCNTXT01-PKS-01-07 3.7037034 PKS
* TCNTOTC1 TCNTXT01-PKS-07-02 74.85 PKS
* TCNTOTC1 TCNTXT01-BNS-00-10 0.0370370367 BNS
* TCNTOTC1 TCNTXT01-BNS-00-07 0.0370368 BNS
* TCNTOTC1 TCNTXT01-BNS-01-07 0.0004953 BNS
* TCNTOTC1 TCNTXT01-BNS-07-02 58.43 BNS
* TCNTOTC1 Record count for TCNTOTD1 000000003
* TCNTOTC1 Field Name Summary.Total HEX40 HEX20 NUMCHK TYPE
* TCNTOTC1 ************************************************************************************************************
* TCNTOTC1 Program to Calculate Totals generated by using SimoTime Technologies
* TCNTOTC1 Please send all comments or suggestions to the helpdesk@simotime.com
In the preceding report the rightmost column uses the following notation to identify the format of the numeric type.
ZDS - Zoned-Decimal-Signed
PKS - Packed-Decimal-Signed
BNS - Binary-Signed
CMD Job Script for Summary Totals
The TCNTOTW1.cmd is the job script that will prepare the environment and execute the program that will accumulate summary totals.
@echo OFF
set JOB_NAME=TCNTOTW1
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 a file, Calculate record Count and numeric totals.
rem * Author - SimoTime Technologies
rem * Date - January 24, 1988
rem *
rem * The job will read a file of 512-byte records that contains numeric
rem * fields within the records.
rem * The programs will read the file and calculate a record count and
rem * summary totals for user-defined numeric fields.
rem *
rem * ************
rem * * TCNTOTW1 *
rem * ********cmd*
rem * *
rem * *
rem * ************ ************ ************
rem * * TCNTOTD1 ******* TCNTOTC1 ******* SYSOUT *
rem * *******rseq* ********cbl* *******lseq*
rem * *
rem * *
rem * ************
rem * * EOJ *
rem * ************
rem *
rem * *******************************************************************
rem * Read a File, Calculate Record Counts and Summary Totals...
rem *
call ..\ENV1BASE %JOB_NAME%
if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
rem *
call SIMONOTE "*******************************************************************************%JOB_NAME% "
call SIMONOTE "* Job_Step 01 of 03, Prepare the System and Job Environments"
set JobStatus=0
set TCNTOTD1=%BaseLib1%\DATA\ASC1\TCNTXTD1.dat
set SYSOUT=%BaseLib1%\LOGS\SYSOUT_%JOB_NAME%.TXT
if exist %SYSOUT% erase %SYSOUT%
rem *
call SIMONOTE "* --------------------------------------------------------------------------- *"
call SIMONOTE "* Job_Step 02 of 03, Execute program to Calculate Totals"
call SIMONOTE "* DataTake %TCNTOTD1% "
call SIMONOTE "* DataMake %SYSOUT% "
run TCNTOTC1
if not "%ERRORLEVEL%" == "0" set JobStatus=0010
if not %JobStatus% == 0000 goto :EOJTAG
if exist %SYSOUT% type %SYSOUT%
goto :EOJTAG
rem *
:EOJTAG
call SIMONOTE "* --------------------------------------------------------------------------- *"
call SIMONOTE "* Job_Step 03 of 03, End of Job Processing"
if not "%JobStatus%" == "0" goto EojNok
:EojAok
start NOTEPAD %SYSOUT%
call SIMONOTE "* Conclude Summary Totals should be displayed in a separate window "
call SIMONOTE "* Finished JobName %JOB_NAME%, Job Status is %JobStatus% "
goto :End
:EojNok
call SIMONOTE "* ABENDING JobName %JOB_NAME%, Job Status is %JobStatus% "
:End
if not "%1" == "nopause" pause
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.
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
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%
Ancillary Task
This section provides additional technical details about the modules that are included in this test case.
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.
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%
File Compare
A batch job script is used to map the file names and execute the compare programs.
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%
Technical Details
This section provides additional technical details about the modules that are included in this test case.
COBOL Copy File for EBCDIC Input
The following link provides a description of the COBOL Copy File that defines the record structure for the EBCDIC-encoded input file.
Explore a COBOL Copy File that defines a record structure containing text strings and numeric values stored in a Packed-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 Packed-Decimal and Binary numeric values.
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 Comments or Feedback section of this document.
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.
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.
Current Server or Internet Access
The following links may be to the current server or to the Internet.
This is the System Information Manual for the TCNTXT01 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 Signed-Zoned-Decimal, Packed-Decimal or Binary.
Explore a COBOL Copy File that defines a record structure containing text strings and numeric values stored in a Packed-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 Packed-Decimal and Binary numeric values.
Explore the non-Relational Data Connection for more examples of accessing methodologies and coding techniques for Data Files and VSAM Data Sets.
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.
Explore The File Status Return Codes to interpret the results of accessing VSAM data sets and/or QSAM files.
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.
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 and services available from Micro Focus. This link requires an Internet Connection.
Glossary of Terms
Explore the Glossary of Terms for a list of terms and definitions used in this suite of documents and white papers.
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.
|
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.
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
Copyright © 1987-2020 SimoTime Technologies and Services All Rights Reserved |
When technology complements business |
http://www.simotime.com |