Hexadecimal Dump
Customer Master, a VSAM, KSDS
  Table of Contents  v-24.01.01 - cuhexk03.htm 
  Introduction
  Execute
  Diagram of Hex-Dump Process
  Sample Hex-Dump Output
  Job Scripts
  CMD, Hex-Dump
  JCL, Hex-Dump
  Bash, Hex-Dump
  Prepare
  Generate a Hex-Dump Program
  Technical Details
  Compiler Directives
  Generated COBOL Program
  Summary
  Software Agreement and Disclaimer
  Downloads and Links
  Current Server or Internet Access
  Internet Access Required
  Glossary of Terms
  Comments or Feedback
  Company Overview
The SimoTime Home Page 

Table of Contents Previous Section Next Section Introduction

One approach to application or data validation is human observation or analysis. Human observation is very useful when evaluating the usability and business flow of an application.

Using Human observation 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 tools and knowledge to properly view and interpret.
5. A "hexadecimal dump" presentation of the data may be required.
6. A combination of "Human Observation" and a "hexadecimal dump" may be very useful when diagnosing the cause of an unexpected result during testing or in a production environment.

 

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.

This document will focus on a process that uses SIMOTIME Technology to generate a single COBOL program that will create a Hexadecimal dump file (or HEXDUMP) of user-defined records in the Customer Master VSAM, Key Sequenced Data Set (KSDS). The generation process may be executed on a Windows System using Micro Focus COBOL or a Linux System using GnuCOBOL. The generated program (CUHEXKC3) may be compiled and executed on a Mainframe, Linux, UNIX or Windows System.

A JCL member is provided to run the job as an MVS or ZOS batch job on an IBM Mainframe System or as a project with Micro Focus Mainframe Express (MFE) running on a Windows System. A CMD member is provided to run the job with Micro Focus Net Express (MFE) running on a Windows System. A Bash Script File is provided to run the job on a Linux or UNIX System and GnuCOBOL (formerly known as Open COBOL) is used to compile the COBOL Programs.

Note-1: Unit testing is done on an IBM Mainframe System with Enterprise COBOL using EBCDIC-encoded data.

Note-2: Unit testing is done on a Linux (Ubuntu) System with GnuCOBOL configured for an ASCII-encoded environment.

Note-3: Unit testing is done on a Windows System with Micro Focus Enterprise Developer configured for an ASCII-encoded environment.


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 Execute

This section will focus on the execution process for unit testing.

Table of Contents Previous Section Next Section Diagram of Hex-Dump Process

The following diagram shows the batch processing and data flow for a job that will do a HEX-Dump of user-defined records in a VSAM, KSDS.

             
Entry Point
ZOS
Entry Point
Linux
Entry Point
Windows
   
   
   
CUHEXKJ3
jcl
cuhexks3
sh
CUHEXKW3
cmd
Start Hex-Dump processing for a VSAM, KSDS
   
   
 
 
   
   
 
 
   
   
   
   
 
 
 
 
   
   
   
SYSUT1
see Note-1
   
   
CUHEXKC3
cbl
 
 
SYSUT2
see Note-2
Read files and post Hex Dump
   
   
   
   
SYSUT3
see Note-3
   
   
if SYSUT3
End-of-File
if End-of-File go to End-of-Job
   
   
 
 
No
 
 
 
 
   
   
Yes
EOJ
 
Note-1: SYSUT1 - a VSAM, KSDS Customer Master.
Note-2: SYSUT2 - a Sequential File for Hexadecimal Dump.
Note-3: SYSUT3 - a Sequential File with a list of primary keys.
Batch Processing, A Hexadecimal Dump Program

The VSAM, KSDS for this example is the Customer Master.

Table of Contents Previous Section Next Section Sample Hex-Dump Output

The following shows the HEX-Dump of user-defined records in a VSAM, KSDS.

This is an example of the Hex-Dump Information of selected records from a VSAM/KSDS based on a user request.

The following describes the content of each of the five lines of Hex-Dump information.
The 1st line is the record position indicator.
The 2nd line is the possible EBCDIC character or symbol.
The 3rd line is the high-order nibble of the byte for the Hex-dump.
The 4th line is the low-order nibble of the byte for the Hex-dump.
The 5th line is the possible ASCII character or symbol.

********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
* CUHEXKC3 HEX-Dump by Key for KSDS 512/1-12  v18.06.01   helpdesk@simotime.com
* CUHEXKC3 This Data File HexDump Member was generated by SimoTime Technologies
********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
Starting, HEX-Dump by Key for KSDS 512/1-12  http://www.SimoTime.com
/USERKEY   000000000010
....:...10....:...20....:...30....:...40....:...50....:...60....:...70....:...80....:...90....:..100....:..110....:..120....:..130....:..140....:..150....:..160....:..170....:..180....:..190....:..200....:..210....:..220....:..230....:..240....:..250....:..260....:..270....:..280....:..290....:..300....:..310....:..320....:..330....:..340....:..350....:..360....:..370....:..380....:..390....:..400....:..410....:..420....:..430....:..440....:..450....:..460....:..470....:..480....:..490....:..500....:..510..
............€θ/`%?Κ€€€€€€€€€€€€€€€€€€€€€€α%Ρ:/ΒΑΘΗ€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€.€η/`ΑΛ€λΘΚΑΑΘ€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€.>ΕΑ%ΑΛ€€€€€€€€€€€€€€€€€€€€€&κ€€€€€€€€€€€€€€€€€€€€€€€€€€.....€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€...........€€€€€€€€.......€€€€€€€€.......€€€€€€€€...................€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€
33333333333325676672222222222222222222222466766676222222222222222222222222222222232467672577667222222222222222222222222222222222222222222222222222222222222222222222222222222222246666672222222222222222222225522222222222222222222222222333332222222222222222222222222222222222222222222222222222222222222000000333332222222200333332222222200333332222222233333333333333333332222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
0000000000100419CF200000000000000000000005C9A1254800000000000000000000000000000008081953034255400000000000000000000000000000000000000000000000000000000000000000000000000000000001E75C530000000000000000000000200000000000000000000000000006110000000000000000000000000000000000000000000000000000000000000000F00000000000000000000000000000000000000000000020180703134025850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000010 Taylor                      Elizabeth                               8 Hayes Street                                                                                  Angeles                     PR                          00611                                                             ......00000        ..00000        ..00000        2018070313402585000
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
/USERKEY   123456789012, Record not found
/USERKEY   000000000225
....:...10....:...20....:...30....:...40....:...50....:...60....:...70....:...80....:...90....:..100....:..110....:..120....:..130....:..140....:..150....:..160....:..170....:..180....:..190....:..200....:..210....:..220....:..230....:..240....:..250....:..260....:..270....:..280....:..290....:..300....:..310....:..320....:..330....:..340....:..350....:..360....:..370....:..380....:..390....:..400....:..410....:..420....:..430....:..440....:..450....:..460....:..470....:..480....:..490....:..500....:..510..
............€η/ΚΞΑ`€€€€€€€€€€€€€€€€€€€€€€+?Κ_/>€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€....€&/ΔΡΓΡΔ€.ΞΑ>ΝΑ€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€η?%`?,Α€€€€€€€€€€€€€€€€€€€€€(.€€€€€€€€€€€€€€€€€€€€€€€€€€.....€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€...........€€€€€€€€.......€€€€€€€€.......€€€€€€€€...................€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€
33333333333324677672222222222222222222222467666222222222222222222222222222222222233332566666624766762222222222222222222222222222222222222222222222222222222222222222222222222222246676662222222222222222222224422222222222222222222222222333332222222222222222222222222222222222222222222222222222222222222000000333332222222200333332222222200333332222222233333333333333333332222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
00000000022508126590000000000000000000000EF2D1E00000000000000000000000000000000008607001396930165E55000000000000000000000000000000000000000000000000000000000000000000000000000008FC9FB5000000000000000000000D100000000000000000000000000010400000000000000000000000000000000000000000000000000000000000000000F00000000000000000000000000000000000000000000020180703134025850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000225 Harvey                      Norman                                  8607 Pacific Avenue                                                                             Holyoke                     MA                          01040                                                             ......00000        ..00000        ..00000        2018070313402585000
/USERKEY   000000000194
....:...10....:...20....:...30....:...40....:...50....:...60....:...70....:...80....:...90....:..100....:..110....:..120....:..130....:..140....:..150....:..160....:..170....:..180....:..190....:..200....:..210....:..220....:..230....:..240....:..250....:..260....:..270....:..280....:..290....:..300....:..310....:..320....:..330....:..340....:..350....:..360....:..370....:..380....:..390....:..400....:..410....:..420....:..430....:..440....:..450....:..460....:..470....:..480....:..490....:..500....:..510..
............€δΗ/ΞΑ:€€€€€€€€€€€€€€€€€€€€€€.>>ΡΑ€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€..€οΡ%%?Ο€δ?ΝΚΘ€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€δ/Κ?%Ρ>/€€€€€€€€€€€€€€€€€€€€&κ€€€€€€€€€€€€€€€€€€€€€€€€€€.....€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€...........€€€€€€€€.......€€€€€€€€.......€€€€€€€€...................€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€
33333333333324667672222222222222222222222466662222222222222222222222222222222222233256666724677722222222222222222222222222222222222222222222222222222222222222222222222222222222246766666222222222222222222225522222222222222222222222222333332222222222222222222222222222222222222222222222222222222222222000000333332222222200333332222222200333332222222233333333333333333332222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
000000000194038165A00000000000000000000001EE950000000000000000000000000000000000089079CCF703F524000000000000000000000000000000000000000000000000000000000000000000000000000000000312FC9E1000000000000000000000200000000000000000000000000009880000000000000000000000000000000000000000000000000000000000000000F00000000000000000000000000000000000000000000020180703134025850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000194 Chavez                      Annie                                   89 Willow Court                                                                                 Carolina                    PR                          00988                                                             ......00000        ..00000        ..00000        2018070313402585000
/USERKEY   000000000020
....:...10....:...20....:...30....:...40....:...50....:...60....:...70....:...80....:...90....:..100....:..110....:..120....:..130....:..140....:..150....:..160....:..170....:..180....:..190....:..200....:..210....:..220....:..230....:..240....:..250....:..260....:..270....:..280....:..290....:..300....:..310....:..320....:..330....:..340....:..350....:..360....:..370....:..380....:..390....:..400....:..410....:..420....:..430....:..440....:..450....:..460....:..470....:..480....:..490....:..500....:..510..
............€κ?ΒΡ>Λ?>€€€€€€€€€€€€€€€€€€€€ΰ?Κ?ΘΗ`€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€....€λ/>Λ?_Α€λΘΚΑΑΘ€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€δ/ΛΘ/>ΑΚ€€€€€€€€€€€€€€€€€€€€&κ€€€€€€€€€€€€€€€€€€€€€€€€€€.....€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€...........€€€€€€€€.......€€€€€€€€.......€€€€€€€€...................€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€
33333333333325666676622222222222222222222467676722222222222222222222222222222222233332566766625776672222222222222222222222222222222222222222222222222222222222222222222222222222246776667222222222222222222225522222222222222222222222222333332222222222222222222222222222222222222222222222222222222222222000000333332222222200333332222222200333332222222233333333333333333332222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
00000000002002F29E3FE000000000000000000004F2F4890000000000000000000000000000000009805031E3FD503425540000000000000000000000000000000000000000000000000000000000000000000000000000031341E52000000000000000000000200000000000000000000000000006310000000000000000000000000000000000000000000000000000000000000000F00000000000000000000000000000000000000000000020180703134025850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000020 Robinson                    Dorothy                                 9805 Sansome Street                                                                             Castaner                    PR                          00631                                                             ......00000        ..00000        ..00000        2018070313402585000

********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
Conclude, HEX-Dump by Key for KSDS 512/1-12
000000004 - Line count for SYSUT1
000000004 - Line count for SYSUT2

Table of Contents Previous Section Next Section Job Scripts

A job script may be defined as a text file containing job setup information followed by job steps that identify programs to be executed along with parameters unique to the job step. A job script may be created using a text editor. The naming of a job script is determined by the Operating System. A simple job script may contain a single job step that performs a single function. A typical job script will contain multiple job steps executed in a predefined sequence. The status of each job step may be tested at the end of each job step.

Table of Contents Previous Section Next Section CMD, Hex-Dump

The following is a Windows Command File (CUHEXKW3.cmd) that is used to produce a Hex Dump of user-defined records contained within a VSAM, KSDS.

@echo OFF
     set CmdName=CUHEXKW3
rem  * *******************************************************************
rem  *               CUHEXKW3.cmd - a Windows Command File               *
rem  *       This Job Scriptis 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 KSDS, write HEX-Dump RSEQ.
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * The job will read a VSAM, KSDS and write
rem  * to a new Hex-Dump record sequential file.
rem  *
rem  *    ************
rem  *    * CUHEXKW3 *
rem  *    ********cmd*
rem  *         *
rem  *         *
rem  *    ************
rem  *    * ENV1BASE *
rem  *    ********cmd*
rem  *         *
rem  *         *
rem  *    ************
rem  *    * SimoNOTE *
rem  *    ********cmd*
rem  *         *
rem  *         *
rem  *    ************
rem  *    *   RUN    *---------------------------*
rem  *    ********rts*                           *
rem  *         *           ************     ************     ************
rem  *         *           *  SYSUT1  *--*--* CUHEXKC3 *-----*  SYSUT2  *
rem  *         *           *******ksds*  *  ********cbl*     *******rseq*
rem  *         *                         *
rem  *         *           ************  *
rem  *         *           *  SYSUT3  *--*
rem  *         *           *******rseq*
rem  *    ************
rem  *    *   EOJ    *
rem  *    ************
rem  *
rem  * *******************************************************************
rem  * Step 1, Set Environment Variables
rem  *         Delete any previously created work  filef...
rem  *
     call ..\ENV1BASE
     set SYSOUT=%BaseLib1%\LOGS\SYSOUT_%CmdName%.txt
rem  *
     call SimoNOTE "*******************************************************%CmdName%"
     call SimoNOTE "Starting JobName %CmdName%, User is %USERNAME%"
     call SimoNOTE "Identify JobStep Step-1, Housekeeping tasks"
     set SYSUT1=%BaseLib1%\DATA\WRK1\SIMOTIME.DATA.CUSKA512.dat
     set SYSUT2=%BaseLib1%\DATA\WRK1\SIMOTIME.HEXDUMP.CUSKA512.dat
     set SYSUT3=%BaseLib1%\DATA\WRK1\SIMOTIME.HEXDUMP.USERKEYS.dat
rem  *
rem  * *******************************************************************
rem  * Step 2, Create a file that is a list of Customer Numbers...
rem  *
     call SimoNOTE "Identify JobStep Step-2, Create a list of keys"
     set SYSWORK=%BaseLib1%\DATA\TXT1\SIMOTIME.HEXDUMP.USERKEYS.txt
     if exist %SYSWORK% del %SYSWORK%
rem  * ..:....1....:....2....:....3....:....4....:....5....:....6....
echo /USERKEY   000000000010>%SYSWORK%
echo /USERKEY   123456789012>>%SYSWORK%
echo /USERKEY   000000000225>>%SYSWORK%
echo /USERKEY   000000000194>>%SYSWORK%
echo /USERKEY   000000000020>>%SYSWORK%
     call SimoNOTE "StepInfo Convert Line Sequential to Record Sequential"
     set GETLS080=%SYSWORK%
     set PUTRS080=%SYSUT3%
     if exist %PUTRS080% del %PUTRS080%
     run CV80ALAR
     if not ERRORLEVEL = 0 set JobStatus=0030
     if not %JobStatus% == 0000 goto :EojNok
rem  *
rem  * *******************************************************************
rem  * Step 3, Read KSDS, create a new Hex-Dump RSEQ File
rem  *
     call SimoNOTE "Identify JobStep Step-3, Execute Hex-Dump Program"
     call SimoNOTE "DataTake KSA SYSUT1=%SYSUT1%"
     call SimoNOTE "DataDump RSA SYSUT2=%SYSUT2%"
     call SimoNOTE "DataKeys RSA SYSUT3=%SYSUT3%"
     run CUHEXKC3
     if not "%ERRORLEVEL%" == "0" set JobStatus=0010
     if not "%JobStatus%" == "0000" goto EojNOK
rem  *
rem  * *******************************************************************
rem  * Step 4, End-of-Job processing...
rem  *
:EojAOK
     call SimoNOTE "Finished CmdName %CmdName%, Job Status is %JobStatus%"
     goto :End
:EojNOK
     call SimoNOTE "ABENDING CmdName %CmdName%, Job Status is %JobStatus%"
     echo %DATE% - %TIME% Starting User ABEND Processing...>>%SYSLOG%
     set >>%SYSLOG%
     echo %DATE% - %TIME% Complete User ABEND Processing...>>%SYSLOG%
     goto :End
:End
     call SimoNOTE "Conclude SYSOUT is %SYSOUT%"
     if not "%1" == "nopause" pause
     exit /B %JobStatus%

Table of Contents Previous Section Next Section JCL, Hex-Dump

The following is a JCL member (CUHEXKJ3.jcl) that is used to produce a Hex Dump of user-defined records contained within a VSAM, KSDS.

//CUHEXKJ3 JOB (SIMOTIME),'VSAM KSDS HEXDUMP',CLASS=1,MSGCLASS=0,
//             NOTIFY=CSIP1
//* *******************************************************************
//*       CUHEXKJ3.JCL - a JCL Member for Batch Job Processing        *
//*       This JCL Member is provided by SimoTime Technologies        *
//*           (C) Copyright 1987-2019 All Rights Reserved             *
//*             Web Site URL:   http://www.simotime.com               *
//*                   e-mail:   helpdesk@simotime.com                 *
//* *******************************************************************
//*
//* Text   - Hex-Dump if a VSAM, KSDS for batch processing.
//* Author - SimoTime Technologies
//* Date   - January 24, 1996
//*
//*
//* This set of programs will run on a ZOS Mainframe System or on a
//* Windows System and Micro Focus Technologies.
//*
//*                     ************
//*                     * CUHEXKJ3 *
//*                     ********jcl*
//*                          *
//*    ************     ************     ************
//*    *  SYSUT1  *--*--* CUHEXKC3 *--*--*  SYSUT2  *
//*    *******ksds*  *  ********cbl*  *  ************
//*                  *       *        *
//*    ************  *       *        *  ************
//*    *  SYSUT3  *--*       *        *--*  SYSOUT  *
//*    *******rseq*          *           ************
//*                          *
//*                          *
//*                     ************
//*                     *   EOJ    *
//*                     ************
//*
//* *******************************************************************
//* Step 1 of 3, Delete the previously created SYSUT2 file.
//*
//SYSUT2DT EXEC PGM=IEFBR14
//SYSUT2   DD  DSN=SIMOTIME.HEXDUMP.CUSTMAST,DISP=(MOD,DELETE,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=F,LRECL=512,DSORG=PS)
//*
//* *******************************************************************
//* Step 3 of 3, Execute the HEX Dump program.
//* Note: the dump information will be written to the SYSPROBEG file
//* *******************************************************************
//* Dump the content of the user-defined records within a VSAM, KSDS.
//* The results of the dump processing is posted to the SYSUT2 File.
//*
//CUHEXKEX EXEC PGM=CUHEXKC3
//STEPLIB  DD  DSN=SIMOTIME.DEMO.LOADLIB1,DISP=SHR
//SYSUT1   DD  DSN=SIMOTIME.DATA.CUSTMAST,DISP=SHR
//SYSUT2   DD  DSN=SIMOTIME.HEXDUMP.CUSTMAST,
//             DISP=(NEW,KEEP,KEEP),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=F,LRECL=512,DSORG=PS)
//SYSUT3   DD  DSN=SIMOTIME.PDS.PARMLIB(CUSTKEYS),DISP=SHR
//SYSOUT   DD  SYSOUT=*
//

Table of Contents Previous Section Next Section Bash, Hex-Dump

The following is a Bash Script File (cuhexks3.sh) that is used to produce a Hex Dump of user-defined records contained within a VSAM, KSDS.

#!/bin/bash
   JOBNAME=cuhexks3
#  * *******************************************************************
#  *       Bash Script File - provided by SimoTime Technologies        *
#  *           (C) Copyright 1987-2018 All Rights Reserved             *
#  *             Web Site URL:   http://www.simotime.com               *
#  *                   e-mail:   helpdesk@simotime.com                 *
#  * *******************************************************************
#  *
#  * Text    - Execute program, Justify Text String within a Field
#  * Author  - SimoTime Technologies
#  * Date    - November 11, 2003
#  * Version - 06.07.16
#  *
#  * Prepare the environment by mapping the file names.
#  * Execute the 80/80 copy file program.
#  *
#  * ********************************************************************
#  * Step 1 of 3, Prepare the System Environment.
#  *
   JOBSTATUS=0
   for textstring in $(cat ENV4SYS1.txt);
   do
#      # * The following statement will replace all occurences
#      # * of DL_BASESYS1 with the value of the BASESYS1
#      # * environment variable.
       textstring=${textstring//DL_BASESYS1/$BASESYS1}
#      # * The following statement will replace all occurences
#      # * of BASHUSER_JOBNAME with the value of the JOBNAME
#      # * environment variable.
       textstring=${textstring/DL_JOBNAME/$JOBNAME}
       export $textstring
       rc=$?
       if [ $rc != 0 ]
       then
          simonote.sh "#  $textstring - Return Code is $rc"
          JOBSTATUS=$rc
       fi
   done
#  *
   simonote.sh "************************************************************$JOBNAME"
   simonote.sh "# Starting Job Name $JOBNAME"
   simonote.sh "# SIMOSYS1........... $BASESYS1"
   simonote.sh "# SIMONOTE........... $SIMONOTE"
   simonote.sh "# COB_LIBS........... $COB_LIBS"
   simonote.sh "# COB_LIBRARY_PATH... $COB_LIBRARY_PATH"
#  *
#  * Prepare the environment, map the file names...
   export SYSUT1=$BASESYS1/SIMOSAM1/DEVL/DATA/APPL/SIMOTIME.DATA.CUSTMAST.dat
   export SYSUT2=$BASESYS1/SIMOSAM1/DEVL/DATA/APPL/SIMOTIME.HEXDUMP.CUSTMAST.dat
   export SYSUT3=$BASESYS1/SIMOSAM1/DEVL/DATA/APPL/SIMOTIME.HEXDUMP.USERKEYS.dat
   simonote.sh "# DATATAKE is $SYSUT1"
   simonote.sh "# DATAMAKE is $SYSUT2"
#  *
#  * ********************************************************************
#  * Step 2 of 3, Run the program.
#  *
   if [ -f "$SYSUT2" ]
   then
      rm $SYSUT2
   fi
   cobcrun CUHEXKC3 | tee $BASESYS1/SIMOSAM1/DEVL/LOGS/SYSOUT_USERPROG_CUHEXKC3.txt
   rc=$?
   if [ $rc != 0 ]
   then
      simonote.sh "# ABENDING $name - Return Code is $rc"
      JOBSTATUS=$rc
   else
      ((AOK_Count++))
   fi
#  *
#  * ********************************************************************
#  * Step 3 of 3, End of Job Processing.
#  *
     if [ "$JOBSTATUS" = "0" ]
     then
        simonote.sh "# Finished Job Name $JOBNAME"
     else
        simonote.sh "# ABENDING Job Name $JOBNAME"
     fi


Table of Contents Previous Section Next Section Prepare

This section describes the tasks that are required prior to executing the programs in a unit testing environment.

Table of Contents Previous Section Next Section Generate a Hex-Dump Program

The following is the Process Control File (CUHEXK03.pcf) that is used to produce a Hex Dump.

***********************************************************************
*                CUHEXK03.pcf - a Process Control File                *
*    Hex-Dump for User-Defined records in the Customer Master File    *
*             (C) Copyright 1987-2019 All Rights Reserved             *
*               Web Site URL:   http://www.simotime.com               *
*                     e-mail:   helpdesk@simotime.com                 *
***********************************************************************
* SYSUT1 is the Customer Master File, Indexed, 512-byte records.      *
* SYSUT2 is a Record Sequential file, 512-byte fixed-length records.  *
***********************************************************************
* This Process Control File will be used to generate a COBOL program
* that will do a hexadecimal dump of user-defined records contained
* in the Customer Master File.
*
* The Customer Master File is a VSAM, Key Sequenced data Set (KSDS).
*
* Refer to http://www.simotime.com/utcomp01.htm for additional detail
* about the PCF statements for Data Validate, Dump and Compare.
*
* The following group of statements will define the high level
* functions and processes to be performed.
*
&SIMOPREP  call ..\Env1BASE
&USERPREP  call USERCOGI
&CONFORM   IBM
&COPYFILE  CUSTCB01.cpy
&HTMLFILE  custcb01.htm
&USRMODEL  SYSHEXK3.txt
&USRXFILE  AE0437B1
*
* The following group of statements will define the behavioral
* characteristics and environment variable for the file I/O Program
* to be generated.
*
*HEAD34    ....:....1....:....2....:....3....
&HEAD34    HEX-Dump by Key for KSDS 512/1-12
&PROGID    CUHEXKC3
&UT1ACCESS RANDOM
&SYSUT1    name=SYSUT1 org=indexed    recfm=fixed rlen=512 kpos=1 klen=12
&SYSUT2    name=SYSUT2 org=Sequential recfm=FIXED rlen=512
&SYSUT3    name=SYSUT3 org=Sequential recfm=FIXED rlen=80
*
* The following will determine the HEX-Dump output. The &DFORMAT
* statement will create five (5) lines of dump information.
*    ASC - 1 line of possible ASCII character translation.
*    HEX - 2 lnes of HEX dump. 1st line is high-order nibble.
*                              2nd line is low-order nibble.
*    EBC - 1 line of possible EBCDIC character translation.
*    RPI - 1 line for Relative Position Indicator.
*
&HEXDUMP   SYSUT1 pos 0001 len 512
&DFORMAT   ASC HEX EBC RPI
&SYSLOG    SIMOV32K TEXT
*
&END

Table of Contents Previous Section Next Section Technical Details

This section describes additional technical details not covered in previous sections of this document.

Table of Contents Previous Section Next Section Compiler Directives

The following COBOL compiler directives were used to compile the CUHEXKC3 program.

DIALECT"ENTCOBOL"
CHARSET"ASCII"
ASSIGN"EXTERNAL"
IDXFORMAT"8"
IBMCOMP
NOTRUNC
HOSTNUMMOVE
HOSTNUMCOMPARE
NOSIGNFIXUP
HOSTARITHMETIC
NOHOSTFD
CHECKNUM
ANIM
COBIDY
NOOPTIONAL-FILE
outdd"SYSOUT 121 L"
SHARE-OUTDD
DATE
TIME
DATAMAP
settings
list()
noform

Table of Contents Previous Section Next Section Generated COBOL Program

The following is the generated COBOL program (CUHEXKC3.cbl) that is used to produce a Hex Dump of user-defined records contained within a VSAM, KSDS.

       IDENTIFICATION DIVISION.
       PROGRAM-ID.    CUHEXKC3.
       AUTHOR.        SIMOTIME TECHNOLOGIES.
      *****************************************************************
      *           This program was generated by SimoZAPS              *
      *             A product of SimoTime Technologies                *
      *        Our e-mail address is: helpdesk@simotime.com           *
      *     Also, visit our Web Site at http://www.simotime.com       *
      *                                                               *
      *  Generation Date: 2018-10-11  Generation Time: 21:41:44:97    *
      *                                                               *
      *                                   Record    Record     Key    *
      *  Function  Name     Organization  Format    Max-Min  Pos-Len  *
      *  PRIMARY   SYSUT1   INDEXED       FIXED      00512    00001   *
      *                                                       00012   *
      *  SECONDARY SYSUT2   SEQUENTIAL    FIXED      00512            *
      *                                                               *
      *                                                               *
      *****************************************************************
       ENVIRONMENT DIVISION.
       INPUT-OUTPUT SECTION.
       FILE-CONTROL.
           SELECT SYSUT1-FILE  ASSIGN TO       SYSUT1
                  ORGANIZATION  IS INDEXED
                  ACCESS MODE   IS RANDOM
                  RECORD KEY    IS SYSUT1-PKEY-00001-00012
                  FILE STATUS   IS SYSUT1-STATUS.
           SELECT SYSUT2-FILE  ASSIGN TO       SYSUT2
                  ORGANIZATION  IS SEQUENTIAL
                  ACCESS MODE   IS SEQUENTIAL
                  FILE STATUS   IS SYSUT2-STATUS.
           SELECT SYSUT3-FILE  ASSIGN TO       SYSUT3
                  ORGANIZATION  IS SEQUENTIAL
                  ACCESS MODE   IS SEQUENTIAL
                  FILE STATUS   IS SYSUT3-STATUS.

      *****************************************************************
       DATA DIVISION.
       FILE SECTION.
       FD  SYSUT1-FILE
           DATA RECORD    IS SYSUT1-REC
           .
       01  SYSUT1-REC.
           05  SYSUT1-PKEY-00001-00012          PIC X(00012).
           05  SYSUT1-DATA-00013-00500          PIC X(00500).

       FD  SYSUT2-FILE
           DATA RECORD    IS SYSUT2-REC
           .
       01  SYSUT2-REC.
           05  SYSUT2-DATA-01 PIC X(00512).

       FD  SYSUT3-FILE
           DATA RECORD    IS SYSUT3-REC
           .
       01  SYSUT3-REC.
           05  SYSUT3-DATA-01 PIC X(80).

      *****************************************************************
      * This program was created with the SYSHEXK3.TXT file as the    *
      * template for the File I/O. It is intended for use with the    *
      * Hex Dump facility.                                            *
      *                                                               *
      * The SYSHEXK3 template provides for the random reading of an   *
      * input file (SYSUT1, a VSAM, KSDS) and the sequential writing  *
      * to an output file (SYSUT2, a sequential file) that contains   *
      * Hexadecimal dump information.                                 *
      *                                                               *
      * The records to be read from SYSUT1 are defined in a control   *
      * file (SYSUT3) that contains a list of primary record keys.    *
      *                                                               *
      * For more information or questions please contact SimoTime     *
      * Technologies. The version control number is 18.06.01          *
      *                                                               *
      *        Our e-mail address is: helpdesk@simotime.com           *
      *     Also, visit our Web Site at http://www.simotime.com       *
      *****************************************************************
       WORKING-STORAGE SECTION.
       01  SIM-TITLE.
           05  T1 pic X(11) value '* CUHEXKC3 '.
           05  T2 pic X(34) value 'HEX-Dump by Key for KSDS 512/1-12 '.
           05  T3 pic X(10) value ' v18.06.01'.
           05  T4 pic X(24) value '   helpdesk@simotime.com'.
       01  SIM-COPYRIGHT.
           05  C1 pic X(11) value '* CUHEXKC3 '.
           05  C2 pic X(32) value 'This Data File HexDump Member wa'.
           05  C3 pic X(32) value 's generated by SimoTime Technolo'.
           05  C4 pic X(04) value 'gies'.

       01  SIM-THANKS-01.
           05  C1 pic X(11) value '* CUHEXKC3 '.
           05  C2 pic X(32) value 'This Data File HexDump Member wa'.
           05  C3 pic X(32) value 's generated by SimoTime Technolo'.
           05  C4 pic X(04) value 'gies'.

       01  SIM-THANKS-02.
           05  C1 pic X(11) value '* CUHEXKC3 '.
           05  C2 pic X(32) value 'Please send all comments or sugg'.
           05  C3 pic X(32) value 'estions to the helpdesk@simotime'.
           05  C4 pic X(04) value '.com'.

       01  SYSUT1-STATUS.
           05  SYSUT1-STATUS-L     pic X.
           05  SYSUT1-STATUS-R     pic X.
       01  SYSUT1-EOF              pic X       value 'N'.
       01  SYSUT1-OPEN-FLAG        pic X       value 'C'.

       01  SYSUT2-STATUS.
           05  SYSUT2-STATUS-L     pic X.
           05  SYSUT2-STATUS-R     pic X.
       01  SYSUT2-EOF              pic X       value 'N'.
       01  SYSUT2-OPEN-FLAG        pic X       value 'C'.

       01  SYSUT3-STATUS.
           05  SYSUT3-STATUS-L     pic X.
           05  SYSUT3-STATUS-R     pic X.
       01  SYSUT3-EOF              pic X       value 'N'.
       01  SYSUT3-OPEN-FLAG        pic X       value 'C'.

       01  SYSUT1-LRECL            pic 9(5)    value 00512.
       01  SYSUT2-LRECL            pic 9(5)    value 00512.
       01  SYSUT3-LRECL            pic 9(5)    value 00080.
       01  KEY-LEN                 pic 9(5)    value 00012.

      *****************************************************************
      * The following buffers are used to create a four-byte status   *
      * code that may be displayed.                                   *
      *****************************************************************
       01  IO-STATUS.
           05  IO-STAT1            pic X.
           05  IO-STAT2            pic X.
       01  IO-STATUS-04.
           05  IO-STATUS-0401      pic 9     value 0.
           05  IO-STATUS-0403      pic 999   value 0.
       01  TWO-BYTES-BINARY        pic 9(4)  BINARY.
       01  TWO-BYTES-ALPHA         redefines TWO-BYTES-BINARY.
           05  TWO-BYTES-LEFT      pic X.
           05  TWO-BYTES-RIGHT     pic X.

      *****************************************************************
      * Message Buffer used by the Z-DISPLAY-TO-SYSOUT routine.    *
      *****************************************************************
       01  MESSAGE-BUFFER.
           05  MESSAGE-HEADER      pic X(11)   value '* CUHEXKC3 '.
           05  MESSAGE-TEXT.
               10  MESSAGE-TEXT-1  pic X(68)   value SPACES.
               10  MESSAGE-TEXT-2  pic X(188)  value SPACES.
       01  MB-CTR                  pic 9(3)    value 0.
       01  MB-LOB                  pic 9(3)    value 267.
       01  MB-LSB                  pic 9(3)    value 267.

      *****************************************************************
       01  PROGRAM-NAME            pic X(8)     value 'CUHEXKC3'.

       01  GROUP-DELIMITER         pic X        value 'Y'.

       01  INFO-STATEMENT.
           05  INFO-SHORT.
               10  INFO-ID pic X(8)    value 'Starting'.
               10  filler  pic X(2)    value ', '.
               10  filler  pic X(34)
                   value   'HEX-Dump by Key for KSDS 512/1-12 '.
           05  filler      pic X(24)
               value ' http://www.SimoTime.com'.

       01  APPL-RESULT             pic S9(9)    comp.
           88  APPL-AOK            value 0.
           88  APPL-EOF            value 16.

       01  PT-1            pic 9(5)    value 0.
       01  PT-2            pic 9(5)    value 0.
       01  WORK-05         pic X(5).
       01  BN-2-GROUP.
           05  BN-2-VALUE  pic 9(3)    comp value 0.

       01  SEQ-GROUP       pic 9(4)    value 3124.
       01  SEQ-TABLE       redefines   SEQ-GROUP.
           05  SEQ-VALUE   pic 9       occurs 4 times.
       01  SEQ-IX          pic 9       value 0.

       01  DUMP-FLAGS.
           05  DUMP-ASC        pic X       value 'Y'.
           05  DUMP-EBC        pic X       value 'Y'.
           05  DUMP-HEX        pic X       value 'Y'.
           05  DUMP-RPI        pic X       value 'Y'.

       01  RPI-10.
           05  RPI-ALPHA   pic X(5)    value '....:'.
           05  RPI-VALUE   pic 9(5)    value 10.

       01  LOOP-REDO       pic 9(5)    value 0.

       01  SYSUT1-TOTAL.
           05  SYSUT1-RDR  pic 9(9)    value 0.
           05  filler      pic X(3)    value ' - '.
           05  filler      pic X(23)   value 'Line count for SYSUT1  '.
       01  SYSUT2-TOTAL.
           05  SYSUT2-ADD  pic 9(9)    value 0.
           05  filler      pic X(3)    value ' - '.
           05  filler      pic X(23)   value 'Line count for SYSUT2  '.
       01  SYSUT3-TOTAL.
           05  SYSUT3-RDR  pic 9(9)  value 0.
           05  filler      pic X(3)  value ' - '.
           05  filler      pic X(25) value 'Record count for SYSUT3  '.

       COPY HEXTAB02.


      *****************************************************************
       PROCEDURE DIVISION.
           perform JOB-STARTING

           perform until SYSUT3-STATUS not = '00'
             perform SYSUT3-READ
               if  SYSUT3-STATUS = '00'
                   if  SYSUT3-DATA-01(1:11) = '/USERKEY   '
                       move SYSUT3-DATA-01(12:KEY-LEN)
                         to SYSUT1-PKEY-00001-00012
                       perform SYSUT1-READ
                       if  SYSUT1-STATUS = '00'
                           add 1 to SYSUT1-RDR
                           move SYSUT3-DATA-01(1:60)
                             to SYSUT2-REC(1:60)
                           perform SYSUT2-WRITE
                           perform ACTION-DUMP-REQUEST
                       else
                           move all '.' to SYSUT2-REC
                           perform SYSUT2-WRITE
                           move SYSUT3-DATA-01(1:60)
                             to SYSUT2-REC(1:60)
                           inspect SYSUT2-REC
                             replacing first '                  '
                                          by ', Record not found'
                           perform SYSUT2-WRITE
                       end-if
                   else
                       move all '.' to SYSUT2-REC
                       perform SYSUT2-WRITE
                       if  SYSUT3-DATA-01(1:1) not = '*'
                           move SYSUT3-DATA-01(1:60)
                             to SYSUT2-REC(1:60)
                           inspect SYSUT2-REC
                             replacing first '                  '
                                          by ', Invalid /request'
                           perform SYSUT2-WRITE
                       end-if
                   end-if
               end-if
           end-perform

           perform JOB-FINISHED

           GOBACK.

      *****************************************************************
       ACTION-DUMP-REQUEST.
           compute LOOP-REDO = (SYSUT2-LRECL / 10)
           move all '.' to SYSUT2-REC
           if  DUMP-RPI = 'Y'
               add 1 to ZERO giving PT-1
               add 10 to ZERO giving RPI-VALUE
               perform LOOP-REDO times
                 move RPI-10 to SYSUT2-REC(PT-1:10)
                 if  SYSUT2-REC(PT-1 + 5:3) = '000'
                     move '...' to SYSUT2-REC(PT-1 + 5:3)
                 else
                     if  SYSUT2-REC(PT-1 + 5:2) = '00'
                         move '..' to SYSUT2-REC(PT-1 + 5:2)
                     else
                        if  SYSUT2-REC(PT-1 + 5:1) = '0'
                            move '.' to SYSUT2-REC(PT-1 + 5:1)
                        end-if
                     end-if
                 end-if
                 add 10 to RPI-VALUE
                 add 10 to PT-1
               end-perform
               perform SYSUT2-WRITE
           end-if

           add 1 to ZERO giving SEQ-IX
           add SEQ-VALUE(SEQ-IX) to ZERO giving PT-2
           perform 4 times
             add 1 to ZERO giving PT-1
             add SEQ-VALUE(SEQ-IX) to ZERO giving PT-2
             if  PT-2 = 1 and DUMP-HEX = 'Y'
             or  PT-2 = 2 and DUMP-HEX = 'Y'
             or  PT-2 = 3 and DUMP-EBC = 'Y'
             or  PT-2 = 4 and DUMP-ASC = 'Y'
                 perform SYSUT2-LRECL times
                   move SYSUT1-REC(PT-1:1) to BN-2-GROUP(2:1)
                   move TAB-X1(BN-2-VALUE + 1) to WORK-05
                   move WORK-05(PT-2:1) to SYSUT2-REC(PT-1:1)
                   add 1 to PT-1
                 end-perform
                 perform SYSUT2-WRITE
             end-if
             add 1 to SEQ-IX
           end-perform
           if  SYSUT2-STATUS = '00'
               add 1 to SYSUT2-ADD
           end-if
           exit.

      *****************************************************************
       JOB-FINISHED.
           if  GROUP-DELIMITER = 'Y'
               move SPACES  to SYSUT2-REC
               perform SYSUT2-WRITE
               move all '*' to SYSUT2-REC
               perform SYSUT2-WRITE
           end-if

           move 'Conclude' to INFO-ID
           move INFO-SHORT to SYSUT2-REC
               perform SYSUT2-WRITE
           move 'Finished' to INFO-ID

           move SYSUT1-TOTAL to SYSUT2-REC
           perform SYSUT2-WRITE

           move SYSUT2-TOTAL to SYSUT2-rec
           perform SYSUT2-WRITE

           perform Z-THANK-YOU.

           perform SYSUT3-CLOSE
           perform SYSUT2-CLOSE
           perform SYSUT1-CLOSE

           exit.

      *****************************************************************
       JOB-STARTING.
           perform Z-POST-COPYRIGHT
           perform SYSUT1-OPEN
           perform SYSUT2-OPEN
           perform SYSUT3-OPEN

           move all '*' to SYSUT2-REC
           perform SYSUT2-WRITE
           move SIM-TITLE to SYSUT2-REC
           perform SYSUT2-WRITE
           move SIM-COPYRIGHT to SYSUT2-REC
           perform SYSUT2-WRITE
           move all '*' to SYSUT2-REC
           perform SYSUT2-WRITE
           move INFO-STATEMENT to SYSUT2-REC
           perform SYSUT2-WRITE
           exit.

      *****************************************************************
      * I/O Routines for the INPUT File...                            *
      *****************************************************************
       SYSUT1-CLOSE.
           add 8 to ZERO giving APPL-RESULT.
           close SYSUT1-FILE
           if  SYSUT1-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
           else
               add 12 to ZERO giving APPL-RESULT
           end-if
           if  APPL-AOK
               CONTINUE
           else
               move 'CLOSE Failure with SYSUT1  ' to MESSAGE-TEXT
               perform Z-DISPLAY-TO-SYSOUT
               move SYSUT1-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
               perform Z-ABEND-PROGRAM
           end-if
           exit.
      *---------------------------------------------------------------*
       SYSUT1-READ.
           read SYSUT1-FILE
           if  SYSUT1-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
           else
               if  SYSUT1-STATUS = '10'
                   add 16 to ZERO giving APPL-RESULT
               else
                   add 12 to ZERO giving APPL-RESULT
               end-if
           end-if
           if  APPL-AOK
               CONTINUE
           else
               if  APPL-EOF
                   move 'Y' to SYSUT1-EOF
               else
                   move 'READ Failure with SYSUT1  ' to MESSAGE-TEXT
                   perform Z-DISPLAY-TO-SYSOUT
                   move SYSUT1-STATUS to IO-STATUS
                   perform Z-DISPLAY-IO-STATUS
      *            perform Z-ABEND-PROGRAM
               end-if
           end-if
           exit.
      *---------------------------------------------------------------*
       SYSUT1-OPEN.
           add 8 to ZERO giving APPL-RESULT.
           open input SYSUT1-FILE
           if  SYSUT1-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
               move 'O' to SYSUT1-OPEN-FLAG
           else
               add 12 to ZERO giving APPL-RESULT
           end-if
           if  APPL-AOK
               CONTINUE
           else
               move 'OPEN Failure with SYSUT1  ' to MESSAGE-TEXT
               perform Z-DISPLAY-TO-CONSOLE
               perform Z-DISPLAY-TO-SYSOUT
               move SYSUT1-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
               perform Z-ABEND-PROGRAM
           end-if
           exit.

      *****************************************************************
      * I/O Routines for the OUTPUT File...                           *
      *****************************************************************
       SYSUT2-WRITE.
           if  SYSUT2-OPEN-FLAG = 'C'
               perform SYSUT2-OPEN
           end-if
           write SYSUT2-REC
           if  SYSUT2-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
           else
               if  SYSUT2-STATUS = '10'
                   add 16 to ZERO giving APPL-RESULT
               else
                   add 12 to ZERO giving APPL-RESULT
               end-if
           end-if.
           if  APPL-AOK
               CONTINUE
           else
               move 'WRITE Failure with SYSUT2  ' to MESSAGE-TEXT
               perform Z-DISPLAY-TO-SYSOUT
               move SYSUT2-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
               perform Z-ABEND-PROGRAM
           end-if
           exit.
      *---------------------------------------------------------------*
       SYSUT2-OPEN.
           add 8 to ZERO giving APPL-RESULT.
           open OUTPUT SYSUT2-FILE
           if  SYSUT2-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
               move 'O' to SYSUT2-OPEN-FLAG
           else
               add 12 to ZERO giving APPL-RESULT
           end-if
           if  APPL-AOK
               CONTINUE
           else
               move 'OPEN Failure with SYSUT2  ' to MESSAGE-TEXT
               perform Z-DISPLAY-TO-CONSOLE
               perform Z-DISPLAY-TO-SYSOUT
               move SYSUT2-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
               perform Z-ABEND-PROGRAM
           end-if
           exit.
      *---------------------------------------------------------------*
       SYSUT2-CLOSE.
           add 8 to ZERO giving APPL-RESULT.
           close SYSUT2-FILE
           if  SYSUT2-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
               move 'C' to SYSUT2-OPEN-FLAG
           else
               add 12 to ZERO giving APPL-RESULT
           end-if
           if  APPL-AOK
               CONTINUE
           else
               move 'CLOSE Failure with SYSUT2  ' to MESSAGE-TEXT
               perform Z-DISPLAY-TO-SYSOUT
               move SYSUT2-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
               perform Z-ABEND-PROGRAM
           end-if
           exit.

      *****************************************************************
      * I/O Routines for the Control or Parameter File...             *
      *****************************************************************
       SYSUT3-READ.
           read SYSUT3-FILE
           if  SYSUT3-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
               add 1 to SYSUT3-RDR
           else
               if  SYSUT3-STATUS = '10'
                   add 16 to ZERO giving APPL-RESULT
               else
                   add 12 to ZERO giving APPL-RESULT
               end-if
           end-if.
           if  APPL-AOK
               CONTINUE
           else
               if  APPL-EOF
                   move 'Y' to SYSUT3-EOF
               else
                   move 'READ Failure with SYSUT3  ' to MESSAGE-TEXT
                   perform Z-DISPLAY-TO-SYSOUT
                   move SYSUT3-STATUS to IO-STATUS
                   perform Z-DISPLAY-IO-STATUS
                   perform Z-ABEND-PROGRAM
               end-if
           end-if
           exit.
      *---------------------------------------------------------------*
       SYSUT3-OPEN.
           add 8 to ZERO giving APPL-RESULT.
           open input SYSUT3-FILE
           if  SYSUT3-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
               move 'O' to SYSUT3-OPEN-FLAG
           else
               add 12 to ZERO giving APPL-RESULT
           end-if
           if  APPL-AOK
               CONTINUE
           else
               move 'OPEN Failure with SYSUT3  ' to MESSAGE-TEXT
               perform Z-DISPLAY-TO-CONSOLE
               perform Z-DISPLAY-TO-SYSOUT
               move SYSUT3-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
           end-if
           exit.
      *---------------------------------------------------------------*
       SYSUT3-CLOSE.
           add 8 to ZERO giving APPL-RESULT.
           close SYSUT3-FILE
           if  SYSUT3-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
               move 'C' to SYSUT3-OPEN-FLAG
           else
               add 12 to ZERO giving APPL-RESULT
           end-if
           if  APPL-AOK
               CONTINUE
           else
               move 'CLOSE Failure with SYSUT3  ' to MESSAGE-TEXT
               perform Z-DISPLAY-TO-SYSOUT
               move SYSUT3-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
               perform Z-ABEND-PROGRAM
           end-if
           exit.

      *****************************************************************
      * The following Z-ROUTINES provide administrative functions     *
      * for this program.                                             *
      *****************************************************************
      * ABEND the program, post a message to the console and issue    *
      * a STOP RUN.                                                   *
      *****************************************************************
       Z-ABEND-PROGRAM.
           if  MESSAGE-TEXT not = SPACES
               perform Z-DISPLAY-TO-SYSOUT
           end-if
           move 'PROGRAM-IS-ABENDING...'  to MESSAGE-TEXT
           perform Z-DISPLAY-TO-SYSOUT
           add 12 to ZERO giving RETURN-CODE
           STOP RUN.
      *    exit.

      *****************************************************************
      * Display CONSOLE messages...                                   *
      *****************************************************************
       Z-DISPLAY-TO-SYSOUT.
           perform Z-DISPLAY-MESSAGE-SIZE
           display MESSAGE-BUFFER(1:MB-LSB)
           move all SPACES to MESSAGE-TEXT
           exit.
      *---------------------------------------------------------------*
       Z-DISPLAY-TO-CONSOLE.
           perform Z-DISPLAY-MESSAGE-SIZE
           display MESSAGE-BUFFER(1:MB-LSB) upon console
           exit.
      *---------------------------------------------------------------*
       Z-DISPLAY-MESSAGE-SIZE.
           if  MESSAGE-TEXT-2 = SPACES
               add 79 to ZERO giving MB-LSB
           else
               add MB-LOB to ZERO giving MB-LSB
           end-if
           perform until MB-LSB < 2
                      or MESSAGE-BUFFER(MB-LSB:1) not = SPACE
             if  MESSAGE-BUFFER(MB-LSB:1) = SPACE
                 subtract 1 from MB-LSB
             end-if
           end-perform
           subtract MB-LSB from MB-LOB giving MB-CTR
           exit.

      *****************************************************************
      * Display the file status bytes. This routine will display as   *
      * four digits. If the full two byte file status is numeric it   *
      * will display as 00nn. If the 1st byte is a numeric nine (9)   *
      * the second byte will be treated as a binary number and will   *
      * display as 9nnn.                                              *
      *****************************************************************
       Z-DISPLAY-IO-STATUS.
           if  IO-STATUS not NUMERIC
           or  IO-STAT1 = '9'
               move IO-STAT1 to IO-STATUS-04(1:1)
               subtract TWO-BYTES-BINARY from TWO-BYTES-BINARY
               move IO-STAT2 to TWO-BYTES-RIGHT
               add TWO-BYTES-BINARY to ZERO giving IO-STATUS-0403
               move 'File Status is: nnnn' to MESSAGE-TEXT
               move IO-STATUS-04 to MESSAGE-TEXT(17:4)
               perform Z-DISPLAY-TO-SYSOUT
           else
               move '0000' to IO-STATUS-04
               move IO-STATUS to IO-STATUS-04(3:2)
               move 'File Status is: nnnn' to MESSAGE-TEXT
               move IO-STATUS-04 to MESSAGE-TEXT(17:4)
               perform Z-DISPLAY-TO-SYSOUT
           end-if
           exit.

      *****************************************************************
       Z-POST-COPYRIGHT.
           display SIM-TITLE
           display SIM-COPYRIGHT
           exit.

      *****************************************************************
       Z-THANK-YOU.
           move SIM-THANKS-01 to MESSAGE-BUFFER
           perform Z-DISPLAY-TO-SYSOUT
           move SIM-THANKS-02 to MESSAGE-BUFFER
           perform Z-DISPLAY-TO-SYSOUT
           exit.
      *****************************************************************
      *           This program was generated by SimoZAPS              *
      *             A product of SimoTime Technologies                *
      *        Our e-mail address is: helpdesk@simotime.com           *
      *     Also, visit our Web Site at http://www.simotime.com       *
      *                                                               *
      *  Generation Date: 2018-10-11  Generation Time: 21:41:45:01    *
      *****************************************************************

Table of Contents Previous Section Next Section Summary

The generated program will create a Hexadecimal dump file (or HEXDUMP) of user-defined records in the Customer Master VSAM, Key Sequenced Data Set (KSDS). This document may be used 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.

Note: The latest versions of the SimoTime Documents and Program Suites are available on the Internet and may be accessed using the Link to Internet icon. If a user has a SimoTime Enterprise License the Documents and Program Suites may be available on a local server and accessed using the Link to Server icon.

Link to Internet   Link to Server   Explore How to Convert an EBCDIC-encoded Sequential File to an ASCII-encoded VSAM, KSDS using a generated COBOL Program. This conversion reads an EBCDIC-encoded, record sequential file that contains binary and packed numeric information. Based on a COBOL Copy file that defines the record structure the EBCDIC information is converted to ASCII and written to the ASCII-encoded, VSAM, KSDS. The integrity of the numeric information is maintained.

Link to Internet   Link to Server   Explore An Enterprise System Model that describes and demonstrates how Applications that were running on a Mainframe System and non-relational data that was located on the Mainframe System were copied and deployed in a Microsoft Windows environment with Micro Focus Enterprise Server.

Link to Internet   Link to Server   Explore the COBOL Connection for more examples of COBOL programming techniques and sample code.

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

This suite of programs and documentation is available for download. Link to an Evaluation zPAK Option that includes the program members, documentation and control files.

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

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

Explore the GnuCOBOL Technologies available from SourceForge. SourceForge is an Open Source community resource dedicated to helping open source projects be as successful as possible. GnuCOBOL (formerly OpenCOBOL) is a COBOL compiler with run time support. The compiler (cobc) translates COBOL source to executable using intermediate C, designated C compiler and linker. This link will require an Internet Connection.

Table of Contents Previous Section Next Section Glossary of Terms

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

Table of Contents Previous Section Next Section Comments or Feedback

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

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

 

We appreciate hearing from you.

Table of Contents Previous Section Next Section Company Overview

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

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

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

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


Return-to-Top
CUHEXK03, Hex Dump for Customer Master
Copyright © 1987-2024
SimoTime Technologies and Services
All Rights Reserved
When technology complements business
http://www.simotime.com