Data Files, Numeric Values Zoned Decimal, Packed and Binary |
The SimoTime Home Page |
This suite of programs provides an example of how to create a set of two user test files with fixed-length, 256-byte records. The records will contain EBCDIC or ASCII text strings and numeric data items in various formats such as Packed Decimal, Binary and Zoned Decimal. The record content for one file will be based on an EBCDIC-encoded schema and the other will be based on an ASCII-encoding schema.
This document will focus on how to create a file that contains text and binary data and is 1 of 5 documents from the following list.
The following is a list of the five (5) documents included in this model for data management functions of non-relational data structures. The functions include data conversion (file structure and record content), record presentation in hexadecimal format with possible ASCII and EBCDIC character translations and the accumulation of summary totals with record counts.
Explore the ASCII and EBCDIC data conversion techniques for a file that contains text strings and numeric fields of various formats such as BINARY, PACKED-Decimal and ZONED-Decimal. A Mainframe System and the COBOL programming language supports a variety of different numeric formats that will be discussed in this document.
Explore how to create hexadecimal dump information of the records in a sequential file. The records may contain text strings and numeric fields of various formats such as BINARY, PACKED-Decimal and ZONED-Decimal. In addition to the Hex-Dump information the possible ASCII and EBCDIC character will be identified.
Explore how to accumulate summary totals for currency or numeric fields that are defined (or formatted) as Binary, Packed Decimal or Zoned Decimal. The record count is included as one of the summary totals.
Explore how to create a file that contains text and binary data. This document describes a model for creating a record sequential file that contains text strings that use EBCDIC or ASCII encoding and various numeric formats such as BINARY, PACKED-Decimal and ZONED-Decimal. This model has the capability of creating a test file for an ASCII or EBCDIC encoded environment. This document will address many of the challenges of doing a record content conversion of a file that will be transferred between an EBCDIC-encoded Mainframe System and an ASCII-encoded Linux, UNIX or Windows System.
Explore how to generate programs (or COBOL source code) to perform various data management functions for non-relational data structures. The functions described in this document include data conversion (file structure and record content), hexadecimal dumps and summary totals accumulation.
We have made a significant effort to ensure the documents and software technologies are correct and accurate. We reserve the right to make changes without notice at any time. The function delivered in this version is based upon the enhancement requests from a specific group of users. The intent is to provide changes as the need arises and in a timeframe that is dependent upon the availability of resources.
Copyright © 1987-2025
SimoTime Technologies and Services
All Rights Reserved
Each of the numeric categories (or formats) presents its own set of possibilities and considerations. Hyperlinks to additional documents describing additional details about the various numeric formats may be found in the Downloads and Links to Similar Pages section of this document.
The first challenge in creating the test files is to determine the numeric content (or arithmetic value) of the various numeric items that will be defined as BINARY, PACKED-Decimal and ZONED-Decimal. This will be accomplished by using a text string of digits (or numbers) with an explicit decimal point and an explicit sign character. This approach will allow a user to create a Primary Test File using a text editor of choice. This primary test file will be used to create two User Test Files, one that uses ASCII-encoding and one that uses EBCDIC-encoding.
The User Test Files are created by reading the primary test file and doing a "Record Content Conversion" of the Comma-Separated-Values (CSV) format to a Fixed-Field-Length (FFL) format and converting the numeric text strings from the primary test file to the desired numeric format (Binary, Packed-Decimal or Zoned-Decimal) for the User Test File.
Batch processing techniques (or Batch Jobs) will be used to create the two primary test files. For a Windows environment running Micro Focus COBOL a set of Windows Command files is available. For a Mainframe System running ZOS or a Linux, UNIX or Windows System running Micro Focus Enterprise Server a set of JCL Members is available.
The following CMD file (MKN256W8.cmd) will create the user test files that contains text and numeric data strings.
@echo OFF rem * ******************************************************************* rem * MKN256W8.cmd - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * rem * Text - Create Test Data for CVN256*.cmd Jobs. rem * Author - SimoTime Technologies rem * Date - January 24, 1996 rem * rem * The primary purpose for this job is to create test data for rem * signed-numeric fields. This job contains multiple job steps. rem * The output of one job step will be used as input to the subsequent rem * job step. rem * rem * This job is intended to run on a Windows System with a Micro rem * Focus Enterprise Server Instance that is configured for an rem * ASCII-encoded environment. rem * rem * For additional information contact the helpdesk@simotime.com rem * rem * The 1st job step will use the Windows "ECHO" command to create rem * an ASCII/Text (or LSEQ) file with a maximum record length of rem * 80 bytes. The record content contains variable length fields rem * that are delimited by a Comma (or Comma-Separated-Value). rem * A file with this type of record content is sometimes referred to rem * as a CSV File. rem * rem * The 2nd job step will execute a COBOL program that will read rem * the LSEQ file structure and write to an RSEQ file structure. rem * The record content will remain in a CSV format. rem * rem * The 3rd job step will execute a COBOL program that will read rem * the file with 80-byte records. Position 72 of the record is rem * used as a continuation indicator. A non-space character will rem * cause positions 1-71 to be moved to the output buffer but the rem * write will be suppressed. The next record will be concatenated rem * with data already in the output buffer. The output file is a rem * Record Sequential file (RSEQ) with a record length of 1,024 bytes. rem * rem * The 4th job step will execute a COBOL program that will read rem * the file with 1,024-byte records and parse the CSV formatted rem * record content and create a RSEQ file with 256-byte records with rem * Fixed Field Lengths (FFL). The field types are defined in a rem * user-supplied COBOL copyfile. The field types for this example rem * include text fields and numeric fields that use a BINARY, rem * PACKED-Decimal and ZONED Decimal format. rem * rem * The 5th job step will execute a COBOL program that will do a rem * record content conversion between ASCII and EBCDIC while rem * maintaining mainframe numeric integrity. rem * rem * This job will run on a Windows System using Micro Focus rem * Enterprise Server and SimoTime Programs. rem * rem * ************ rem * * MKN256W8 * rem * ********cmd* rem * * rem * * rem * ************ ************ rem * * SIMONOTE ******* CONSOLE * rem * ********cmd* * ************ Note: Prefix Messages, rem * * * Display and write to rem * * * ************ log file rem * * **** SIMONOTE * rem * * *******lseq* rem * * rem * * rem * * Step-1 * ------------------------------------------------* rem * * Create an ASCII/Text (or LSEQ) File, this can be rem * * done using a text editor or the echo command rem * * with instream data. rem * * rem * ************ rem * * command ***************************** rem * *******wcmd* * rem * * * rem * * ************ ************ ************ rem * * * INSTREAM ******* echo ******* GETLS080 * rem * * *******user* ********cbl* *******lcsv* rem * * rem * * rem * *---Step-2---* -----------------------------------------------* rem * File Structure - Convert an 80-byte LSEQ to an 80-byte RSEQ. rem * Record Content - Record content is copied without change. rem * * rem * ************ rem * * run ***************************** rem * *******mifo* * rem * * * rem * * ************ ************ ************ rem * * * GETLS080 ******* CV80ALAR ******* PUTRS080 * rem * * *******lcsv* ********cbl* *******rcsv* rem * * rem * * rem * *---Step-3---* ------------------------------------------------* rem * File Structure - Convert multiple 80-byte records into a rem * * 1024-byte record. rem * Record Content - Concatenate 72-byte strings into a single rem * * 1024-byte string rem * * rem * ************ rem * * run ***************************** rem * *******mifo* * rem * * * rem * * ************ ************ ************ rem * * * SYSUT1 ******* MKN01KC8 ******* SYSUT2 * rem * * *******rcsv* ********cbl* *******rcsv* rem * * rem * * rem * *---Step-4---* ------------------------------------------------* rem * File Structure - Convert 1024-byte records to 256-byte records. rem * Record Content - Import the Comma-Separated-Value (CSV) data rem * * strings and create a Fixed-Field-Length (FFL) rem * * record structure that is based on the field rem * * definitions in a user-supplied COBOL copyfile. rem * * rem * ************ rem * * run ***************************** rem * *******mifo* * rem * * * rem * * ************ ************ ************ rem * * * SYSUT1 ******* MKN256C8 ******* SYSUT2 * rem * * *******rcsv* ********cbl* *******rffl* rem * * rem * *---Step-5---* ------------------------------------------------* rem * File Structure - The file structure will not be changed. rem * Record Content - The record content will be converted from rem * * ASCII to EBCDIC encoding. The mainframe rem * * numeric integrity will be maintained for the rem * * BINARY, PACKED-Decimal and ZONED-Decimal rem * * values. rem * * rem * ************ rem * * run ***************************** rem * *******mifo* * rem * * * rem * * ************ ************ ************ rem * * * SYSUT1 ******* MKN256C8 ******* SYSUT2 * rem * * *******rcsv* ********cbl* *******rffl* rem * * rem * ************ rem * * EOJ * rem * ************ rem * rem * ******************************************************************* rem * Prepare the environment... rem * set CmdName=MKN256W8 call ..\Env1BASE %CmdName% if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG rem * call SimoNOTE "*******************************************************%CmdName%" call SimoNOTE "Starting CmdName %CmdName%" call SimoNOTE "JobTopic Make Test files with Signed-Numeric values" rem * rem *-------------------------------------------------------------------* rem * Step 1 of 5, Create an LSEQ File with CSV records. rem * call SimoNOTE "StepInfo Create an LSEQ File with CSV records" set GETLS080=%BaseLib1%\DATA\WRK1\SIMOTIME.NBRTYPE.MKN080W1.txt set PUTRS080=%BaseLib1%\DATA\WRK1\SIMOTIME.NBRTYPE.MKN080W2.DAT rem * ....:....1....:....2....:....3....:....4....:....5....:....6....:....7. echo A,TAG00001,,127.22-,12.345-,12345.22-,123456-,12-, X>%GETLS080% echo 127.22,12.345,12345.22,123456,12,END00001 >>%GETLS080% echo A,TAG00002,,0-,1-,2-,3-,4-,0,1,2,3,4,END00002 >>%GETLS080% echo A, X>>%GETLS080% echo TAG00003, X>>%GETLS080% echo , X>>%GETLS080% echo 5-, X>>%GETLS080% echo 6-, X>>%GETLS080% echo 7-, X>>%GETLS080% echo 8-, X>>%GETLS080% echo 9-, X>>%GETLS080% echo 5, X>>%GETLS080% echo 6, X>>%GETLS080% echo 7, X>>%GETLS080% echo 8, X>>%GETLS080% echo 9, X>>%GETLS080% echo END00003 >>%GETLS080% rem * rem *-------------------------------------------------------------------* rem * Step 2 of 5, Convert LSEQ/80 with CSV records to RSEQ/80. rem * call SimoNOTE "StepInfo Convert LSEQ/1024 File with CSV records to RSEQ" if exist %PUTRS080% erase %PUTRS080% run CV80ALAR if not ERRORLEVEL = 0 set JobStatus=0010 if not %JobStatus% == 0000 goto :EojNok call SimoNOTE "DataMake %GETLS080%" call SimoNOTE "DataMake %PUTRS080%" if exist %PUTRS080% goto :NextStep3 set JobStatus=0020 goto :EojNok :NextStep3 rem * rem *-------------------------------------------------------------------* rem * Step 3 of 5, Convert RSEQ/80 with CSV records to RSEQ/1024. rem * call SimoNOTE "StepInfo Convert RSEQ/80 File RSEQ/1024" set SYSUT1=%PUTRS080% set SYSUT2=%BaseLib1%\DATA\WRK1\SIMOASC1.NBRTYPE.MKN01KD1.DAT if exist %SYSUT2% erase %SYSUT2% run SIMO801K if not ERRORLEVEL = 0 set JobStatus=0010 if not %JobStatus% == 0000 goto :EojNok call SimoNOTE "DataMake %SYSUT1%" call SimoNOTE "DataMake %SYSUT2%" if exist %SYSUT2% goto :NextStep4 set JobStatus=0030 goto :EojNok :NextStep4 rem * rem *-------------------------------------------------------------------* rem * Step 4 of 5, Convert RSEQ/1024/CSV to RSEQ/256/FFL/ASC. rem * call SimoNOTE "StepInfo Convert RSEQ/1024/CSV to RSEQ/256/FFL/ASC" set SYSUT1=%SYSUT2% set SYSUT2=%BaseLib1%\DATA\ASC1\SIMOASC1.NBRTYPE.SQA256D1.DAT if exist %SYSUT2% erase %SYSUT2% run MKN256C8 if exist %SYSUT2% goto :NextStep5 set JobStatus=0040 goto :EojNok :NextStep5 rem * rem *-------------------------------------------------------------------* rem * Step 5 of 5, Convert RSEQ/256/FFL/ASC to RSEQ/256/FFL/EBC. rem * call SimoNOTE "StepInfo Convert RSEQ/256/FFL/ASC to RSEQ/256/FFL/EBC" set SYSUT1=%SYSUT2% set SYSUT2=%BaseLib1%\DATA\EBC1\SIMOEBC1.NBRTYPE.SQE256D1.DAT if exist %SYSUT2% erase %SYSUT2% run CVN256C2 if exist %SYSUT2% goto :EojAok set JobStatus=0050 goto :EojNok rem * rem * ******************************************************************* rem * End of Job Processing... rem * :EojAok call SimoNOTE "DataMake %SYSUT2%" call SimoNOTE "Finished JobName %CmdName%, Job Status is %JobStatus%" goto :End :EojNok call SimoNOTE "ABENDING JobName %CmdName%, Job Status is %JobStatus%" :End if not "%1" == "nopause" pause
The following JCL Member (MKN256J8.jcl) will create user test files that contains text and numeric data strings.
//MKN256J8 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1 //* ******************************************************************* //* MKN256J8.JCL - a JCL Member for Batch Job Processing * //* This JCL Member is provided by SimoTime Technologies * //* (C) Copyright 1987-2019 All Rights Reserved * //* Web Site URL: http://www.simotime.com * //* e-mail: helpdesk@simotime.com * //* ******************************************************************* //* //* Text - Create Test Files for MKN256*.* Series. //* Author - SimoTime Technologies //* Date - January 24, 1996 //* //* This job is intended to run on a Linux, UNIX or Windows System //* with a Micro Focus Enterprise Server Instance that is configured //* for an ASCII-encoded environment. //* //* For additional information contact the helpdesk@simotime.com //* //* The 1st job step (JOBSETUP) will delete any previously created //* file. //* //* The 2nd job step (BUILDCSV) will create a file with 1024-byte //* records of text strings and numeric values of digits with an //* explicit decimal point and explicit sign character. //* //* The 3rd job step (BUILDFFL) will do a file structure and record //* content conversion from RSEQ/1024/CSV/ASC to RSEQ/256/FFL/ASC. //* //* The 4th job step (USERCONV) will do a record content conversion //* from RSEQ/256/FFL/ASC to RSEQ/256/FFL/EBC (ASCII to EBCDIC). //* //* This set of programs may be compiled and executed on a Linux, UNIX //* or Windows System with Micro Focus Enterprise Developer and may be //* adapted to run on an IBM Mainframe System. //* //* ******************************************************************* //* Step 1 of 4, Delete any previously created files. //* //JOBSETUP EXEC PGM=IEFBR14 //IEFUT1 DD DSN=SIMOTIME.HEXRCSV.MKN01KD1, // DISP=(MOD,DELETE,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=1024,DSORG=PS) //IEFUT2 DD DSN=SIMOTIME.HEXRSEQ.MKA256D1, // DISP=(MOD,DELETE,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=256,DSORG=PS) //IEFUT3 DD DSN=SIMOTIME.HEXRSEQ.MKE256D1, // DISP=(MOD,DELETE,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=256,DSORG=PS) //SYSOUT DD DSN=SIMOTIME.SYSOUT.MKN256J8, // DISP=(NEW,DELETE,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=121,DSORG=PS) //* //* ******************************************************************* //* Step 2 of 4, Create and populate a new RSEQ/CSV file, this step //* will read a file of 80-byte records with a few fields //* of data (1-71) and write to a file of 1024-byte //* records with many fields of data (1-1024). //* This following uses in-stream data. //* Note: The 1st record of the in-stream data has the //* character X in position 72. This indicates a //* continuation of data, the 2nd record of the in-stream //* data will be concatenated with the 1st record. //* //BUILDCSV EXEC PGM=SIMO801K //SYSOUT DD DSN=SIMOTIME.SYSOUT.MKN256J8, // DISP=(NEW,KEEP,KEEP), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=121,DSORG=PS) //* :....1....:....2....:....3....:....4....:....5....:....6....:....7. //SYSUT1 DD * A,TAG00001,,127.22-,12.345-,12345.22-,123456-,12-, X 127.22,12.345,12345.22,123456,12,END00001 A,TAG00002,,0-,1-,2-,3-,4-,0,1,2,3,4,END00002 A,TAG00003,,5-,6-,7-,8-,9-,5,6,7,8,9,END00003 /* //SYSUT2 DD DSN=SIMOTIME.HEXRCSV.MKN01KD1, // DISP=(NEW,CATLG,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=1024,DSORG=PS) //* //* ******************************************************************* //* Step 3 of 4, Convert RSEQ/1024/CSV to RSEQ/256/FFL/ASC. The record //* structure for the output file is determined by from a //* list of user defined field names and the picture //* clause from a user defined COBOL copy file. //* //BUILDFFL EXEC PGM=MKN256C8 //SYOUT DD SYSOUT=* //SYSPRINT DD SYSOUT=* //SYSUT1 DD DSN=SIMOTIME.HEXRCSV.MKN01KD1, // DISP=SHR //SYSUT2 DD DSN=SIMOTIME.HEXRSEQ.MKA256D1, // DISP=(NEW,CATLG,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=256,DSORG=PS) //* //* ******************************************************************* //* Step 4 of 4, Convert RSEQ/256/FFL/ASC to RSEQ/256/FFL/EBC. The //* record content conversion is done at the field level //* in order to maintain the mainframe numeric integrity //* of the Binary, Packed and Zoned-Decimal fields. //* //USERCONV EXEC PGM=CVN256C2 //SYOUT DD SYSOUT=* //SYSPRINT DD SYSOUT=* //SYSUT1 DD DSN=SIMOTIME.HEXRSEQ.MKA256D1, // DISP=SHR //SYSUT2 DD DSN=SIMOTIME.HEXRSEQ.MKE256D1, // DISP=(NEW,CATLG,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=256,DSORG=PS) //
The purpose of the preceding job was to create two User Test Files. The User Test Files are record sequential files. The record structure uses a Fixed-Field-Length (FFL) format with a physical record length of 256 bytes.
Since the User Test Files will contain a variety of numeric encoding schemas (or formats) many of the records will contain binary data. To properly view or analyze the records in the User Test Files will require a utility program with Hex-View or Hex-Dump capability.
A pre-generated hexadecimal dump program (HXN256C1) for record sequential files with 256-byte fixed length records is available from SimoTime. This utility provides four (4) lines of information for each record in a sequential file. The 1st line is the character interpretation for the ASCII encoding schema. The 2nd and 3rd lines are the hexadecimal dump information. The 4th line is the character interpretation for the EBCDIC encoding schema.
This utility program is used to provide the following views of the User Test Files.
The following sub-sections describe the approaches available to create and review the Hexadecimal Dump information that was produced for an ASCII-encoded user test file.
The following CMD file (HXN256W1.cmd) will read an ASCII-encoded test file and produce a HexDump file for viewing.
@echo OFF rem * ******************************************************************* rem * HXN256W1.CMD - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * rem * Text - Read RSEQ, write HEX-Dump RSEQ. rem * Author - SimoTime Technologies rem * Date - January 24, 1996 rem * rem * The job will read an ASCII-encoded record sequential file and rem * write to a new Hex-Dump record sequential file. rem * rem * ************ rem * * HXN256W1 * rem * ********cmd* rem * * rem * * rem * ************ rem * * ENV1BASE * rem * ********cmd* rem * * rem * * rem * ************ rem * * SimoNOTE * rem * ********cmd* rem * * rem * * rem * ************ rem * * CMD *---------------------------* rem * ********win* * rem * * ************ ************ ************ rem * * * INSTREAM *-----* ECHO *-----* GETLS080 * rem * * *******lseq* ********cmd* *******lseq* rem * * rem * * rem * ************ rem * * RUN *---------------------------* rem * ********rts* * rem * * ************ ************ ************ rem * * * GETLS080 *-----* CV80ALAR *-----* PUTRS080 * rem * * *******lseq* ********cmd* *******rseq* rem * * rem * * rem * ************ rem * * RUN *---------------------------* rem * ********rts* * rem * * ************ ************ rem * * * SYSUT1 *--*--* HXR256C1 * rem * * *******rseq* * ********cbl* rem * * * * rem * * ************ * ************ ************ rem * * * SYSUT3 *--* * SIMOV32K *-----* SYSPROBE * rem * * *******rseq* ********cbl* *******vseq* rem * ************ rem * * EOJ * rem * ************ rem * rem * ******************************************************************* rem * Set Environment Variables and map system file names. rem * call ..\Env1BASE set CmdName=HXN256W1 set SYSOUT=%BaseLib1%\LOGS\SYSOUT_%CmdName%.txt rem * call SimoNOTE "*******************************************************%CmdName%" call SimoNOTE "Starting JobName %CmdName%, User is %USERNAME%" rem * rem * ******************************************************************* rem * Step 1, Pipe records to LSEQ Control file using ECHO command rem * call SimoNOTE "Identify JobStep Step-1, Pipe records to LSEQ Control file using ECHO command" set GETLS080=%BaseLib1%\DATA\WRK1\SIMOTIME.HEXCNTL.MKN256U0.DAT echo /RANGE 2 10>%GETLS080% rem * rem * ******************************************************************* rem * Step 2, Read LSEQ, create an RSEQ Control file rem * call SimoNOTE "Identify JobStep Step-2, Read LSEQ, create an RSEQ Control file" set PUTRS080=%BaseLib1%\DATA\APPL\SIMOTIME.HEXCNTL.MKN256U1.DAT run CV80ALAR rem * rem * ******************************************************************* rem * Step 3, Read RSEQ Control and Data file, create Hex-Dump VREC rem * call SimoNOTE "Identify JobStep Step-3, Read RSEQ Control and Data file, create Hex-Dump VREC" set SYSUT1=%BaseLib1%\DATA\ASC1\SIMOASC1.HEXDATA.MKN256D1.DAT set SYSUT3=%PUTRS080% set SYSPROBE=%BaseLib1%\DATA\ASC1\SIMOASC1.HEXDUMP.MKN25601.DAT call SimoNOTE "DataTake RSEQ SYSUT1=%SYSUT1%" call SimoNOTE "RecRange RSEQ SYSUT3=%SYSUT3%" call SimoNOTE "DataDump VSEQ SYSPROBE=%SYSPROBE%" run HXR256C1 if not "%ERRORLEVEL%" == "0" set JobStatus=0010 if not "%JobStatus%" == "0000" goto EojNOK rem * rem * ******************************************************************* rem * End-of-Job processing... rem * :EojAOK call SimoNOTE "Finished CmdName %CmdName%, Job Status is %JobStatus%" goto :End :EojNOK call SimoNOTE "ABENDING CmdName %CmdName%, Job Status is %JobStatus%" echo %DATE% - %TIME% Starting User ABEND Processing...>>%SYSLOG% set >>%SYSLOG% echo %DATE% - %TIME% Complete User ABEND Processing...>>%SYSLOG% goto :End :End call SimoNOTE "Conclude SYSOUT is %SYSOUT%" if not "%1" == "nopause" pause exit /B %JobStatus%
The following JCL Member (HXN256J1.jcl) will read an ASCII-encoded test file and produce a HexDump file for viewing.
//HXN256J21 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1 //* ******************************************************************* //* HXN256J1.jcl - a JCL Member for Batch Job Processing * //* This JCL Member is provided by SimoTime Technologies * //* (C) Copyright 1987-2019 All Rights Reserved * //* Web Site URL: http://www.simotime.com * //* e-mail: helpdesk@simotime.com * //* ******************************************************************* //* //* Text - Hex-Dump of Sequential file containing 256-byte records. //* Author - SimoTime Technologies //* Date - January 24, 1996 //* //* This job will read an ASCII-encoded record sequential file. //* Step 1, JOBSETUP will delete any previously. //* Step 2, HEXDUMP1 will produce a Hex-Dump of the user data file. //* //* This set of programs will run on a mainframe under ZOS or on a //* Windows System and Micro Focus Enterprise Server or Studio. //* //* 1. Demonstrate how to use IEFBR14 with DD statements to delete //* files that have been created by a previous execution of this //* job. //* 5. Demonstrate how to create a Hexadecimal Dump of a Sequential //* file containing 256-byte, fixed-length records. //* //* ******************************************************************* //* Step 1 of 2, Delete any previously created file... //* //JOBSETUP EXEC PGM=IEFBR14 //IEFUT1 DD DSN=SIMOTIME.HEXDUMP.MKA256D1, // DISP=(MOD,DELETE,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=256,DSORG=PS) //SYSPROBE DD DSN=SIMOTIME.HEXDUMP.MKA256V1, // DISP=(MOD,DELETE,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=V,LRECL=32760,DSORG=PS) //* //* ******************************************************************* //* Step 2 of 2, Produce a Hex-Dump of the ASCII-encoded file... //* //HEXDUMP1 EXEC PGM=HXR256C1 //SYSUT1 DD DSN=SIMOTIME.HEXRSEQ.MKA256D1, // DISP=SHR //SYSUT2 DD DSN=SIMOTIME.HEXDUMP.MKA256D1, // DISP=(NEW,CATLG,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=256,DSORG=PS) //SYSPROBE DD DSN=SIMOTIME.HEXDUMP.MKA256V1, // DISP=(NEW,CATLG,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=V,LRECL=32760,DSORG=PS) //SYSOUT DD SYSOUT=* //* //
The following is the Hexadecimal Dump information that was produced using an ASCII-encoded user test file.
******************************************************************************* * HXR256C1 Batch, HEX-Dump for RSEQ LRECL=256 v15.09.23 helpdesk@simotime.com * HXR256C1 This Data File HexDump Member was generated by SimoTime Technologies ******************************************************************************* Starting - Batch, HEX-Dump for RSEQ LRECL=256 http://www.SimoTime.com * ....:...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...... ATAG00001 ÿÿÎNÿÿÏÇÿí)¦ÿ..Àÿô..1...09..ÖZ..â@.....r-.4].4R-.#Em.-...r/.4_.4R/.#Eo./00001272r1234u123452r12345v1r00001272212345123452212345612 END00001 45443333322222222222222222222222FFC4FFCCFE2AFF1CFF003B003301D500E40000172135135202460200172135135202460233333333733337333333733333737333333333333333333333333333332222222222222222222222222222222222222222222222222222222222222222222222222222222222222244433333 14170000100000000000000000000000FFEEFFF7FD96FED0F400120009026A01200C0022D24D242D135D1D0022F24F242F135F1F0000127221234512345221234561200001272212345123452212345612000000000000000000000000000000000000000000000000000000000000000000000000000000000000005E400001 .è.å.....€€€€€€€€€€€€€€€€€€€€€€€ŸŸó+ŸŸõGŸÒ.wŸÚ.{Ÿ4...¥......O!..S .....Ê...)..ê...á_.....Ê...¬..ê...á?..........Ê....Í......Ê.....Î.Ê.............................€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€á+à..... * ....:...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...... ATAG00002 ....ÿÿü.ÿÿÿ8ÿÿÿýÿü.......è...È................ ....=.M.......... ....?.O0000000000100p000020p00000s0t00000000001000000020000000304 END00002 454433333222222222222222222222220000FFF1FFF3FFFFFF0000000E000C00000000000000002000030400000000002000030433333333333337333333733333737333333333333333333333333333332222222222222222222222222222222222222222222222222222222222222222222222222222222222222244433333 141700002000000000000000000000000000FFC8FFF8FFFDFC0000003800080003040000C10D000D000D0D0000F10F000F000F0F0000000000100000002000000030400000000001000000020000000304000000000000000000000000000000000000000000000000000000000000000000000000000000000000005E400002 .è.å.....€€€€€€€€€€€€€€€€€€€€€€€....ŸŸÜ.ŸŸŸ.ŸŸŸÙŸÜ.......Y...H................€......(..........€......|.............ø......ø.....Ë.È.............................€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€á+à..... * ....:...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...... ATAG00003 ÿÿ..ÿÿè.ÿÿýDÿÿÿøÿ....ô...p.............P......p..........P......p......Ÿ00000050p0600p000070p00000x0y00000050006000000070000000809 END00003 45443333322222222222222222222222FFF0FFE9FFF4FFFFFF000F0017000B00000000050000007000080900050000007000080933333333733337333333733333737333333333333333333333333333332222222222222222222222222222222222222222222222222222222222222222222222222222222222222244433333 14170000300000000000000000000000FFECFF80FFD4FFF8F700140070002C0008090000D60D000D000D0D0000F60F000F000F0F0000005000600000007000000080900000050006000000070000000809000000000000000000000000000000000000000000000000000000000000000000000000000000000000005E400003 .è.å.....€€€€€€€€€€€€€€€€€€€€€€€ŸŸÚ.ŸŸY.ŸŸÙàŸŸŸ8Ÿ7...4...ø.............&......ø....ý.....&......ø....+..........ø....ø......ø.....Ì.`.............................€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€á+à..... ******************************************************************************* Conclude - Batch, HEX-Dump for RSEQ LRECL=256 000000003 - Record count for SYSUT1 000000000 - Record count for SYSUT2
The following sub-sections describe the approaches available to create and review the Hexadecimal Dump information that was produced for an EBCDIC-encoded user test file.
The following CMD file (HXN256W2.cmd) will read an EBCDIC-encoded test file and produce a HexDump file for viewing.
@echo OFF rem * ******************************************************************* rem * HXN256W2.CMD - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * rem * Text - Read RSEQ, write HEX-Dump RSEQ. rem * Author - SimoTime Technologies rem * Date - January 24, 1996 rem * rem * The job will read an EBCDIC-encoded record sequential file and rem * write to a new Hex-Dump record sequential file. rem * rem * ************ rem * * HXN256W2 * 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 *--*--* HXR256C1 * rem * * *******rseq* * ********cbl* rem * * * * rem * * ************ * ************ ************ rem * * * SYSUT3 *--* * SIMOV32K *-----* SYSPROBE * rem * * *******rseq* ********cbl* *******vseq* rem * ************ rem * * EOJ * rem * ************ rem * rem * ******************************************************************* rem * Step 1, Set Environment Variables, map file names. rem * Delete any previously created ASCII-encoded file... em * call ..\Env1BASE set CmdName=HXN256W2 set SYSOUT=%BaseLib1%\LOGS\SYSOUT_%CmdName%.txt rem * call SimoNOTE "*******************************************************%CmdName%" call SimoNOTE "Starting JobName %CmdName%, User is %USERNAME%" call SimoNOTE "Identify JobStep Step-1, Housekeeping tasks" set SYSUT1=%BaseLib1%\DATA\EBC1\SIMOEBC1.HEXDATA.MKN256D1.DAT set SYSUT3=%BaseLib1%\DATA\APPL\SIMOTIME.HEXDUMP.MKN256D2.DAT set SYSPROBE=%BaseLib1%\DATA\APPL\SIMOTIME.HEXDUMP.MKN25601.DAT rem * rem * ******************************************************************* rem * Step 3, Read RSEQ, create a new Hex-Dump VREC rem * call SimoNOTE "Identify JobStep Step-3, Execute Hex-Dump Program" call SimoNOTE "DataTake RSEQ SYSUT1=%SYSUT1%" call SimoNOTE "RecRange RSEQ SYSUT3=%SYSUT3%" call SimoNOTE "DataDump VSEQ SYSPROBE=%SYSPROBE%" run HXR256C1 if not "%ERRORLEVEL%" == "0" set JobStatus=0010 if not "%JobStatus%" == "0000" goto EojNOK rem * rem * ******************************************************************* rem * Step 4, End-of-Job processing... rem * :EojAOK call SimoNOTE "Finished CmdName %CmdName%, Job Status is %JobStatus%" goto :End :EojNOK call SimoNOTE "ABENDING CmdName %CmdName%, Job Status is %JobStatus%" echo %DATE% - %TIME% Starting User ABEND Processing...>>%SYSLOG% set >>%SYSLOG% echo %DATE% - %TIME% Complete User ABEND Processing...>>%SYSLOG% goto :End :End call SimoNOTE "Conclude SYSOUT is %SYSOUT%" if not "%1" == "nopause" pause exit /B %JobStatus%
The following JCL Member (HXN256J2.jcl) will read an EBCDIC-encoded test file and produce a HexDump file for viewing.
//HXN256J2 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1 //* ******************************************************************* //* HXN256J2.jcl - a JCL Member for Batch Job Processing * //* This JCL Member is provided by SimoTime Technologies * //* (C) Copyright 1987-2019 All Rights Reserved * //* Web Site URL: http://www.simotime.com * //* e-mail: helpdesk@simotime.com * //* ******************************************************************* //* //* Text - Hex-Dump of Sequential file containing 256-byte records. //* Author - SimoTime Technologies //* Date - January 24, 1996 //* //* This job will read an EBCDIC-encoded record sequential file. //* Step 1, JOBSETUP will delete any previously. //* Step 2, HEXDUMP1 will produce a Hex-Dump of the merged file. //* //* This set of programs will run on a mainframe under ZOS or on a //* Windows System and Micro Focus Enterprise Server or Studio. //* //* 1. Demonstrate how to use IEFBR14 with DD statements to delete //* files that have been created by a previous execution of this //* job. //* 5. Demonstrate how to create a Hexadecimal Dump of a Sequential //* file containing 256-byte, fixed-length records. //* //* ******************************************************************* //* Step 1 of 2, Delete any previously created file... //* //JOBSETUP EXEC PGM=IEFBR14 //IEFUT1 DD DSN=SIMOTIME.HEXDUMP.MKE256D1, // DISP=(MOD,DELETE,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=256,DSORG=PS) //SYSPROBE DD DSN=SIMOTIME.HEXDUMP.MKE256V1, // DISP=(MOD,DELETE,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=V,LRECL=32760,DSORG=PS) //* //* ******************************************************************* //* Step 2 of 2, Produce a Hex-Dump of the EBCDIC-encoded file... //* //HEXDUMP1 EXEC PGM=HXR256C1 //SYSUT1 DD DSN=SIMOTIME.HEXRSEQ.MKE256D1, // DISP=SHR //SYSUT2 DD DSN=SIMOTIME.HEXDUMP.MKE256D1, // DISP=(NEW,CATLG,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=256,DSORG=PS) //SYSPROBE DD DSN=SIMOTIME.HEXDUMP.MKE256V1, // DISP=(NEW,CATLG,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=V,LRECL=32760,DSORG=PS) //SYSOUT DD SYSOUT=* //* //
The following is the Hexadecimal Dump information that was produced using an EBCDIC-encoded user test file.
******************************************************************************* * HXR256C1 Batch, HEX-Dump for RSEQ LRECL=256 v15.09.23 helpdesk@simotime.com * HXR256C1 This Data File HexDump Member was generated by SimoTime Technologies ******************************************************************************* Starting - Batch, HEX-Dump for RSEQ LRECL=256 http://www.SimoTime.com * ....:...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...... ÁãÁÇ....ñ@@@@@@@@@@@@@@@@@@@@@@@ÿÿÎNÿÿÏÇÿí)¦ÿ..Àÿô..1...09..ÖZ..â@.....r-.4].4R-.#Em.-...r/.4_.4R/.#Eo./....ñò.òÒñòóôÕñòóôõòÒñòóôõÖñÒ....ñò.òòñòóôõñòóôõòòñòóôõöñò@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ÅÕÄ....ñ CECCFFFFF44444444444444444444444FFC4FFCCFE2AFF1CFF003B003301D500E400001721351352024602001721351352024602FFFFFFFFDFFFFDFFFFFFDFFFFFDFDFFFFFFFFFFFFFFFFFFFFFFFFFFFFF44444444444444444444444444444444444444444444444444444444444444444444444444444444444444CDCFFFFF 13170000100000000000000000000000FFEEFFF7FD96FED0F400120009026A01200C0022D24D242D135D1D0022F24F242F135F1F00001272212345123452212345612000012722123451234522123456120000000000000000000000000000000000000000000000000000000000000000000000000000000000000055400001 ATAG00001 ŸŸó+ŸŸõGŸÒ.wŸÚ.{Ÿ4...¥......O!..S .....Ê...)..ê...á_.....Ê...¬..ê...á?..00001272K1234N123452K12345O1K00001272212345123452212345612 END00001 * ....:...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...... ÁãÁÇ....ò@@@@@@@@@@@@@@@@@@@@@@@....ÿÿü.ÿÿÿ8ÿÿÿýÿü.......è...È................ ....=.M.......... ....?.O..........ñ.......ò.......Ó.Ô..........ñ.......ò.......ó.ô@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ÅÕÄ....ò CECCFFFFF444444444444444444444440000FFF1FFF3FFFFFF0000000E000C000000000000000020000304000000000020000304FFFFFFFFFFFFFDFFFFFFDFFFFFDFDFFFFFFFFFFFFFFFFFFFFFFFFFFFFF44444444444444444444444444444444444444444444444444444444444444444444444444444444444444CDCFFFFF 131700002000000000000000000000000000FFC8FFF8FFFDFC0000003800080003040000C10D000D000D0D0000F10F000F000F0F00000000001000000020000000304000000000010000000200000003040000000000000000000000000000000000000000000000000000000000000000000000000000000000000055400002 ATAG00002 ....ŸŸÜ.ŸŸŸ.ŸŸŸÙŸÜ.......Y...H................€......(..........€......|0000000000100}000020}00000L0M00000000001000000020000000304 END00002 * ....:...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...... ÁãÁÇ....ó@@@@@@@@@@@@@@@@@@@@@@@ÿÿ..ÿÿè.ÿÿýDÿÿÿøÿ....ô...p.............P......p..........P......p......Ÿ......õ...ö...............Ø.Ù......õ...ö...............ø.ù@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ÅÕÄ....ó CECCFFFFF44444444444444444444444FFF0FFE9FFF4FFFFFF000F0017000B000000000500000070000809000500000070000809FFFFFFFFDFFFFDFFFFFFDFFFFFDFDFFFFFFFFFFFFFFFFFFFFFFFFFFFFF44444444444444444444444444444444444444444444444444444444444444444444444444444444444444CDCFFFFF 13170000300000000000000000000000FFECFF80FFD4FFF8F700140070002C0008090000D60D000D000D0D0000F60F000F000F0F00000050006000000070000000809000000500060000000700000008090000000000000000000000000000000000000000000000000000000000000000000000000000000000000055400003 ATAG00003 ŸŸÚ.ŸŸY.ŸŸÙàŸŸŸ8Ÿ7...4...ø.............&......ø....ý.....&......ø....+..00000050}0600}000070}00000Q0R00000050006000000070000000809 END00003 ******************************************************************************* Conclude - Batch, HEX-Dump for RSEQ LRECL=256 000000003 - Record count for SYSUT1 000000000 - Record count for SYSUT2
In today's environments there are a variety of data validation alternatives. This section will focus on three popular techniques. The 1st technique is Human Observation. The 2nd is a Data File Compare. The 3rd is the accumulation and review of Summary Totals.
One approach to application or data validation is human observation or analysis. This approach is very useful when evaluating the usability and business flow of an application.
Using this approach for data validation presents the following challenges.
1. | Introduces additional risk of human error. |
2. | May be useful for small amounts of data. As the volume of data increases the reliability of the "human observation" approach decreases. |
3. | Data strings with binary content is not easy to interpret and can be presented in a misleading manner when using a text editor. |
4. | The structure of some data strings may require specialized knowledge to properly interpret. |
5. | A "hexadecimal dump" presentation of the data may be required. |
Because of these challenges the "human observation" approach is considered as a "reasonability check" or "diagnostic aid". Typically, a programmatic methodology that can be automated and run without human intervention will be a requirement.
The "Data File Compare" approach is very popular when doing regression testing. At the conclusion of a regression test a copy of a file that contains the "expected" results is compared with the file (actual results) created or updated during the regression test.
This approach first appeared when users began running applications that created sub-totals and final totals for numeric items. The reports and totals were then manually reviewed by the finance business group. Doing this for currency values quickly became a mandatory requirement.
The use of reports produced by a application remains a very effective validation approach. However, if a problem occurs the problem determination can be very time consuming based on the size and complexity of the application code and data structures.
Therefore, a technology that will focus on the processing of the numeric structures and produce summary totals with record counts could be very useful. SimoTime has the technology to do this by generating COBOL programs that will read a file and produce summary totals based on the user selecting the fields from a COBOL copy file definition of the record layout.
This section provides a closer look at the system environments, component structures and processing techniques used with this suite of programs.
A COBOL Copy File is used to define the record structure for each of the test files that are used by this suite of programs.
The following source member (MKN256B1.cpy) is the COBOL Copy File that defines the record structure for the test file that contains text strings and numeric fields of various formats such as BINARY, PACKED-Decimal and ZONED-Decimal.
***************************************************************** * MKN256B1.cpy - a COBOL Copy File * * Copy File for testing of Text Strings and Numeric Formats. * ***************************************************************** * Copyright (C) 1987-2019 SimoTime Technologies * * All Rights Reserved * ***************************************************************** * Provided by SimoTime Technologies * * Our e-mail address is: helpdesk@simotime.com * * Also, visit our Web Site at http://www.simotime.com * ***************************************************************** 01 MKN-RECORD. 05 MKN-TEXT. 10 MKN-ID PIC X. 10 MKN-TAG PIC X(08). 10 MKN-COMMENT PIC X(23). * * ------------------------------------------------------------- * * A group of SIGNED and UNSIGNED Numbers using a * COMPUTATIONAL format. * The physical structure is Binary. * An abbreviated form of the USAGE IS COMPUTATIONAL clause * is simply coded in COMP. * An following statement is an example of the full sysntax. * 01 FIELD-NAME PIC S9(5)V99 USAGE IS COMPUTATIONAL. * 05 MKN-BS-NBRS. 10 MKN-BS-72 PIC S9(7)V99 COMP. 10 MKN-BS-23 PIC S9(2)V999 COMP. 10 MKN-BS-52 PIC S9(5)V99 COMP. 10 MKN-BS-60 PIC S9(6) COMP. 10 MKN-BS-20 PIC S99 COMP. 05 MKN-BU-NBRS. 10 MKN-BU-72 PIC 9(7)V99 COMP. 10 MKN-BU-23 PIC 9(2)V999 COMP. 10 MKN-BU-52 PIC 9(5)V99 COMP. 10 MKN-BU-60 PIC 9(6) COMP. 10 MKN-BU-20 PIC 99 COMP. * * ------------------------------------------------------------- * * A group of SIGNED and UNSIGNED Numbers using a * COMPUTATIONAL-3 format. * The physical structure is Packed Decimal. * An abbreviated form of the USAGE IS COMPUTATIONAL-3 clause * is simply coded in COMP-3. * An following statement is an example of the full sysntax. * 01 FIELD-NAME PIC S9(5)V99 USAGE IS COMPUTATIONAL-3. * 05 MKN-PS-NBRS. 10 MKN-PS-72 PIC S9(7)V99 COMP-3. 10 MKN-PS-23 PIC S9(2)V999 COMP-3. 10 MKN-PS-52 PIC S9(5)V99 COMP-3. 10 MKN-PS-60 PIC S9(6) COMP-3. 10 MKN-PS-20 PIC S99 COMP-3. 05 MKN-PU-NBRS. 10 MKN-PU-72 PIC 9(7)V99 COMP-3. 10 MKN-PU-23 PIC 9(2)V999 COMP-3. 10 MKN-PU-52 PIC 9(5)V99 COMP-3. 10 MKN-PU-60 PIC 9(6) COMP-3. 10 MKN-PU-20 PIC 99 COMP-3. * * ------------------------------------------------------------- * * A group of SIGNED and UNSIGNED Numbers using a * DISPLAY format. * The physical structure is Zoned Decimal. * The USAGE IS DISPLAY clause is the default value and * is typically not hard coded. * An following statement is an example of the full sysntax. * 01 FIELD-NAME PIC S9(5)V99 USAGE IS DISPLAY. * 05 MKN-ZS-NBRS. 10 MKN-ZS-72 PIC S9(7)V99. 10 MKN-ZS-23 PIC S9(2)V999. 10 MKN-ZS-52 PIC S9(5)V99. 10 MKN-ZS-60 PIC S9(6). 10 MKN-ZS-20 PIC S99. 05 MKN-ZU-NBRS. 10 MKN-ZU-72 PIC 9(7)V99. 10 MKN-ZU-23 PIC 9(2)V999. 10 MKN-ZU-52 PIC 9(5)V99. 10 MKN-ZU-60 PIC 9(6). 10 MKN-ZU-20 PIC 99. * 05 FILLER PIC X(86). * * ------------------------------------------------------------- * * A Text string to tag the end of a record. * 05 MKN-TEXT-END. 10 MKN-END PIC X(8). * *** MKN256B1 - End-of-Copy File - - - - - - - - - - - MKN256B1 * ***************************************************************** *
The following link provides additional documentation for the COBOL copy file (MKN256B1.cpy) that defines the record structure for a test file that contains the Binary, Signed numeric fields.
Explore numeric values that use the BINARY, PACKED and ZONED format. This HTML document was generated by SimoTime Technologies and uses the field definitions included in a user-defined COBOL copy file to calculate additional information such as the field positions within the record.
This section provides additional detail about the secondary CMD files and programs that are used in this set of sample programs.
A command file (ENV1BASE.cmd) is called from other command files to set commonly used environment variables. This provides a single point of definition. The following is a listing of the contents of the command file.
@echo OFF rem * ******************************************************************* rem * ENV1BASE.cmd - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2021 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * rem * Text - Provide a single point to set common environment variables. rem * Author - SimoTime Technologies rem * Date - January 24, 1996 rem * rem * Set the commonly used environment variables. This is used to provide rem * a single point for managing the commonly used environment variables. rem * set SimoLIBR=c:\SimoLIBR set BASELIB1=c:\SIMOSAM1\DEVL set BASELIB8=c:\SimoSAM8 set BaseWIP1=c:\SimoSAM1\WIP1 set DATAZERO=c:\SIMODATA\DEVL\DATA\ZERO set BASEAPP=%BaseLib1% set BASESYS=%BaseLib1%\SYS1 set BASECAT=%BaseLib1%\DATA set UMAPALIB=%BASECAT%\ASC1 set UMAPELIB=%BASECAT%\EBC1 set SYSLOG=%BASESYS%\LOGS\SYSLOG_USER.DAT set SYSOUT=%BASEAPP%\LOGS\SYSOUT_SIMSAM01.txt set SLZMSG=%BASEAPP%\LOGS\SLZMSG_USER.TXT set PostNOTE=%BASEAPP%\LOGS\JOBLOG_SIMONOTE.TXT set SIMONOTE=%BASEAPP%\LOGS\JOBLOG_SIMONOTE.txt set USERPOST=%BASEAPP%\LOGS\ASSIGNED_USER_POST_FILE.txt if [%1]==[] goto NO_POST set SYSOUT=%BaseLib1%\LOGS\SYSOUT_%1.txt call SIMONOTE "+ ENV1BASE *" call SIMONOTE "+ ENV1BASE ********************************************************************%1" call SIMONOTE "+ ENV1BASE is preparing the System Environment..." call SIMONOTE "+ SIMOLIBR is %SIMOLIBR%" call SIMONOTE "+ MIFOSYS1 is %MIFOSYS1%" call SIMONOTE "+ BASELIB1 is %BASELIB1%" :NO_POST call SIMONOTE "+ SIMONOTE Job Log File is %SIMONOTE% " rem * set MQBASE=C:\Program Files\IBM\WebSphere MQ rem * rem * Set the location for the Apache-Tomcat Server... set CATALINA_HOME=C:\APACHETC\apache-tomcat-7.0.52 rem set CATALINA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_112 rem * rem * Set the Environment for the Java Environment... rem set JAVABASE=C:\APACHETC\apache-tomcat-7.0.52 set JAVABASE=C:\Program Files (x86)\Java\jdk1.8.0_112 set JAVASDK="%JAVABASE%\bin" set JAVA_HOME=%JAVABASE% set JRE_HOME=%JAVABASE% set SIMOTCAT=%CATALINA_HOME%\webapps\simotcat set SIMPACKS=%CATALINA_HOME%\webapps\simotcat\WEB-INF\classes\simpacks rem * rem * Set the environment for the Micro Focus technology... set MIFOEDEV=C:\Program Files (x86)\Micro Focus\Enterprise Developer set MIFOVCBL=C:\Program Files (x86)\Micro Focus\Visual COBOL Build Tools set MIFOESTU=C:\Program Files (x86)\Micro Focus\Studio Enterprise Edition 6.0 set MIFOEMFE="C:\Program Files (x86)\Micro Focus\Mainframe Express" rem * rem * Large file support, performance tuning and record locking of the File Handler set EXTFH=%BASESYS%\CONFIG\EXTFHBIG.CFG rem * rem * For IMS Support set ES_IMSLIB=%BASEAPP%\IMSLIB set ES_ACBLIB=%BASEAPP%\IMSLIB rem * rem * EZASOKETS Check EZASOKETS Enabled box or set ES_EZASOKET_SUPPORT=YES set EZACONFG=BASESYS1\CONFIG\EZACONFG.dat rem * rem * Resource Allocation and Performance for SORT and non-Relational Data rem set MFJSENGINE=SYNCSORT set SORTSCHEME=1 set SORTSPACE=750000000 set TMP=C:\SORTWORK rem * set ES_ALLOC_OVERRIDE=%BASESYS%\CONFIG\CATMAPA1.cfg rem * For CORE_ON_ERROR function, ABEND Dump rem * set COBCONFIG_=%BASESYS%\CONFIG\diagnose.cfg rem * rem * Consolidated Trace Facility (CTF) rem * set MFTRACE_CONFIG=%BASESYS%\CONFIG\ctf.cfg rem * set MFTRACE_LOGS=c:\ctflogs rem * rem * For Job Restart, ABEND Recovery set MF_UCC11=Y set ES_JES_RESTART=Y rem * rem * Set environment for MFBSI (Micro Focus Batch Scheduling Interface) set ES_EMP_EXIT_1=mfbsiemx set MFBSI_DIR=%BASESYS%\LOGS\%JESSERVERNAME% set MFBSIEOP_CMD=ENABLE set MFBSIEOP_CSV=ENABLE set MFBSIEOP_HTM=ENABLE set MFBSIEOP_XML=ENABLE rem * rem * Set Behavior and Trace Flags for GETJOBDD rem * Position=12345678/12345678 set JDDFLAGS=nnnWnnnn/YYnnnnnn rem * rem * If not already set then set the PATH for Micro Focus Directories if "%SIMOPATH%" == "Y" goto JUMPPATH if "%MIFOSYS1%" == "EDEV" goto JUMPEDEV if "%MIFOSYS1%" == "VCBL" goto JUMPVCBL if "%MIFOSYS1%" == "ESTU" goto JUMPESTU if "%MIFOSYS1%" == "EMFE" goto JUMPEMFE :JUMPEDEV set path=%BASESYS%\LOADLIB;%MIFOEDEV%\bin;%JAVASDK%;%BASEAPP%\JAVA;%PATH%; set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOEDEV%\CPYLIB set MIFOBASE=%MIFOEDEV% goto JUMPPATH :JUMPVCBL set path=%MIFOVCBL%\bin;%MIFOVCBL%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%; set MIFOBASE=%MIFOVCBL% goto JUMPPATH :JUMPESTU set MIFOBASE=%MIFOESTU%\Base set MIFOBIN=%MIFOBASE%\bin set path=%BASESYS%\LOADLIB;%MIFOBASE%;%MIFOBIN%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%; set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOBASE%\SOURCE goto JUMPPATH :JUMPEMFE set MIFOBASE=%MIFOEMFE%\Base set MIFOBIN=%MIFOBASE%\bin set path=%BASESYS%\LOADLIB;%MIFOBASE%;%MIFOBIN%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%; set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOBASE%\SOURCE goto JUMPPATH rem * :JUMPPATH set SIMOPATH=Y rem * set MAINFRAME_FLOATING_POINT=true set COBIDY=%BASEAPP%\COBIDY set COBPATH=.;%BASEAPP%\LOADLIB;%BASEAPP%\LOADLIB\GNTS;%BASESYS%\LOADLIB;%SimoLIBR% set LIBPATH=.;%BASEAPP%\LOADLIB;%BASEAPP%\LOADLIB\GNTS;%BASESYS%\LOADLIB;%SimoLIBR% set TXDIR=%BASESYS%\LOADLIB;%MIFOBASE% set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR% rem * set USERCLASS=%BASELIB1%\LOADLIB set CLASSPATH=. set CLASSPATH=%CLASSPATH%;%JAVABASE% set CLASSPATH=%CLASSPATH%;%JAVABASE%\lib set CLASSPATH=%CLASSPATH%;\%USERCLASS%\simpacks set CLASSPATH=%CLASSPATH%;C:\APACHETC\apache-tomcat-7.0.52\webapps\simotcat\WEB-INF\classes set CLASSPATH=%CLASSPATH%;C:\APACHETC\apache-tomcat-7.0.52\webapps\simotcat\WEB-INF\classes\simpacks rem * if "%MIFOSYS1%" == "ESTU" set CLASSPATH=%CLASSPATH%;%MIFOBIN% if "%MIFOSYS1%" == "EDEV" set CLASSPATH=%CLASSPATH%;%MIFOEDEV% if "%MIFOSYS1%" == "VCBL" set CLASSPATH=%CLASSPATH%;%MIFOVCBL% if "%MIFOSYS1%" == "VCBL" set CLASSPATH=%CLASSPATH%;%MIFOVCBL%\bin\mfcobol.jar rem * set JobStatus=0000 call SIMONOTE "+ ENV1BASE is returning to caller"
The following CMD File (SIMONOTE.cmd) is called from other command files to consistently display messages and write to a log file. The following is a listing of the contents of the command file.
@echo OFF rem * ******************************************************************* rem * SIMONOTE.cmd - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * rem * Text - Display message on screen and write to a log file. rem * Author - SimoTime Technologies rem * rem * This script may be called from other scripts and expects a single rem * parameter enclosed in double quotes. The double quotes will be rem * removed. Before writing to the log file a date and time stamp rem * will be inserted in front of the message text. rem * rem * Note: The tilde (~) removes leading/trailing double-quotes. rem * if "%SimoNOTE%" == "" set SimoNOTE=c:\SimoLIBR\LOGS\SimoTime.LOG echo %date% %time% %~1>> %SimoNOTE% echo %~1
The purpose of this document is to assist as a tutorial for new programmers or as a quick reference for experienced programmers.
In the world of programming there are many ways to solve a problem. This documentation and software were developed and tested on systems that are configured for a SIMOTIME environment based on the hardware, operating systems, user requirements and security requirements. Therefore, adjustments may be needed to execute the jobs and programs when transferred to a system of a different architecture or configuration.
SIMOTIME Services has experience in moving or sharing data or application processing across a variety of systems. For additional information about SIMOTIME Services or Technologies please contact us using the information in the Contact or Feedback section of this document.
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.
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.
The following links may be to the current server or to the Internet.
Note: The latest versions of the SimoTime Documents and Program Suites are available on the Internet and may be accessed using the icon. If a user has a SimoTime Enterprise License the Documents and Program Suites may be available on a local server and accessed using the icon.
Explore the Numbers Connection for additional information about the structure and processing of numeric data items (or numeric fields).
Explore The Binary or COMP format for numeric data strings. This numeric structure is supported by COBOL and may be explicitly defined with the "USAGE IS COMP" or "USAGE IS BINARY" clause.
Explore The Edited for Display format for numeric data strings. This numeric structure is supported by COBOL and may be used with an edit-mask to prepare the presentation for readability by human beings.
Explore The Packed-Decimal or COMP-3 format for numeric data strings. This numeric structure is supported by COBOL and may be explicitly defined with the "USAGE IS COMP-3" clause.
Explore The Zoned-Decimal format for numeric data strings. This numeric structure is the default numeric for COBOL and may be explicitly defined with the "USAGE IS DISPLAY" clause.
Explore the JCL Connection for more examples of JCL functionality with programming techniques and sample code.
Explore the COBOL Connection for more examples of COBOL programming techniques and sample code.
Explore An Enterprise System Model that describes and demonstrates how Applications that were running on a Mainframe System and non-relational data that was located on the Mainframe System were copied and deployed in a Microsoft Windows environment with Micro Focus Enterprise Server.
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 that are used to interpret the results of accessing VSAM data sets and/or QSAM files.
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 Glossary of Terms for a list of terms and definitions used in this suite of documents and white papers.
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.
SimoTime Technologies was founded in 1987 and is a privately owned company. We specialize in the creation and deployment of business applications using new or existing technologies and services. We have a team of individuals that understand the broad range of technologies being used in today's environments. Our customers include small businesses using Internet technologies to corporations using very large mainframe systems.
Quite often, to reach larger markets or provide a higher level of service to existing customers it requires the newer Internet technologies to work in a complementary manner with existing corporate mainframe systems. We specialize in preparing applications and the associated data that are currently residing on a single platform to be distributed across a variety of platforms.
Preparing the application programs will require the transfer of source members that will be compiled and deployed on the target platform. The data will need to be transferred between the systems and may need to be converted and validated at various stages within the process. SimoTime has the technology, services and experience to assist in the application and data management tasks involved with doing business in a multi-system environment.
Whether you want to use the Internet to expand into new market segments or as a delivery vehicle for existing business functions simply give us a call or check the web site at http://www.simotime.com
Return-to-Top |
Data Files with Numeric Values, Zoned Decimal, Packed and Binary |
Copyright © 1987-2025 SimoTime Technologies and Services All Rights Reserved |
When technology complements business |
http://www.simotime.com |