Validate Numeric Integrity
Convert CSV to Binary, Packed & Zoned
  Table of Contents  v-24.01.01 - numbnt01.htm 
  Introduction
  Considerations
  Document Organization
  Numeric Integrity
  BINARY Numeric Structures
  BINARY, Signed Numeric
  CMD to Calculate Summary Totals
  JCL to Calculate Summary Totals
  Results for BINARY, Signed Numeric
  BINARY, Unsigned Numeric
  CMD to Calculate Summary Totals
  JCL to Calculate Summary Totals
  Results for BINARY, Unsigned Numeric
  PACKED-Decimal Numeric Structures
  PACKED, Signed Numeric
  CMD to Calculate Summary Totals
  JCL to Calculate Summary Totals
  Results for PACKED, Signed Numeric
  PACKED, Unsigned Numeric
  CMD to Calculate Summary Totals
  JCL to Calculate Summary Totals
  Results for PACKED, Unsigned Numeric
  ZONED-Decimal Numeric Structures
  ZONED, Signed Numeric
  CMD to Calculate Summary Totals
  JCL to Calculate Summary Totals
  Results for ZONED, Signed Numeric
  ZONED, Unsigned Numeric
  CMD to Calculate Summary Totals
  JCL to Calculate Summary Totals
  Results for ZONED, Unsigned Numeric
  Data Validation Techniques
  Human Observation
  Data File Compare
  Summary Totals
  Technical Details
  Member Naming Conventions
  Record Structure Definitions
  Binary Format for Numbers
  Binary Signed Values
  Binary Unsigned Values
  Packed-Decimal Format for Numbers
  Packed-Decimal Signed Values
  Packed-Decimal Unsigned Values
  Zoned-Decimal Format for Numbers
  Zoned-Decimal Signed
  Zoned-Decimal Unsigned
  Ancillary Functionality
  Set the Environment
  Display and Log Messages
  Summary
  Software Agreement and Disclaimer
  Downloads and Links
  Current Server or Internet Access
  Internet Access Required
  Glossary of Terms
  Contact or Feedback
  Company Overview
The SimoTime Home Page 

Table of Contents Previous Section Next Section Introduction

The purpose for this suite of programs is to describe and demonstrate various techniques for maintaining numeric integrity when transferring, sharing, converting or processing traditional data files or VSAM Data Sets. The numeric data will be reviewed and validated using human observation combined with programmatic totals accumulation and comparison. The techniques discussed in this document may be used on an IBM Mainframe System with ZOS or a Linux, UNIX or Windows System with Micro Focus Enterprise Server.

This suite of programs provides an example of how to convert a sequential file with variable-length, display-oriented numeric values separated by a delimiter character (Comma-Separated-Value) into a sequential file with data strings (or records) of a fixed field length structure. The numeric values in the sequential file with fixed field length are divided into three (3) categories for BINARY, PACKED and ZONED-DECIMAL. The three (3) categories have two (2) sub-categories for SIGNED and UNSIGNED.


We have made a significant effort to ensure the documents and software technologies are correct and accurate. We reserve the right to make changes without notice at any time. The function delivered in this version is based upon the enhancement requests from a specific group of users. The intent is to provide changes as the need arises and in a timeframe that is dependent upon the availability of resources.

Copyright © 1987-2024
SimoTime Technologies and Services
All Rights Reserved

Table of Contents Previous Section Next Section Considerations

The following is an overview of the items that will need to be considered when validating the numeric integrity of non-relational data structures.

1. File Formats
1.1. ASCII/Text or Line Sequential (LSEQ)
1.2. Record Sequential
1.2.1. Fixed Record Length
1.2.2. Variable Record Length
2. Record Structures (or Record Layout)
2.1. A string of data
2.2. Fixed field format
2.3. Comma Separated Values format
2.4. Dynamically created variable length records
2.4.1. Base Segment with fixed length
2.4.2. User Segments appended after base segment
2.4.2.1. Multiple user segments may be appended to a record
2.4.2.2. User segments may vary in structure and size
3. Field Types
3.1. A string of data
3.2. Character Strings
3.3. Numeric Values
3.3.1. Binary
3.3.1.1. Signed Positive or Negative
3.3.1.2. Unsigned or implied positive
3.3.2. Packed Decimal
3.3.2.1. Signed Positive or Negative
3.3.2.2. Unsigned or implied positive
3.3.3. Zoned Decimal
3.3.3.1. Signed Positive or Negative
3.3.3.2. Unsigned or implied positive
3.4. Encoding Schema (ASCII, EBCDIC or other)
3.4.1. WIP2
4. Additional Items
4.1. Code Pages
4.2. Record or Field initialization
4.3. S0C7 or RTS163 Error Conditions

 

Table of Contents Previous Section Next Section Document Organization

This document is the 1st document of a set of three (3) documents and describes how to validate application behavior and data integrity during regression testing or user acceptance testing. Also, the technique of accumulating summary totals and record counts may be used to validate a complete and successful file transfer.

The following link is for the 2nd document in a set of three (3) documents and describes how the programs that do the data conversions and accumulate summary totals are generated.

Link to Internet   Link to Server   Explore how to generate COBOL programs that will do conversion between various numeric formats such as packed-decimal, binary and zoned-decimal. To validate numeric integrity a discussion of generating programs that accumulate summary totals is included.

The following link is for the 3rd document in a set of three (3) documents and describes how the test files are created.

Link to Internet   Link to Server   Explore how to create test files that contain various numeric formats such as packed-decimal, binary and zoned-decimal.

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.


We have made a significant effort to ensure the documents and software technologies are correct and accurate. We reserve the right to make changes without notice at any time. The function delivered in this version is based upon the enhancement requests from a specific group of users. The intent is to provide changes as the need arises and in a timeframe that is dependent upon the availability of resources.

Copyright © 1987-2024
SimoTime Technologies and Services
All Rights Reserved

Table of Contents Previous Section Next Section Numeric Integrity

This suite of programs processes six (6) User Test files to check (or validate) the numeric integrity of signed and unsigned numbers that have been defined to use three (3) different numeric formats (Binary, Packed-decimal and Zoned-decimal).

The content of the individual records will contain different text strings and numeric values. The numeric formats for each of the User Test files are physically different. However, they will produce a set of summary totals that are of an equal arithmetic value.

WIP2

Table of Contents Previous Section Next Section BINARY Numeric Structures

The following link provides an overview (description and discussion of content and size) of BINARY (or "USAGE IS COMP") fields as they are implemented on an IBM Mainframe System or a Micro Focus environment implemented on a Linux, UNIX or Windows System.

Link to Internet   Link to Server   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.

WIP2

Table of Contents Previous Section Next Section BINARY, Signed Numeric

Two jobs are provided that will compute summary totals for Signed, Binary Numbers. The 1st job is a Command File that runs on a Windows System with Micro Focus COBOL. The 2nd job is a JCL Member that will execute on a Mainframe System or a Linux, UNIX or Windows System with Micro Focus Enterprise Server. Both jobs will execute the same program and will produce the same results.

Table of Contents Previous Section Next Section CMD to Calculate Summary Totals

The following CMD File (NUMTBSW1.cmd) will read the Record Sequential file of records containing a Fixed Field Length structure containing numeric values of a signed, BINARY format. Summary totals will be calculated for the specified fields and at end of file the totals will be written to the SYSOUT device.

@echo OFF
rem  * *******************************************************************
rem  *               NUMTBSW1.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 Signed Binary Numeric,
rem  *          write Summary Totals and Record count.
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * The job will read an 80-byte file with a record structure of
rem  * Fixed-Field-Lengths and a numeric format of Signed Binary.
rem  *
rem  * The job will post Summary Totals and a Record Count to SYSOUT.
rem  *
rem  * This set of programs will run on a mainframe under MVS or on a
rem  * Personal Computer with Windows and Micro Focus Net Express.
rem  *
rem  *    ************
rem  *    * NUMTBSW1 *
rem  *    ********cmd*
rem  *         *
rem  *         *
rem  *    ************     ************
rem  *    * SIMONOTE ******* CONSOLE  *
rem  *    ********cmd*  *  ************      Note: Prefix Messages,
rem  *         *        *                          Display and write to
rem  *         *        *  ************            log file
rem  *         *        ****  SYSLOG  *
rem  *         *           *******rseq*
rem  *         *
rem  *    ************
rem  *    *   run    *****************************
rem  *    *******mifo*                           *
rem  *         *                                 *
rem  *         *           ************     ************      ************
rem  *         *           *  SYSUT1  ******* NUMTBSC1 *******  SYSOUT  *
rem  *         *           *******rseq*     ********cbl*      *******lseq*
rem  *         *                                 *
rem  *    ************                      ************
rem  *    *   EOJ    *                      * NUMTBSR1 *
rem  *    ************                      ********cbl*
rem  *
rem  * *******************************************************************
rem  * Step 1 of 2, Prepare the environment...
rem  *
     set CmdName=NUMTBSW1
     call ..\Env1BASE %CmdName%
     if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
rem  *
     call SimoNOTE "*******************************************************%CmdName%"
     call SimoNOTE "Starting CmdName %CmdName%"
     call SimoNOTE "JobTopic Read RSEQ with Binary Signed, write Totals"
     call SimoNOTE "StepInfo Map Program File Names to Physical File Name"
     set SYSUT1=%BaseLib1%\DATA\APPL\SIMOTIME.NRSEQFFL.NUDBS001.DAT
     set SYSOUT=%BaseLib1%\DATA\SPOOL\SYSOUT_%CmdName%.TXT
     if exist %SYSOUT% del %SYSOUT%
rem  *
rem  * *******************************************************************
rem  * Step 2 of 2, Read Fixed-Field with Binary Numbers, write Totals
rem  *
     call SimoNOTE "StepInfo Execute the Binary Signed Program"
     run NUMTBSC1
     if not ERRORLEVEL = 0 set JobStatus=0010
     if not %JobStatus% == 0000 goto :EojNok
     call SimoNOTE "DataTake %SYSUT1%"
     call SimoNOTE "DataMake %SYSOUT%"
rem  *
     if exist %SYSOUT% goto :EojAok
     set JobStatus=0020
     goto :EojNok
rem  *
rem  * *******************************************************************
:EojAok
     call SimoNOTE "Finished JobName %CmdName%, Job Status is %JobStatus%"
     goto :End
:EojNok
     call SimoNOTE "ABENDING JobName %CmdName%, Job Status is %JobStatus%"
:End
     if not "%1" == "nopause" pause

Table of Contents Previous Section Next Section JCL to Calculate Summary Totals

The following JCL Member (NUMTBSJ1.jcl) will read the Record Sequential file of records containing a Fixed Field Length structure containing numeric values of a signed, BINARY format. Summary totals will be calculated for the specified fields and at end of file the totals will be written to the SYSOUT device.

//NUMTBSJ1 JOB (SIMOTIME),'NUMERIC CONNECTION',CLASS=1,MSGCLASS=0,
//             NOTIFY=CSIP1
//* *******************************************************************
//*       NUMTBSJ1.JCL - a JCL Member for Batch Job Processing        *
//*        This program 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   - Read a file of numeric values,
//*          write Summary Totals to SYSOUT.
//* Author - SimoTime Technologies
//* Date   - January 24, 1996
//*
//* The job will read an 80-byte file that contains numeric values.
//* The record structure contains fixed-length fields. The numeric
//* fields are a SIGNED, BINARY format.
//*
//* The program will calculate user-defined summary totals and a
//* count of the number of records in the file.
//*
//* The job will write the summary totals to the SYSOUT device.
//*
//* This set of programs will run on a Mainframe System with ZOS or
//* on a Windows System with Micro Focus Enterprise Server.
//*
//*                     +----------+
//*                     | NUMTBSJ1 |
//*                     +-------jcl+
//*                          |
//*                          |
//*    +----------+     +----------+     +----------+
//*    | NBRBS080 +-----+ NUMTBSC1 +--+--+  SYSOUT  |
//*    +------rcsv+     +-------cbl+  |  +------data+
//*                          |        |
//*                          |        |  +----------+
//*                          |        +--+ NUMTBSR1 |
//*                          |           +-------cbl+
//*                     +----------+
//*                     |   EOJ    |
//*                     +----------+
//*
//* *******************************************************************
//* Step 1 of 1, Read a RSEQ file of numeric values,
//*              Write to SYSOUT
//*
//TOTALS1  EXEC PGM=NUMTBSC1
//STEPLIB  DD  DSN=SIMOTIME.DEMO.LOADLIB1,DISP=SHR
//SYSUT1   DD  DSN=SIMOTIME.NRSEQFFL.NUDBS001,DISP=SHR
//SYSOUT   DD  SYSOUT=*
//

Table of Contents Previous Section Next Section Results for BINARY, Signed Numeric

The following shows the results that are written to the SYSOUT device.

* NUMTBSC1 Signed Binary --- Calculate Totals v15.05.18   helpdesk@simotime.com
* NUMTBSC1 A Program to Calculate Totals was generated by SimoTime Technologies
* NUMTBSC1 *  HEX20 parameter is DISABLE
* NUMTBSC1 *  HEX40 parameter is DISABLE
* NUMTBSC1 *  HEXTR parameter is DISABLE
* NUMTBSC1 * NUMCHK parameter is DISABLE
* NUMTBSC1 ************************************************************************************************************
* NUMTBSC1 Field Name                                     Summary.Total                HEX40     HEX20    NUMCHK TYPE
* NUMTBSC1 BS-72                                              123.72                                              BN
* NUMTBSC1 BS-23                                               12.345                                             BN
* NUMTBSC1 BS-52                                           12,345.02                                              BN
* NUMTBSC1 BS-60                                          123,456                                                 BN
* NUMTBSC1 BS-20                                               11                                                 BN
* NUMTBSC1 Record count for SYSUT1                      000000002
* NUMTBSC1 Field Name                                     Summary.Total                HEX40     HEX20    NUMCHK TYPE
* NUMTBSC1 ************************************************************************************************************
* NUMTBSC1 Program to Calculate Totals generated by using SimoTime Technologies
* NUMTBSC1 Please send all comments or suggestions to the helpdesk@simotime.com

Table of Contents Previous Section Next Section BINARY, Unsigned Numeric

Two jobs are provided that will compute summary totals for Unsigned, Binary Numbers. The 1st job is a Command File that runs on a Windows System with Micro Focus COBOL. The 2nd job is a JCL Member that will execute on a Mainframe System or a Linux, UNIX or Windows System with Micro Focus Enterprise Server. Both jobs will execute the same program and will produce the same results.

Table of Contents Previous Section Next Section CMD to Calculate Summary Totals

The following CMD File (NUMTBUW1.cmd) will read the Record Sequential file of records containing a Fixed Field Length structure containing numeric values of a unsigned, BINARY format. Summary totals will be calculated for the specified fields and at end of file the totals will be written to the SYSOUT device.

@echo OFF
rem  * *******************************************************************
rem  *               NUMTBUW1.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 Signed Binary Numeric,
rem  *          write Summary Totals and Record count.
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * The job will read an 80-byte file with a record structure of
rem  * Fixed-Field-Lengths and a numeric format of UnSigned Binary.
rem  *
rem  * The job will post Summary Totals and a Record Count to SYSOUT.
rem  *
rem  * This set of programs will run on a mainframe under MVS or on a
rem  * Personal Computer with Windows and Micro Focus Net Express.
rem  *
rem  *    ************
rem  *    * NUMTBUW1 *
rem  *    ********cmd*
rem  *         *
rem  *         *
rem  *    ************     ************
rem  *    * SIMONOTE ******* CONSOLE  *
rem  *    ********cmd*  *  ************      Note: Prefix Messages,
rem  *         *        *                          Display and write to
rem  *         *        *  ************            log file
rem  *         *        ****  SYSLOG  *
rem  *         *           *******rseq*
rem  *         *
rem  *    ************
rem  *    *   run    *****************************
rem  *    *******mifo*                           *
rem  *         *                                 *
rem  *         *           ************     ************      ************
rem  *         *           *  SYSUT1  ******* NUMTBUC1 *******  SYSOUT  *
rem  *         *           *******rseq*     ********cbl*      *******lseq*
rem  *         *                                 *
rem  *    ************                      ************
rem  *    *   EOJ    *                      * NUMTBUR1 *
rem  *    ************                      ********cbl*
rem  *
rem  * *******************************************************************
rem  * Step 1 of 2, Prepare the environment...
rem  *
     set CmdName=NUMTBUW1
     call ..\Env1BASE %CmdName%
     if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
rem  *
     call SimoNOTE "*******************************************************%CmdName%"
     call SimoNOTE "Starting CmdName %CmdName%"
     call SimoNOTE "JobTopic Read RSEQ with Binary UnSigned, write Totals"
     call SimoNOTE "StepInfo Map Program File Names to Physical File Name"
     set SYSUT1=%BaseLib1%\DATA\APPL\SIMOTIME.NRSEQFFL.NUDBU001.DAT
     set SYSOUT=%BaseLib1%\DATA\SPOOL\SYSOUT_%CmdName%.TXT
     if exist %SYSOUT% del %SYSOUT%
rem  *
rem  * *******************************************************************
rem  * Step 2 of 2, Read Fixed-Field with Binary Numbers, write Totals
rem  *
     call SimoNOTE "StepInfo Execute the Binary UnSigned Program"
     run NUMTBUC1
     if not ERRORLEVEL = 0 set JobStatus=0010
     if not %JobStatus% == 0000 goto :EojNok
     call SimoNOTE "DataTake %SYSUT1%"
     call SimoNOTE "DataMake %SYSOUT%"
rem  *
     if exist %SYSOUT% goto :EojAok
     set JobStatus=0020
     goto :EojNok
rem  *
rem  * *******************************************************************
:EojAok
     call SimoNOTE "Finished JobName %CmdName%, Job Status is %JobStatus%"
     goto :End
:EojNok
     call SimoNOTE "ABENDING JobName %CmdName%, Job Status is %JobStatus%"
:End
     if not "%1" == "nopause" pause

Table of Contents Previous Section Next Section JCL to Calculate Summary Totals

The following JCL Member (NUMTBUJ1.jcl) will read the Record Sequential file of records containing a Fixed Field Length structure containing numeric values of a unsigned, BINARY format. Summary totals will be calculated for the specified fields and at end of file the totals will be written to the SYSOUT device.

//NUMTBUJ1 JOB (SIMOTIME),'NUMERIC CONNECTION',CLASS=1,MSGCLASS=0,
//             NOTIFY=CSIP1
//* *******************************************************************
//*       NUMTBUJ1.JCL - a JCL Member for Batch Job Processing        *
//*        This program 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   - Read a file of numeric values,
//*          write Summary Totals to SYSOUT.
//* Author - SimoTime Technologies
//* Date   - January 24, 1996
//*
//* The job will read an 80-byte file that contains numeric values.
//* The record structure contains fixed-length fields. The numeric
//* fields are an UNSIGNED, BINARY format.
//*
//* The program will calculate user-defined summary totals and a
//* count of the number of records in the file.
//*
//* The job will write the summary totals to the SYSOUT device.
//*
//* This set of programs will run on a mainframe under MVS or on a
//* Personal Computer with Windows and Micro Focus Net Express.
//*
//*                     +----------+
//*                     | NUMTBUJ1 |
//*                     +-------jcl+
//*                          |
//*                          |
//*    +----------+     +----------+     +----------+
//*    |  SYSUT1  +-----+ NUMTBUC1 +--+--+  SYSOUT  |
//*    +------rseq+     +-------cbl+  |  +------data+
//*                          |        |
//*                          |        |  +----------+
//*                          |        +--+ NUMTBUR1 |
//*                          |           +-------cbl+
//*                     +----------+
//*                     |   EOJ    |
//*                     +----------+
//*
//* *******************************************************************
//* Step 1 of 1, Read a RSEQ file of numeric values,
//*              Write to SYSOUT
//*
//TOTALS1  EXEC PGM=NUMTBUC1
//STEPLIB  DD  DSN=SIMOTIME.DEMO.LOADLIB1,DISP=SHR
//SYSUT1   DD  DSN=SIMOTIME.NRSEQFFL.NUDBU001,DISP=SHR
//SYSOUT   DD  SYSOUT=*
//

Table of Contents Previous Section Next Section Results for BINARY, Unsigned Numeric

The following shows the results that are written to the SYSOUT device.

* NUMTBUC1 UnSigned Binary - Calculate Totals v15.05.18   helpdesk@simotime.com
* NUMTBUC1 A Program to Calculate Totals was generated by SimoTime Technologies
* NUMTBUC1 *  HEX20 parameter is DISABLE
* NUMTBUC1 *  HEX40 parameter is DISABLE
* NUMTBUC1 *  HEXTR parameter is DISABLE
* NUMTBUC1 * NUMCHK parameter is DISABLE
* NUMTBUC1 ************************************************************************************************************
* NUMTBUC1 Field Name                                     Summary.Total                HEX40     HEX20    NUMCHK TYPE
* NUMTBUC1 BU-72                                              123.72                                              BN
* NUMTBUC1 BU-23                                               12.345                                             BN
* NUMTBUC1 BU-52                                           12,345.02                                              BN
* NUMTBUC1 BU-60                                          123,456                                                 BN
* NUMTBUC1 BU-20                                               11                                                 BN
* NUMTBUC1 Record count for SYSUT1                      000000002
* NUMTBUC1 Field Name                                     Summary.Total                HEX40     HEX20    NUMCHK TYPE
* NUMTBUC1 ************************************************************************************************************
* NUMTBUC1 Program to Calculate Totals generated by using SimoTime Technologies
* NUMTBUC1 Please send all comments or suggestions to the helpdesk@simotime.com

Table of Contents Previous Section Next Section PACKED-Decimal Numeric Structures

The following link provides an overview (description and discussion of content and size) of PACKED-Decimal (or "USAGE IS COMP-3") fields as they are implemented on an IBM Mainframe System or a Micro Focus environment implemented on a Linux, UNIX or Windows System.

Link to Internet   Link to Server   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.

WIP2

Table of Contents Previous Section Next Section PACKED, Signed Numeric

Two jobs are provided that will compute summary totals for Signed, Packed-Decimal Numbers. The 1st job is a Command File that runs on a Windows System with Micro Focus COBOL. The 2nd job is a JCL Member that will execute on a Mainframe System or a Linux, UNIX or Windows System with Micro Focus Enterprise Server. Both jobs will execute the same program and will produce the same results.

Table of Contents Previous Section Next Section CMD to Calculate Summary Totals

The following CMD File (NUMTPSW1.cmd) will read the Record Sequential file of records containing a Fixed Field Length structure containing numeric values of a signed, PACKED-Decimal format. Summary totals will be calculated for the specified fields and at end of file the totals will be written to the SYSOUT device.

@echo OFF
rem  * *******************************************************************
rem  *               NUMTPSW1.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 Signed Packed-Decimal Numeric,
rem  *          write Summary Totals and Record count.
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * The job will read an 80-byte file with a record structure of
rem  * Fixed-Field-Lengths and a numeric format of Signed Packed.
rem  *
rem  * The job will post Summary Totals and a Record Count to SYSOUT.
rem  *
rem  * This set of programs will run on a mainframe under MVS or on a
rem  * Personal Computer with Windows and Micro Focus Net Express.
rem  *
rem  *    ************
rem  *    * NUMTPSW1 *
rem  *    ********cmd*
rem  *         *
rem  *         *
rem  *    ************     ************
rem  *    * SIMONOTE ******* CONSOLE  *
rem  *    ********cmd*  *  ************      Note: Prefix Messages,
rem  *         *        *                          Display and write to
rem  *         *        *  ************            log file
rem  *         *        ****  SYSLOG  *
rem  *         *           *******rseq*
rem  *         *
rem  *    ************
rem  *    *   run    *****************************
rem  *    *******mifo*                           *
rem  *         *                                 *
rem  *         *           ************     ************      ************
rem  *         *           *  SYSUT1  ******* NUMTPSC1 *******  SYSOUT  *
rem  *         *           *******rseq*     ********cbl*      *******lseq*
rem  *         *                                 *
rem  *    ************                      ************
rem  *    *   EOJ    *                      * NUMTPSR1 *
rem  *    ************                      ********cbl*
rem  *
rem  * *******************************************************************
rem  * Step 1 of 2, Prepare the environment...
rem  *
     set CmdName=NUMTPSW1
     call ..\Env1BASE %CmdName%
     if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
rem  *
     call SimoNOTE "*******************************************************%CmdName%"
     call SimoNOTE "Starting CmdName %CmdName%"
     call SimoNOTE "JobTopic Read RSEQ with Packed Signed, write Totals"
     call SimoNOTE "StepInfo Map Program File Names to Physical File Name"
     set SYSUT1=%BaseLib1%\DATA\APPL\SIMOTIME.NRSEQFFL.NUDPS001.DAT
     set SYSOUT=%BaseLib1%\DATA\SPOOL\SYSOUT_%CmdName%.TXT
     if exist %SYSOUT% del %SYSOUT%
rem  *
rem  * *******************************************************************
rem  * Step 2 of 2, Read Fixed-Field with Packed Numbers, write Totals
rem  *
     call SimoNOTE "StepInfo Execute the Packed Signed Program"
     run NUMTPSC1
     if not ERRORLEVEL = 0 set JobStatus=0010
     if not %JobStatus% == 0000 goto :EojNok
     call SimoNOTE "DataTake %SYSUT1%"
     call SimoNOTE "DataMake %SYSOUT%"
rem  *
     if exist %SYSOUT% goto :EojAok
     set JobStatus=0020
     goto :EojNok
rem  *
rem  * *******************************************************************
:EojAok
     call SimoNOTE "Finished JobName %CmdName%, Job Status is %JobStatus%"
     goto :End
:EojNok
     call SimoNOTE "ABENDING JobName %CmdName%, Job Status is %JobStatus%"
:End
     if not "%1" == "nopause" pause

Table of Contents Previous Section Next Section JCL to Calculate Summary Totals

The following JCL Member (NUMTPSJ1.jcl) will read the Record Sequential file of records containing a Fixed Field Length structure containing numeric values of a signed, PACKED-Decimal format. Summary totals will be calculated for the specified fields and at end of file the totals will be written to the SYSOUT device.

//NUMTPSJ1 JOB (SIMOTIME),'NUMERIC CONNECTION',CLASS=1,MSGCLASS=0,
//             NOTIFY=CSIP1
//* *******************************************************************
//*       NUMTPSJ1.JCL - a JCL Member for Batch Job Processing        *
//*        This program 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   - Read a file of numeric values,
//*          write Summary Totals to SYSOUT.
//* Author - SimoTime Technologies
//* Date   - January 24, 1996
//*
//* The job will read an 80-byte file that contains numeric values.
//* The record structure contains fixed-length fields. The numeric
//* fields are a SIGNED, PACKED-Decimal format.
//*
//* The program will calculate user-defined summary totals and a
//* count of the number of records in the file.
//*
//* The job will write the summary totals to the SYSOUT device.
//*
//* This set of programs will run on a Mainframe System with ZOS or
//* on a Windows System with Micro Focus Enterprise Server.
//*
//*                     +----------+
//*                     | NUMTPSJ1 |
//*                     +-------jcl+
//*                          |
//*                          |
//*    +----------+     +----------+     +----------+
//*    | NBRBS080 +-----+ NUMTPSC1 +--+--+  SYSOUT  |
//*    +------rcsv+     +-------cbl+  |  +------data+
//*                          |        |
//*                          |        |  +----------+
//*                          |        +--+ NUMTPSR1 |
//*                          |           +-------cbl+
//*                     +----------+
//*                     |   EOJ    |
//*                     +----------+
//*
//* *******************************************************************
//* Step 1 of 1, Read a RSEQ file of numeric values,
//*              Write to SYSOUT
//*
//TOTALS1  EXEC PGM=NUMTPSC1
//STEPLIB  DD  DSN=SIMOTIME.DEMO.LOADLIB1,DISP=SHR
//SYSUT1   DD  DSN=SIMOTIME.NRSEQFFL.NUDPS001,DISP=SHR
//SYSOUT   DD  SYSOUT=*
//

Table of Contents Previous Section Next Section Results for PACKED, Signed Numeric

The following shows the results that are written to the SYSOUT device.

* NUMTPSC1 Signed Packed --- Calculate Totals v15.05.18   helpdesk@simotime.com
* NUMTPSC1 A Program to Calculate Totals was generated by SimoTime Technologies
* NUMTPSC1 *  HEX20 parameter is DISABLE
* NUMTPSC1 *  HEX40 parameter is DISABLE
* NUMTPSC1 *  HEXTR parameter is DISABLE
* NUMTPSC1 * NUMCHK parameter is DISABLE
* NUMTPSC1 ************************************************************************************************************
* NUMTPSC1 Field Name                                     Summary.Total                HEX40     HEX20    NUMCHK TYPE
* NUMTPSC1 PS-72                                              123.72                                              PK
* NUMTPSC1 PS-23                                               12.345                                             PK
* NUMTPSC1 PS-52                                           12,345.02                                              PK
* NUMTPSC1 PS-60                                          123,456                                                 PK
* NUMTPSC1 PS-20                                               11                                                 PK
* NUMTPSC1 Record count for SYSUT1                      000000002
* NUMTPSC1 Field Name                                     Summary.Total                HEX40     HEX20    NUMCHK TYPE
* NUMTPSC1 ************************************************************************************************************
* NUMTPSC1 Program to Calculate Totals generated by using SimoTime Technologies
* NUMTPSC1 Please send all comments or suggestions to the helpdesk@simotime.com

Table of Contents Previous Section Next Section PACKED, Unsigned Numeric

Two jobs are provided that will compute summary totals for Unsigned, Packed-Decimal Numbers. The 1st job is a Command File that runs on a Windows System with Micro Focus COBOL. The 2nd job is a JCL Member that will execute on a Mainframe System or a Linux, UNIX or Windows System with Micro Focus Enterprise Server. Both jobs will execute the same program and will produce the same results.

Table of Contents Previous Section Next Section CMD to Calculate Summary Totals

The following CMD File (NUMTPUW1.cmd) will read the Record Sequential file of records containing a Fixed Field Length structure containing numeric values of a unsigned, PACKED-Decimal format. Summary totals will be calculated for the specified fields and at end of file the totals will be written to the SYSOUT device.

@echo OFF
rem  * *******************************************************************
rem  *               NUMTPUW1.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 Signed Packed-Decimal Numeric,
rem  *          write Summary Totals and Record count.
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * The job will read an 80-byte file with a record structure of
rem  * Fixed-Field-Lengths and a numeric format of Unsigned Packed.
rem  *
rem  * The job will post Summary Totals and a Record Count to SYSOUT.
rem  *
rem  * This set of programs will run on a mainframe under MVS or on a
rem  * Personal Computer with Windows and Micro Focus Net Express.
rem  *
rem  *    ************
rem  *    * NUMTPUW1 *
rem  *    ********cmd*
rem  *         *
rem  *         *
rem  *    ************     ************
rem  *    * SIMONOTE ******* CONSOLE  *
rem  *    ********cmd*  *  ************      Note: Prefix Messages,
rem  *         *        *                          Display and write to
rem  *         *        *  ************            log file
rem  *         *        ****  SYSLOG  *
rem  *         *           *******rseq*
rem  *         *
rem  *    ************
rem  *    *   run    *****************************
rem  *    *******mifo*                           *
rem  *         *                                 *
rem  *         *           ************     ************      ************
rem  *         *           *  SYSUT1  ******* NUMTPUC1 *******  SYSOUT  *
rem  *         *           *******rseq*     ********cbl*      *******lseq*
rem  *         *                                 *
rem  *    ************                      ************
rem  *    *   EOJ    *                      * NUMTPUR1 *
rem  *    ************                      ********cbl*
rem  *
rem  * *******************************************************************
rem  * Step 1 of 2, Prepare the environment...
rem  *
     set CmdName=NUMTPUW1
     call ..\Env1BASE %CmdName%
     if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
rem  *
     call SimoNOTE "*******************************************************%CmdName%"
     call SimoNOTE "Starting CmdName %CmdName%"
     call SimoNOTE "JobTopic Read RSEQ with Packed UnSigned, write Totals"
     call SimoNOTE "StepInfo Map Program File Names to Physical File Name"
     set SYSUT1=%BaseLib1%\DATA\APPL\SIMOTIME.NRSEQFFL.NUDPU001.DAT
     set SYSOUT=%BaseLib1%\DATA\SPOOL\SYSOUT_%CmdName%.TXT
     if exist %SYSOUT% del %SYSOUT%
rem  *
rem  * *******************************************************************
rem  * Step 2 of 2, Read Fixed-Field with Packed Numbers, write Totals
rem  *
     call SimoNOTE "StepInfo Execute the Packed Unsigned Program"
     run NUMTPUC1
     if not ERRORLEVEL = 0 set JobStatus=0010
     if not %JobStatus% == 0000 goto :EojNok
     call SimoNOTE "DataTake %SYSUT1%"
     call SimoNOTE "DataMake %SYSOUT%"
rem  *
     if exist %SYSOUT% goto :EojAok
     set JobStatus=0020
     goto :EojNok
rem  *
rem  * *******************************************************************
:EojAok
     call SimoNOTE "Finished JobName %CmdName%, Job Status is %JobStatus%"
     goto :End
:EojNok
     call SimoNOTE "ABENDING JobName %CmdName%, Job Status is %JobStatus%"
:End
     if not "%1" == "nopause" pause

Table of Contents Previous Section Next Section JCL to Calculate Summary Totals

The following JCL Member (NUMTPUJ1.jcl) will read the Record Sequential file of records containing a Fixed Field Length structure containing numeric values of a unsigned, PACKED-Decimal format. Summary totals will be calculated for the specified fields and at end of file the totals will be written to the SYSOUT device.

//NUMTPUJ1 JOB (SIMOTIME),'NUMERIC CONNECTION',CLASS=1,MSGCLASS=0,
//             NOTIFY=CSIP1
//* *******************************************************************
//*       NUMTPUJ1.JCL - a JCL Member for Batch Job Processing        *
//*        This program 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   - Read a file of numeric values,
//*          write Summary Totals to SYSOUT.
//* Author - SimoTime Technologies
//* Date   - January 24, 1996
//*
//* The job will read an 80-byte file that contains numeric values.
//* The record structure contains fixed-length fields. The numeric
//* fields are an UNSIGNED, PACKED-Decimal format.
//*
//* The program will calculate user-defined summary totals and a
//* count of the number of records in the file.
//*
//* The job will write the summary totals to the SYSOUT device.
//*
//* This set of programs will run on a mainframe under MVS or on a
//* Personal Computer with Windows and Micro Focus Net Express.
//*
//*                     +----------+
//*                     | NUMTPUJ1 |
//*                     +-------jcl+
//*                          |
//*                          |
//*    +----------+     +----------+     +----------+
//*    |  SYSUT1  +-----+ NUMTPUC1 +--+--+  SYSOUT  |
//*    +------rseq+     +-------cbl+  |  +------data+
//*                          |        |
//*                          |        |  +----------+
//*                          |        +--+ NUMTPUR1 |
//*                          |           +-------cbl+
//*                     +----------+
//*                     |   EOJ    |
//*                     +----------+
//*
//* *******************************************************************
//* Step 1 of 1, Read a RSEQ file of numeric values,
//*              Write to SYSOUT
//*
//TOTALS1  EXEC PGM=NUMTPUC1
//STEPLIB  DD  DSN=SIMOTIME.DEMO.LOADLIB1,DISP=SHR
//SYSUT1   DD  DSN=SIMOTIME.NRSEQFFL.NUDPU001,DISP=SHR
//SYSOUT   DD  SYSOUT=*
//

Table of Contents Previous Section Next Section Results for PACKED, Unsigned Numeric

The following shows the results that are written to the SYSOUT device.

* NUMTPUC1 UnSigned Packed - Calculate Totals v15.05.18   helpdesk@simotime.com
* NUMTPUC1 A Program to Calculate Totals was generated by SimoTime Technologies
* NUMTPUC1 *  HEX20 parameter is DISABLE
* NUMTPUC1 *  HEX40 parameter is DISABLE
* NUMTPUC1 *  HEXTR parameter is DISABLE
* NUMTPUC1 * NUMCHK parameter is DISABLE
* NUMTPUC1 ************************************************************************************************************
* NUMTPUC1 Field Name                                     Summary.Total                HEX40     HEX20    NUMCHK TYPE
* NUMTPUC1 PU-72                                              123.72                                              PK
* NUMTPUC1 PU-23                                               12.345                                             PK
* NUMTPUC1 PU-52                                           12,345.02                                              PK
* NUMTPUC1 PU-60                                          123,456                                                 PK
* NUMTPUC1 PU-20                                               11                                                 PK
* NUMTPUC1 Record count for SYSUT1                      000000002
* NUMTPUC1 Field Name                                     Summary.Total                HEX40     HEX20    NUMCHK TYPE
* NUMTPUC1 ************************************************************************************************************
* NUMTPUC1 Program to Calculate Totals generated by using SimoTime Technologies
* NUMTPUC1 Please send all comments or suggestions to the helpdesk@simotime.com

Table of Contents Previous Section Next Section ZONED-Decimal Numeric Structures

The following link provides an overview (description and discussion of content and size) of ZONED-Decimal (or USAGE IS DISPLAY) fields as they are implemented on an IBM Mainframe System or a Micro Focus environment implemented on a Linux, UNIX or Windows System.

Link to Internet   Link to Server   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.

WIP2

Table of Contents Previous Section Next Section ZONED, Signed Numeric

Two jobs are provided that will compute summary totals for Signed, Zoned Decimal Numbers. The 1st job is a Command File that runs on a Windows System with Micro Focus COBOL. The 2nd job is a JCL Member that will execute on a Mainframe System or a Linux, UNIX or Windows System with Micro Focus Enterprise Server. Both jobs will execute the same program and will produce the same results.

Table of Contents Previous Section Next Section CMD to Calculate Summary Totals

The following CMD File (NUMTZSW1.cmd) will read the Record Sequential file of records containing a Fixed Field Length structure containing numeric values of a signed, ZONED-Decimal format. Summary totals will be calculated for the user-specified fields and at end of file the totals will be written to the SYSOUT device.

@echo OFF
rem  * *******************************************************************
rem  *               NUMTZSW1.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 Signed Zoned-Decimal Numeric,
rem  *          write Summary Totals and Record count.
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * The job will read an 80-byte file with a record structure of
rem  * Fixed-Field-Lengths and a numeric format of Signed Zoned.
rem  *
rem  * The job will post Summary Totals and a Record Count to SYSOUT.
rem  *
rem  * This set of programs will run on a mainframe under MVS or on a
rem  * Personal Computer with Windows and Micro Focus Net Express.
rem  *
rem  *    ************
rem  *    * NUMTZSW1 *
rem  *    ********cmd*
rem  *         *
rem  *         *
rem  *    ************     ************
rem  *    * SIMONOTE ******* CONSOLE  *
rem  *    ********cmd*  *  ************      Note: Prefix Messages,
rem  *         *        *                          Display and write to
rem  *         *        *  ************            log file
rem  *         *        ****  SYSLOG  *
rem  *         *           *******rseq*
rem  *         *
rem  *    ************
rem  *    *   run    *****************************
rem  *    *******mifo*                           *
rem  *         *                                 *
rem  *         *           ************     ************      ************
rem  *         *           *  SYSUT1  ******* NUMTZSC1 *******  SYSOUT  *
rem  *         *           *******rseq*     ********cbl*      *******lseq*
rem  *         *                                 *
rem  *    ************                      ************
rem  *    *   EOJ    *                      * NUMTZSR1 *
rem  *    ************                      ********cbl*
rem  *
rem  * *******************************************************************
rem  * Step 1 of 2, Prepare the environment...
rem  *
     set CmdName=NUMTZSW1
     call ..\Env1BASE %CmdName%
     if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
rem  *
     call SimoNOTE "*******************************************************%CmdName%"
     call SimoNOTE "Starting CmdName %CmdName%"
     call SimoNOTE "JobTopic Read RSEQ with Zoned Signed, write Totals"
     call SimoNOTE "StepInfo Map Program File Names to Physical File Name"
     set SYSUT1=%BaseLib1%\DATA\APPL\SIMOTIME.NRSEQFFL.NUDZS001.DAT
     set SYSOUT=%BaseLib1%\DATA\SPOOL\SYSOUT_%CmdName%.TXT
     if exist %SYSOUT% del %SYSOUT%
rem  *
rem  * *******************************************************************
rem  * Step 2 of 2, Read Fixed-Field with Zoned Numbers, write Totals
rem  *
     call SimoNOTE "StepInfo Execute the Zoned Signed Program"
     run NUMTZSC1
     if not ERRORLEVEL = 0 set JobStatus=0010
     if not %JobStatus% == 0000 goto :EojNok
     call SimoNOTE "DataTake %SYSUT1%"
     call SimoNOTE "DataMake %SYSOUT%"
rem  *
     if exist %SYSOUT% goto :EojAok
     set JobStatus=0020
     goto :EojNok
rem  *
rem  * *******************************************************************
:EojAok
     call SimoNOTE "Finished JobName %CmdName%, Job Status is %JobStatus%"
     goto :End
:EojNok
     call SimoNOTE "ABENDING JobName %CmdName%, Job Status is %JobStatus%"
:End
     if not "%1" == "nopause" pause

Table of Contents Previous Section Next Section JCL to Calculate Summary Totals

The following JCL Member (NUMTZSJ1.jcl) will read the Record Sequential file of records containing a Fixed Field Length structure containing numeric values of a signed, ZONED-Decimal format. Summary totals will be calculated for the specified fields and at end of file the totals will be written to the SYSOUT device.

//NUMTZSJ1 JOB (SIMOTIME),'NUMERIC CONNECTION',CLASS=1,MSGCLASS=0,
//             NOTIFY=CSIP1
//* *******************************************************************
//*       NUMTZSJ1.JCL - a JCL Member for Batch Job Processing        *
//*        This program 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   - Read a file of numeric values,
//*          write Summary Totals to SYSOUT.
//* Author - SimoTime Technologies
//* Date   - January 24, 1996
//*
//* The job will read an 80-byte file that contains numeric values.
//* The record structure contains fixed-length fields. The numeric
//* fields are a SIGNED, ZONED-Decimal format.
//*
//* The program will calculate user-defined summary totals and a
//* count of the number of records in the file.
//*
//* The job will write the summary totals to the SYSOUT device.
//*
//* This set of programs will run on a Mainframe System with ZOS or
//* on a Windows System with Micro Focus Enterprise Server.
//*
//*                     +----------+
//*                     | NUMTZSJ1 |
//*                     +-------jcl+
//*                          |
//*                          |
//*    +----------+     +----------+     +----------+
//*    | NBRBS080 +-----+ NUMTZSC1 +--+--+  SYSOUT  |
//*    +------rcsv+     +-------cbl+  |  +------data+
//*                          |        |
//*                          |        |  +----------+
//*                          |        +--+ NUMTZSR1 |
//*                          |           +-------cbl+
//*                     +----------+
//*                     |   EOJ    |
//*                     +----------+
//*
//* *******************************************************************
//* Step 1 of 1, Read a RSEQ file of numeric values,
//*              Write to SYSOUT
//*
//TOTALS1  EXEC PGM=NUMTZSC1
//STEPLIB  DD  DSN=SIMOTIME.DEMO.LOADLIB1,DISP=SHR
//SYSUT1   DD  DSN=SIMOTIME.NRSEQFFL.NUDZS001,DISP=SHR
//SYSOUT   DD  SYSOUT=*
//

Table of Contents Previous Section Next Section Results for ZONED, Signed Numeric

The following shows the results that are written to the SYSOUT device.

* NUMTZSC1 Signed Zoned ---- Calculate Totals v15.05.18   helpdesk@simotime.com
* NUMTZSC1 A Program to Calculate Totals was generated by SimoTime Technologies
* NUMTZSC1 *  HEX20 parameter is DISABLE
* NUMTZSC1 *  HEX40 parameter is DISABLE
* NUMTZSC1 *  HEXTR parameter is DISABLE
* NUMTZSC1 * NUMCHK parameter is DISABLE
* NUMTZSC1 ************************************************************************************************************
* NUMTZSC1 Field Name                                     Summary.Total                HEX40     HEX20    NUMCHK TYPE
* NUMTZSC1 ZS-72                                              123.72                                              ZD
* NUMTZSC1 ZS-23                                               12.345                                             ZD
* NUMTZSC1 ZS-52                                           12,345.02                                              ZD
* NUMTZSC1 ZS-60                                          123,456                                                 ZD
* NUMTZSC1 ZS-20                                               11                                                 ZD
* NUMTZSC1 Record count for SYSUT1                      000000002
* NUMTZSC1 Field Name                                     Summary.Total                HEX40     HEX20    NUMCHK TYPE
* NUMTZSC1 ************************************************************************************************************
* NUMTZSC1 Program to Calculate Totals generated by using SimoTime Technologies
* NUMTZSC1 Please send all comments or suggestions to the helpdesk@simotime.com

Table of Contents Previous Section Next Section ZONED, Unsigned Numeric

Two jobs are provided that will compute summary totals for Unsigned, Zoned Decimal Numbers. The 1st job is a Command File that runs on a Windows System with Micro Focus COBOL. The 2nd job is a JCL Member that will execute on a Mainframe System or a Linux, UNIX or Windows System with Micro Focus Enterprise Server. Both jobs will execute the same program and will produce the same results.

Table of Contents Previous Section Next Section CMD to Calculate Summary Totals

The following CMD File (NUMTZUW1.cmd) will read the Record Sequential file of records containing a Fixed Field Length structure containing numeric values of a unsigned, ZONED-Decimal format. Summary totals will be calculated for the user-specified fields and at end of file the totals will be written to the SYSOUT device.

@echo OFF
rem  * *******************************************************************
rem  *               NUMTZUW1.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 Signed Zoned-Decimal Numeric,
rem  *          write Summary Totals and Record count.
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * The job will read an 80-byte file with a record structure of
rem  * Fixed-Field-Lengths and a numeric format of Unsigned Zoned.
rem  *
rem  * The job will post Summary Totals and a Record Count to SYSOUT.
rem  *
rem  * This set of programs will run on a mainframe under MVS or on a
rem  * Personal Computer with Windows and Micro Focus Net Express.
rem  *
rem  *    ************
rem  *    * NUMTZUW1 *
rem  *    ********cmd*
rem  *         *
rem  *         *
rem  *    ************     ************
rem  *    * SIMONOTE ******* CONSOLE  *
rem  *    ********cmd*  *  ************      Note: Prefix Messages,
rem  *         *        *                          Display and write to
rem  *         *        *  ************            log file
rem  *         *        ****  SYSLOG  *
rem  *         *           *******rseq*
rem  *         *
rem  *    ************
rem  *    *   run    *****************************
rem  *    *******mifo*                           *
rem  *         *                                 *
rem  *         *           ************     ************      ************
rem  *         *           *  SYSUT1  ******* NUMTZUC1 *******  SYSOUT  *
rem  *         *           *******rseq*     ********cbl*      *******lseq*
rem  *         *                                 *
rem  *    ************                      ************
rem  *    *   EOJ    *                      * NUMTZUR1 *
rem  *    ************                      ********cbl*
rem  *
rem  * *******************************************************************
rem  * Step 1 of 2, Prepare the environment...
rem  *
     set CmdName=NUMTZUW1
     call ..\Env1BASE %CmdName%
     if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
rem  *
     call SimoNOTE "*******************************************************%CmdName%"
     call SimoNOTE "Starting CmdName %CmdName%"
     call SimoNOTE "JobTopic Read RSEQ with Zoned UnSigned, write Totals"
     call SimoNOTE "StepInfo Map Program File Names to Physical File Name"
     set SYSUT1=%BaseLib1%\DATA\APPL\SIMOTIME.NRSEQFFL.NUDZU001.DAT
     set SYSOUT=%BaseLib1%\DATA\SPOOL\SYSOUT_%CmdName%.TXT
     if exist %SYSOUT% del %SYSOUT%
rem  *
rem  * *******************************************************************
rem  * Step 2 of 2, Read Fixed-Field with Zoned Numbers, write Totals
rem  *
     call SimoNOTE "StepInfo Execute the Zoned Unsigned Program"
     run NUMTZUC1
     if not ERRORLEVEL = 0 set JobStatus=0010
     if not %JobStatus% == 0000 goto :EojNok
     call SimoNOTE "DataTake %SYSUT1%"
     call SimoNOTE "DataMake %SYSOUT%"
rem  *
     if exist %SYSOUT% goto :EojAok
     set JobStatus=0020
     goto :EojNok
rem  *
rem  * *******************************************************************
:EojAok
     call SimoNOTE "Finished JobName %CmdName%, Job Status is %JobStatus%"
     goto :End
:EojNok
     call SimoNOTE "ABENDING JobName %CmdName%, Job Status is %JobStatus%"
:End
     if not "%1" == "nopause" pause

Table of Contents Previous Section Next Section JCL to Calculate Summary Totals

The following JCL Member (NUMTZUJ1.jcl) will read the Record Sequential file of records containing a Fixed Field Length structure containing numeric values of a unsigned, ZONED-Decimal format. Summary totals will be calculated for the specified fields and at end of file the totals will be written to the SYSOUT device.

//NUMTZUJ1 JOB (SIMOTIME),'NUMERIC CONNECTION',CLASS=1,MSGCLASS=0,
//             NOTIFY=CSIP1
//* *******************************************************************
//*       NUMTZUJ1.JCL - a JCL Member for Batch Job Processing        *
//*        This program 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   - Read a file of numeric values,
//*          write Summary Totals to SYSOUT.
//* Author - SimoTime Technologies
//* Date   - January 24, 1996
//*
//* The job will read an 80-byte file that contains numeric values.
//* The record structure contains fixed-length fields. The numeric
//* fields are an UNSIGNED, ZONED-Decimal format.
//*
//* The program will calculate user-defined summary totals and a
//* count of the number of records in the file.
//*
//* The job will write the summary totals to the SYSOUT device.
//*
//* This set of programs will run on a mainframe under MVS or on a
//* Personal Computer with Windows and Micro Focus Net Express.
//*
//*                     +----------+
//*                     | NUMTZUJ1 |
//*                     +-------jcl+
//*                          |
//*                          |
//*    +----------+     +----------+     +----------+
//*    |  SYSUT1  +-----+ NUMTZUC1 +--+--+  SYSOUT  |
//*    +------rseq+     +-------cbl+  |  +------data+
//*                          |        |
//*                          |        |  +----------+
//*                          |        +--+ NUMTZUR1 |
//*                          |           +-------cbl+
//*                     +----------+
//*                     |   EOJ    |
//*                     +----------+
//*
//* *******************************************************************
//* Step 1 of 1, Read a RSEQ file of numeric values,
//*              Write to SYSOUT
//*
//TOTALS1  EXEC PGM=NUMTZUC1
//STEPLIB  DD  DSN=SIMOTIME.DEMO.LOADLIB1,DISP=SHR
//SYSUT1   DD  DSN=SIMOTIME.NRSEQFFL.NUDZU001,DISP=SHR
//SYSOUT   DD  SYSOUT=*
//

Table of Contents Previous Section Next Section Results for ZONED, Unsigned Numeric

The following shows the results that are written to the SYSOUT device.

* NUMTZUC1 UnSigned Zoned -- Calculate Totals v15.05.18   helpdesk@simotime.com
* NUMTZUC1 A Program to Calculate Totals was generated by SimoTime Technologies
* NUMTZUC1 *  HEX20 parameter is DISABLE
* NUMTZUC1 *  HEX40 parameter is DISABLE
* NUMTZUC1 *  HEXTR parameter is DISABLE
* NUMTZUC1 * NUMCHK parameter is DISABLE
* NUMTZUC1 ************************************************************************************************************
* NUMTZUC1 Field Name                                     Summary.Total                HEX40     HEX20    NUMCHK TYPE
* NUMTZUC1 ZU-72                                              123.72                                              ZD
* NUMTZUC1 ZU-23                                               12.345                                             ZD
* NUMTZUC1 ZU-52                                           12,345.02                                              ZD
* NUMTZUC1 ZU-60                                          123,456                                                 ZD
* NUMTZUC1 ZU-20                                               11                                                 ZD
* NUMTZUC1 Record count for SYSUT1                      000000002
* NUMTZUC1 Field Name                                     Summary.Total                HEX40     HEX20    NUMCHK TYPE
* NUMTZUC1 ************************************************************************************************************
* NUMTZUC1 Program to Calculate Totals generated by using SimoTime Technologies
* NUMTZUC1 Please send all comments or suggestions to the helpdesk@simotime.com

Table of Contents Previous Section Next Section Data Validation Techniques

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.

Table of Contents Previous Section Next Section Human Observation

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 are 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.

Table of Contents Previous Section Next Section Data File Compare

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.

Table of Contents Previous Section Next Section Summary Totals

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.

Table of Contents Previous Section Next Section Technical Details

This section provides a closer look at the system environments, component structures and processing techniques used with this suite of programs.

Table of Contents Previous Section Next Section Member Naming Conventions

The use of a naming convention can be very helpful when organizing source members into groups based on their business purpose or technical function.

The naming convention for the Windows CMD Files,Mainframe JCL Members, Program Members and non-Relational Data Structures is as follows.

Positions Description
1-3 The literal "NUx" is used to identify a member as part of the numeric item and "x" denotes the following.
D = Data set for a non-Relational Data Structure.
M = Program or Source Member
4 If positions 1-3 = "NUM" then the literal "NUMx" is used to identify the purpose of the member and "x" denoteds the following.
B = A program or test case that has a primary purpose of processing numeric data.
M = Will do an iMport of variable length text information into a file with fixed field length.
T = Used to define the Type of a record or field structure. Typically, this will be a COBOL copy file.
X = Will do an eXtract of Fixed-Field information into a file with CSV formatted records.
5 Defines the numeric format of the Fixed-Field-Length structure.
A = ASCII/Text data string.
B = Binary Format or Usage is COMP
P = Packed-Decimal or Usage is COMP-3
Z = Zoned-Decimal Format or Usage is DISPLAY
6 Defines the sign value as follows.
S = Signed Numeric Format
U = Unsigned or implied positive format.
7-8 Defines the Type of member.
Wn = a Windows CMD file where "n" is an additional identifier when multiple CMD files are required.
Jn = a ZOS, JCL member where "n" is an additional identifier when multiple JCL members are required.
Cn = a COBOL Source member where "n" is an additional identifier when multiple COBOL Source members are required.
Rn = the source code for a COBOL Routine where "n" is an additional identifier when multiple members are required.
  Naming Convention for Program Members

The following is a list of some of the terms or abbreviations that are used in this document.

Term Description
RSEQ Used to refer to a Record Sequential File
RCSV Used to refer to a Record Sequential File that has records formatted as multiple, variable-length data strings separated by a comma. This data structure is commonly referred to as a Comma-Separated-Values (or CSV) structure.
RFFL Used to refer to a Record Sequential File that has records formatted as multiple, fixed-length data fields that are concatenated without fields separator characters. This data structure is commonly referred to as a Fixed-Field-Length (or FFL) structure.
  Terms or Abbreviations used in this document

Table of Contents Previous Section Next Section Record Structure Definitions

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.

Table of Contents Previous Section Next Section Binary Format for Numbers

The following link describes the binary format. This numeric field format is coded in COBOL as "USAGE IS COMPUTATIONAL" and is usually coded in its abbreviated form of COMP. This may also be coded with the keyword BINARY.

Link to Internet   Link to Server   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.

Table of Contents Previous Section Next Section Binary Signed Values

The following source member (NUMTBSB1.cpy) is the COBOL Copy File that defines the record structure for the test file that contains the BINARY, SIGNED numeric values.

      *****************************************************************
      *               NUMTBSB1.cpy - a COBOL Copy File                *
      *   Copy File for testing with BINARY-SIGNED numeric values.    *
      *****************************************************************
      *         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  BS-RECORD.
           05  BS-DESCRIPTION.
               10  BS-IDENTIFIER        PIC X(8).
               10  FILLER               PIC X.
               10  BS-SIGN-KEY          PIC X(8).
               10  FILLER               PIC X.
               10  BS-SIGN-POS          PIC X(8).
               10  FILLER               PIC X.
               10  BS-SIGN-EXT          PIC X(8).
               10  FILLER               PIC X.
      *
      * ------------------------------------------------------------- *
      *    A group of SIGNED Numbers using a COMPUTATIONAL format.
      *    The physical structure is Binary.
      *    An abbreviated form of the USAGE IS COMPUTATIONAL clause
      *    is simply coded as COMP.
      *
           05  BS-72                    PIC S9(7)V99   COMP.
           05  FILLER                   PIC X.
           05  BS-23                    PIC S9(2)V999  COMP.
           05  FILLER                   PIC X.
           05  BS-52                    PIC S9(5)V99   COMP.
           05  FILLER                   PIC X.
           05  BS-60                    PIC S9(6)      COMP.
           05  FILLER                   PIC X.
           05  BS-20                    PIC S99        COMP.
           05  FILLER                   PIC X.
      *
           05  FILLER                   PIC X(21).
      *
      ***  NUMTBSB1 - End-of-Copy File - - - - - - - - - - - NUMTBSB1 *
      *****************************************************************
      *

The following link provides additional documentation for the COBOL copy file (NUMTBSB1.cpy) that defines the record structure for a test file that contains the Binary, Signed numeric fields.

Link to Internet   Link to Server   Explore numeric values that use a Signed, BINARY format. This HTML document was generated by SimoTime Technologies and is based on the field definitions included in a user-defined COBOL copy file.

Table of Contents Previous Section Next Section Binary Unsigned Values

The following source member (NUMTBUB1.cpy) is the COBOL Copy File that defines the record structure for the test file that contains the BINARY, UNSIGNED numeric values.

      *****************************************************************
      *               NUMTBUB1.cpy - a COBOL Copy File                *
      *   Copy File for testing with BINARY-UNSIGNED numeric values.  *
      *****************************************************************
      *         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  BU-RECORD.
           05  BU-DESCRIPTION.
               10  BU-IDENTIFIER        PIC X(8).
               10  FILLER               PIC X.
               10  BU-SIGN-KEY          PIC X(8).
               10  FILLER               PIC X.
               10  BU-SIGN-POS          PIC X(8).
               10  FILLER               PIC X.
               10  BU-SIGN-EXT          PIC X(8).
               10  FILLER               PIC X.
      *
      * ------------------------------------------------------------- *
      *    A group of UNSIGNED Numbers using a COMPUTATIONAL format.
      *    The physical structure is Binary.
      *    An abbreviated form of the USAGE IS COMPUTATIONAL clause
      *    is simply coded as COMP.
      *
           05  BU-72                    PIC 9(7)V99    COMP.
           05  FILLER                   PIC X.
           05  BU-23                    PIC 9(2)V999   COMP.
           05  FILLER                   PIC X.
           05  BU-52                    PIC 9(5)V99    COMP.
           05  FILLER                   PIC X.
           05  BU-60                    PIC 9(6)       COMP.
           05  FILLER                   PIC X.
           05  BU-20                    PIC 99         COMP.
           05  FILLER                   PIC X.
      *
           05  FILLER                   PIC X(21).
      *
      ***  NUMTBUB1 - End-of-Copy File - - - - - - - - - - - NUMTBUB1 *
      *****************************************************************
      *

The following link provides additional documentation for the COBOL copy file (NUMTBUB1.cpy) that defines the record structure for a test file that contains the Binary, Unsigned numeric fields.

Link to Internet   Link to Server   Explore numeric values that use an Unsigned, BINARY format. This HTML document was generated by SimoTime Technologies and is based on the field definitions included in a user-defined COBOL copy file.

Table of Contents Previous Section Next Section Packed-Decimal Format for Numbers

The following link describes the packed-decimal format. This numeric field format is coded in COBOL as "USAGE IS COMPUTATIONAL-3" and is usually coded in its abbreviated form of COMP-3.

Link to Internet   Link to Server   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.

Table of Contents Previous Section Next Section Packed-Decimal Signed Values

The following source member (NUMTPSB1.cpy) is the COBOL Copy File that defines the record structure for the test file that contains the PACKED, SIGNED numeric values.

      *****************************************************************
      *               NUMTPSB1.cpy - a COBOL Copy File                *
      *   Copy File for testing with PACKED-SIGNED numeric values.    *
      *         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  PS-RECORD.
           05  PS-DESCRIPTION.
               10  PS-IDENTIFIER        PIC X(8).
               10  FILLER               PIC X.
               10  PS-SIGN-KEY          PIC X(8).
               10  FILLER               PIC X.
               10  PS-SIGN-POS          PIC X(8).
               10  FILLER               PIC X.
               10  PS-SIGN-EXT          PIC X(8).
               10  FILLER               PIC X.
      *
      * ------------------------------------------------------------- *
      *    A group of SIGNED 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 as COMP-3.
      *
           05  PS-72                    PIC S9(7)V99   COMP-3.
           05  FILLER                   PIC X.
           05  PS-23                    PIC S9(2)V999  COMP-3.
           05  FILLER                   PIC X.
           05  PS-52                    PIC S9(5)V99   COMP-3.
           05  FILLER                   PIC X.
           05  PS-60                    PIC S9(6)      COMP-3.
           05  FILLER                   PIC X.
           05  PS-20                    PIC S99        COMP-3.
           05  FILLER                   PIC X.
      *
           05  FILLER                   PIC X(21).
      *
      ***  NUMTPSB1 - End-of-Copy File - - - - - - - - - - - NUMTPSB1 *
      *****************************************************************
      *

The following link provides additional documentation for the COBOL copy file (NUMTPSB1.cpy) that defines the record structure for a test file that contains the Packed-Decimal, Signed numeric fields.

Link to Internet   Link to Server   Explore numeric values that use a Signed, PACKED-DECIMAL format. This HTML document was generated by SimoTime Technologies and is based on the field definitions included in a user-defined COBOL copy file.

Table of Contents Previous Section Next Section Packed-Decimal Unsigned Values

The following source member (NUMTPUB1.cpy) is the COBOL Copy File that defines the record structure for the test file that contains the PACKED, UNSIGNED numeric values.

      *****************************************************************
      *               NUMTPUB1.cpy - a COBOL Copy File                *
      *   Copy File for testing with PACKED-UNSIGNED numeric values.  *
      *         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  PU-RECORD.
           05  PU-DESCRIPTION.
               10  PU-IDENTIFIER        PIC X(8).
               10  FILLER               PIC X.
               10  PU-SIGN-KEY          PIC X(8).
               10  FILLER               PIC X.
               10  PU-SIGN-POS          PIC X(8).
               10  FILLER               PIC X.
               10  PU-SIGN-EXT          PIC X(8).
               10  FILLER               PIC X.
      *
      * ------------------------------------------------------------- *
      *    A group of 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 as COMP-3.
      *
           05  PU-72                    PIC 9(7)V99    COMP-3.
           05  FILLER                   PIC X.
           05  PU-23                    PIC 9(2)V999   COMP-3.
           05  FILLER                   PIC X.
           05  PU-52                    PIC 9(5)V99    COMP-3.
           05  FILLER                   PIC X.
           05  PU-60                    PIC 9(6)       COMP-3.
           05  FILLER                   PIC X.
           05  PU-20                    PIC 99         COMP-3.
           05  FILLER                   PIC X.
      *
           05  FILLER                   PIC X(21).
      *
      ***  NUMTPUB1 - End-of-Copy File - - - - - - - - - - - NUMTPUB1 *
      *****************************************************************
      *

The following link provides additional documentation for the COBOL copy file (NUMTPUB1.cpy) that defines the record structure for a test file that contains the Packed-Decimal, Unsigned numeric fields.

Link to Internet   Link to Server   Explore numeric values that use an Unsigned, PACKED-DECIMAL format. This HTML document was generated by SimoTime Technologies and is based on the field definitions included in a user-defined COBOL copy file.

Table of Contents Previous Section Next Section Zoned-Decimal Format for Numbers

The following link describes the zoned-decimal format. This numeric field format is coded in COBOL as "USAGE IS DISPLAY" and is usually not hard-coded since it is the default numeric format.

Link to Internet   Link to Server   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.

Table of Contents Previous Section Next Section Zoned-Decimal Signed

The following source member (NUMTZSB1.cpy) is the COBOL Copy File that defines the record structure for a test file that contains the ZONED, SIGNED numeric fields.

      *****************************************************************
      *               NUMTZSB1.cpy - a COBOL Copy File                *
      *   Copy File for testing with ZONED-SIGNED numeric values.     *
      *****************************************************************
      *         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  ZS-RECORD.
           05  ZS-DESCRIPTION.
               10  ZS-IDENTIFIER        PIC X(8).
               10  FILLER               PIC X.
               10  ZS-SIGN-KEY          PIC X(8).
               10  FILLER               PIC X.
               10  ZS-SIGN-POS          PIC X(8).
               10  FILLER               PIC X.
               10  ZS-SIGN-EXT          PIC X(8).
               10  FILLER               PIC X.
      *
      * ------------------------------------------------------------- *
      *    A group of SIGNED Numbers using a DISPLAY format.
      *    The physical structure is Zoned-Decimal.
      *    Since the USAGE IS DISPLAY clause is the default it is
      *    typically not hard-coded.
      *
      *    Note: Even though the COBOL systax implies "DISPLAY" the
      *    rightmost position of a signed value may be displayed as
      *    a non-numeric character.
      *    Also, this numeric format is sensitive to EBCDIC and ASCII
      *    encoding schemas.
      *
           05  ZS-72                    PIC S9(7)V99.
           05  FILLER                   PIC X.
           05  ZS-23                    PIC S9(2)V999.
           05  FILLER                   PIC X.
           05  ZS-52                    PIC S9(5)V99.
           05  FILLER                   PIC X.
           05  ZS-60                    PIC S9(6).
           05  FILLER                   PIC X.
           05  ZS-20                    PIC S99.
           05  FILLER                   PIC X.
      *
           05  FILLER                   PIC X(10).
      *
      ***  NUMTZSB1 - End-of-Copy File - - - - - - - - - - - NUMTZSB1 *
      *****************************************************************
      *

The following link provides additional documentation for the COBOL copy file (NUMTZSB1.cpy) that defines the record structure for a test file that contains the Zoned-Decimal, Unsigned numeric fields.

Link to Internet   Link to Server   Explore numeric values that use a Signed, ZONED-DECIMAL format. This HTML document was generated by SimoTime Technologies and is based on the field definitions included in a user-defined COBOL copy file.

Table of Contents Previous Section Next Section Zoned-Decimal Unsigned

The following source member (NUMTZUB1.cpy) is the COBOL Copy File that defines the record structure for the test file that contains the ZONED, UNSIGNED numeric fields.

      *****************************************************************
      *               NUMTZUB1.cpy - a COBOL Copy File                *
      *   Copy File for testing with ZONED-UNSIGNED numeric values.   *
      *****************************************************************
      *         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  ZU-RECORD.
           05  ZU-DESCRIPTION.
               10  ZU-IDENTIFIER        PIC X(8).
               10  FILLER               PIC X.
               10  ZU-SIGN-KEY          PIC X(8).
               10  FILLER               PIC X.
               10  ZU-SIGN-POS          PIC X(8).
               10  FILLER               PIC X.
               10  ZU-SIGN-EXT          PIC X(8).
               10  FILLER               PIC X.
      *
      * ------------------------------------------------------------- *
      *    A group of UNSIGNED Numbers using a DISPLAY format.
      *    The physical structure is Zoned-Decimal.
      *    Since the USAGE IS DISPLAY clause is the default it is
      *    typically not hard-coded.
      *
      *    Note: this numeric format is sensitive to EBCDIC and ASCII
      *    encoding schemas.
      *
           05  ZU-72                    PIC 9(7)V99.
           05  FILLER                   PIC X.
           05  ZU-23                    PIC 9(2)V999.
           05  FILLER                   PIC X.
           05  ZU-52                    PIC 9(5)V99.
           05  FILLER                   PIC X.
           05  ZU-60                    PIC 9(6).
           05  FILLER                   PIC X.
           05  ZU-20                    PIC 99.
           05  FILLER                   PIC X.
      *
           05  FILLER                   PIC X(10).
      *
      ***  NUMTZUB1 - End-of-Copy File - - - - - - - - - - - NUMTZUB1 *
      *****************************************************************
      *

The following link provides additional documentation for the COBOL copy file (NUMTZUB1.cpy) that defines the record structure for a test file that contains the Zoned-Decimal, Unsigned numeric fields.

Link to Internet   Link to Server   Explore numeric values that use an Unsigned, ZONED-DECIMAL format. This HTML document was generated by SimoTime Technologies and is based on the field definitions included in a user-defined COBOL copy file.

Table of Contents Previous Section Next Section Ancillary Functionality

This section provides additional detail about the secondary CMD files and programs that are used in this set of sample programs.

Table of Contents Previous Section Next Section Set the Environment

A command file (ENV1BASE.cmd) is called from other command files to set commonly used environment variables. This provides a single point of definition. The following is a listing of the contents of the command file.

@echo OFF
rem  * *******************************************************************
rem  *               ENV1BASE.cmd - a Windows Command File               *
rem  *        This program is provided by SimoTime Technologies          *
rem  *           (C) Copyright 1987-2021 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  *
rem  * Text   - Provide a single point to set common environment variables.
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * Set the commonly used environment variables. This is used to provide
rem  * a single point for managing the commonly used environment variables.
rem  *
     set SimoLIBR=c:\SimoLIBR
     set BASELIB1=c:\SIMOSAM1\DEVL
     set BASELIB8=c:\SimoSAM8
     set BaseWIP1=c:\SimoSAM1\WIP1
     set DATAZERO=c:\SIMODATA\DEVL\DATA\ZERO
     set BASEAPP=%BaseLib1%
     set BASESYS=%BaseLib1%\SYS1
     set BASECAT=%BaseLib1%\DATA
     set UMAPALIB=%BASECAT%\ASC1
     set UMAPELIB=%BASECAT%\EBC1
     set SYSLOG=%BASESYS%\LOGS\SYSLOG_USER.DAT
     set SYSOUT=%BASEAPP%\LOGS\SYSOUT_SIMSAM01.txt
     set SLZMSG=%BASEAPP%\LOGS\SLZMSG_USER.TXT
     set PostNOTE=%BASEAPP%\LOGS\JOBLOG_SIMONOTE.TXT
     set SIMONOTE=%BASEAPP%\LOGS\JOBLOG_SIMONOTE.txt
     set USERPOST=%BASEAPP%\LOGS\ASSIGNED_USER_POST_FILE.txt
     if [%1]==[] goto NO_POST
     set SYSOUT=%BaseLib1%\LOGS\SYSOUT_%1.txt
     call SIMONOTE "+ ENV1BASE *"
     call SIMONOTE "+ ENV1BASE ********************************************************************%1"
     call SIMONOTE "+ ENV1BASE is preparing the System Environment..."
     call SIMONOTE "+ SIMOLIBR is %SIMOLIBR%"
     call SIMONOTE "+ MIFOSYS1 is %MIFOSYS1%"
     call SIMONOTE "+ BASELIB1 is %BASELIB1%"
:NO_POST
     call SIMONOTE "+ SIMONOTE Job Log File is %SIMONOTE% "
rem  *
     set MQBASE=C:\Program Files\IBM\WebSphere MQ
rem  *
rem  * Set the location for the Apache-Tomcat Server...
     set CATALINA_HOME=C:\APACHETC\apache-tomcat-7.0.52
rem     set CATALINA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_112
rem  *
rem  * Set the Environment for the Java Environment...
rem     set JAVABASE=C:\APACHETC\apache-tomcat-7.0.52
     set JAVABASE=C:\Program Files (x86)\Java\jdk1.8.0_112
     set JAVASDK="%JAVABASE%\bin"
     set JAVA_HOME=%JAVABASE%
     set JRE_HOME=%JAVABASE%
     set SIMOTCAT=%CATALINA_HOME%\webapps\simotcat
     set SIMPACKS=%CATALINA_HOME%\webapps\simotcat\WEB-INF\classes\simpacks
rem  *
rem  * Set the environment for the Micro Focus technology...
     set MIFOEDEV=C:\Program Files (x86)\Micro Focus\Enterprise Developer
     set MIFOVCBL=C:\Program Files (x86)\Micro Focus\Visual COBOL Build Tools
     set MIFOESTU=C:\Program Files (x86)\Micro Focus\Studio Enterprise Edition 6.0
     set MIFOEMFE="C:\Program Files (x86)\Micro Focus\Mainframe Express"
rem  *
rem  * Large file support, performance tuning and record locking of the File Handler
     set EXTFH=%BASESYS%\CONFIG\EXTFHBIG.CFG
rem  *
rem  * For IMS Support
     set ES_IMSLIB=%BASEAPP%\IMSLIB
     set ES_ACBLIB=%BASEAPP%\IMSLIB
rem  *
rem  * EZASOKETS Check EZASOKETS Enabled box or set ES_EZASOKET_SUPPORT=YES
     set EZACONFG=BASESYS1\CONFIG\EZACONFG.dat
rem  *
rem  * Resource Allocation and Performance for SORT and non-Relational Data
rem  set MFJSENGINE=SYNCSORT
     set SORTSCHEME=1
     set SORTSPACE=750000000
     set TMP=C:\SORTWORK
rem  *
     set ES_ALLOC_OVERRIDE=%BASESYS%\CONFIG\CATMAPA1.cfg
rem  * For CORE_ON_ERROR function, ABEND Dump
rem  *     set COBCONFIG_=%BASESYS%\CONFIG\diagnose.cfg
rem  *
rem  * Consolidated Trace Facility (CTF)
rem  *     set MFTRACE_CONFIG=%BASESYS%\CONFIG\ctf.cfg
rem  *     set MFTRACE_LOGS=c:\ctflogs
rem  *
rem  * For Job Restart, ABEND Recovery
     set MF_UCC11=Y
     set ES_JES_RESTART=Y
rem  *
rem  * Set environment for MFBSI (Micro Focus Batch Scheduling Interface)
     set ES_EMP_EXIT_1=mfbsiemx
     set MFBSI_DIR=%BASESYS%\LOGS\%JESSERVERNAME%
     set MFBSIEOP_CMD=ENABLE
     set MFBSIEOP_CSV=ENABLE
     set MFBSIEOP_HTM=ENABLE
     set MFBSIEOP_XML=ENABLE
rem  *
rem  * Set Behavior and Trace Flags for GETJOBDD
rem  *   Position=12345678/12345678
     set JDDFLAGS=nnnWnnnn/YYnnnnnn
rem  *
rem  * If not already set then set the PATH for Micro Focus Directories
     if "%SIMOPATH%" == "Y" goto JUMPPATH
     if "%MIFOSYS1%" == "EDEV" goto JUMPEDEV
     if "%MIFOSYS1%" == "VCBL" goto JUMPVCBL
     if "%MIFOSYS1%" == "ESTU" goto JUMPESTU
     if "%MIFOSYS1%" == "EMFE" goto JUMPEMFE
:JUMPEDEV
     set path=%BASESYS%\LOADLIB;%MIFOEDEV%\bin;%JAVASDK%;%BASEAPP%\JAVA;%PATH%;
     set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOEDEV%\CPYLIB
     set MIFOBASE=%MIFOEDEV%
     goto JUMPPATH
:JUMPVCBL
     set path=%MIFOVCBL%\bin;%MIFOVCBL%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%;
     set MIFOBASE=%MIFOVCBL%
     goto JUMPPATH
:JUMPESTU
     set MIFOBASE=%MIFOESTU%\Base
     set MIFOBIN=%MIFOBASE%\bin
     set path=%BASESYS%\LOADLIB;%MIFOBASE%;%MIFOBIN%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%;
     set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOBASE%\SOURCE
     goto JUMPPATH
:JUMPEMFE
     set MIFOBASE=%MIFOEMFE%\Base
     set MIFOBIN=%MIFOBASE%\bin
     set path=%BASESYS%\LOADLIB;%MIFOBASE%;%MIFOBIN%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%;
     set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOBASE%\SOURCE
     goto JUMPPATH
rem  *
:JUMPPATH
     set SIMOPATH=Y
rem  *
     set MAINFRAME_FLOATING_POINT=true
     set COBIDY=%BASEAPP%\COBIDY
     set COBPATH=.;%BASEAPP%\LOADLIB;%BASEAPP%\LOADLIB\GNTS;%BASESYS%\LOADLIB;%SimoLIBR%
     set LIBPATH=.;%BASEAPP%\LOADLIB;%BASEAPP%\LOADLIB\GNTS;%BASESYS%\LOADLIB;%SimoLIBR%
     set TXDIR=%BASESYS%\LOADLIB;%MIFOBASE%
     set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%
rem  *
     set USERCLASS=%BASELIB1%\LOADLIB
     set CLASSPATH=.
     set CLASSPATH=%CLASSPATH%;%JAVABASE%
     set CLASSPATH=%CLASSPATH%;%JAVABASE%\lib
     set CLASSPATH=%CLASSPATH%;\%USERCLASS%\simpacks
     set CLASSPATH=%CLASSPATH%;C:\APACHETC\apache-tomcat-7.0.52\webapps\simotcat\WEB-INF\classes
     set CLASSPATH=%CLASSPATH%;C:\APACHETC\apache-tomcat-7.0.52\webapps\simotcat\WEB-INF\classes\simpacks
rem  *
     if "%MIFOSYS1%" == "ESTU" set CLASSPATH=%CLASSPATH%;%MIFOBIN%
     if "%MIFOSYS1%" == "EDEV" set CLASSPATH=%CLASSPATH%;%MIFOEDEV%
     if "%MIFOSYS1%" == "VCBL" set CLASSPATH=%CLASSPATH%;%MIFOVCBL%
     if "%MIFOSYS1%" == "VCBL" set CLASSPATH=%CLASSPATH%;%MIFOVCBL%\bin\mfcobol.jar
rem  *
     set JobStatus=0000
     call SIMONOTE "+ ENV1BASE is returning to caller"


Table of Contents Previous Section Next Section Display and Log Messages

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

Table of Contents Previous Section Next Section Summary

The purpose of this document is to assist as a tutorial for new programmers or as a quick reference for experienced programmers.

In the world of programming there are many ways to solve a problem. This documentation and software were developed and tested on systems that are configured for a SIMOTIME environment based on the hardware, operating systems, user requirements and security requirements. Therefore, adjustments may be needed to execute the jobs and programs when transferred to a system of a different architecture or configuration.

SIMOTIME Services has experience in moving or sharing data or application processing across a variety of systems. For additional information about SIMOTIME Services or Technologies please contact us using the information in the  Contact or Feedback  section of this document.

Table of Contents Previous Section Next Section Software Agreement and Disclaimer

Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Technologies. Once the fee is received by SimoTime the latest version of the software, documentation or training material will be delivered and a license will be granted for use within an enterprise, provided the SimoTime copyright notice appear on all copies of the software. The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Technologies.

SimoTime Technologies makes no warranty or representations about the suitability of the software, documentation or learning material for any purpose. It is provided "AS IS" without any expressed or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement. SimoTime Technologies shall not be liable for any direct, indirect, special or consequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software, documentation or training material.

Table of Contents Previous Section Next Section Downloads and Links

This section includes links to documents with additional information that are beyond the scope and purpose of this document. The first group of documents may be available from a local system or via an internet connection, the second group of documents will require an internet connection.

Note: A SimoTime License is required for the items to be made available on a local system or server.

Table of Contents Previous Section Next Section Current Server or Internet Access

The following links may be to the current server or to the Internet.

Link to Internet   Link to Server   Explore the Numbers Connection for additional information about the structure and processing of numeric data items (or numeric fields).

Link to Internet   Link to Server   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.

Link to Internet   Link to Server   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.

Link to Internet   Link to Server   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.

Link to Internet   Link to Server   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.

Link to Internet   Link to Server   Explore The ASCII and EBCDIC Translation Tables. These tables are provided for individuals that need to better understand the bit structures and differences of the encoding formats.

Link to Internet   Link to Server   Explore The File Status Return Codes that are used to interpret the results of accessing VSAM data sets and/or QSAM files.

Table of Contents Previous Section Next Section Internet Access Required

The following links will require an internet connect.

This suite of programs and documentation is available to download for review and evaluation purposes. Other uses will require a SimoTime Software License. Link to an Evaluation zPAK Option that includes the program members, documentation and control files.

A good place to start is The SimoTime Home Page for access to white papers, program examples and product information. This link requires an Internet Connection

Explore The Micro Focus Web Site for more information about products (including Micro Focus COBOL) and services available from Micro Focus. This link requires an Internet Connection.

Table of Contents Previous Section Next Section Glossary of Terms

Link to Internet   Link to Server   Explore the Glossary of Terms for a list of terms and definitions used in this suite of documents and white papers.

Check out  The SimoTime Glossary  for a list of terms and definitions used in the documents provided by SimoTime.

Table of Contents Previous Section Next Section Contact or Feedback

This document was created and is maintained by SimoTime Technologies. If you have any questions, suggestions, comments or feedback please use the following contact information.

1. Send an e-mail to our helpdesk.
1.1. helpdesk@simotime.com.
2. Our telephone numbers are as follows.
2.1. 1 415 763-9430 office-helpdesk
2.2. 1 415 827-7045 mobile

 

We appreciate hearing from you.

Table of Contents Previous Section Next Section Company Overview

SimoTime Technologies was founded in 1987 and is a privately owned company. We specialize in the creation and deployment of business applications using new or existing technologies and services. We have a team of individuals that understand the broad range of technologies being used in today's environments. Our customers include small businesses using Internet technologies to corporations using very large mainframe systems.

Quite often, to reach larger markets or provide a higher level of service to existing customers it requires the newer Internet technologies to work in a complementary manner with existing corporate mainframe systems. We specialize in preparing applications and the associated data that are currently residing on a single platform to be distributed across a variety of platforms.

Preparing the application programs will require the transfer of source members that will be compiled and deployed on the target platform. The data will need to be transferred between the systems and may need to be converted and validated at various stages within the process. SimoTime has the technology, services and experience to assist in the application and data management tasks involved with doing business in a multi-system environment.

Whether you want to use the Internet to expand into new market segments or as a delivery vehicle for existing business functions simply give us a call or check the web site at http://www.simotime.com


Return-to-Top
Validate Numeric Data structures
Copyright © 1987-2024
SimoTime Technologies and Services
All Rights Reserved
When technology complements business
http://www.simotime.com