Text and Numeric Formats
Hex Dump with ASC and EBC
  Table of Contents  v- 24.01.01 - hexn8001.htm 
  Introduction
  Execute
  Diagram of Hex-Dump Process
  Sample Hex-Dump Output
  CMD, Hex-Dump
  JCL, Hex-Dump
  Prepare
  Generate a Hex-Dump Program
  Technical Details
  Compiler Directives
  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

This test case will describe and demonstrate how to create a Hexadecimal dump file (or HEXDUMP) of all the records (fixed record length of 80 bytes) in a record sequential (RSEQ) file

The programs in this test case were generated using SimoTime Technologies. The generated programs will compile and execute on a Linux, UNIX or Windows System with Micro Focus Enterprise Developer/Server, version 2.2 or later.

The programs in this test case should compile and execute on a ZOS Mainframe. The JOB statement and the data set names (DSN's) will need to be changed to comply with security and naming standards on the host mainframe system.

Note:  The unit testing was 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 all the records in a Record Sequential file.

             
Entry Point
ZOS
Entry Point
Linux
Entry Point
Windows
   
   
   
HEXN80J1
jcl
hexn80s1
sh
HEXN80W1
cmd
Job Script for Hex-Dump
   
   
 
 
   
   
 
 
   
   
   
   
 
 
 
 
   
   
   
SYSUT1
see Note-1
 
 
HXR80LC1
cbl
 
 
SYSUT2
see Note-2
Read files and post Hex Dump
   
   
   
if SYSUT1
End-of-File
if End-of-File go to End-of-Job
   
   
 
 
No
 
 
 
 
   
   
Yes
EOJ
 
Note-1: SYSUT1 - a Record Sequential file with fixed length records of 80 bytes.
Note-2: SYSUT2 - is used to write the Hex-Dump information to a Line Sequential file with a maximum record size of 80 bytes.
Batch Processing, A Hexadecimal Dump Program

The Record Sequential file used in this test case has 80 byte records containing text strings (ASCII or EBCDIC) and Numeric Values (Binary, Packed Decimal and Zoned Decimal).

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

The following shows the HEX-Dump of the records that contain text strings (ASCII or EBCDIC) and numeric values that are stored in various formats (Binary, Packed Decimal and Zoned Decimal).

For each record in a file the HEX-Dump will produce two lines of header information and four lines of Hex-Dump information.

1. The Header Information
1.1. Identifies the File Name and the Record Number or Key within the file
1.2. A position indicator for each byte in a record
2. The Hexadecimal Dump Information
2.1. The possible interpretation for an EBCDIC character or symbol
2.2. The high-order nibble of the byte for the Hex-dump
2.3. The low-order nibble of the byte for the Hex-dump
2.4. The possible interpretation for an ASCII character or symbol

 

This is the Hex-Dump of the records in a record sequential file with a fixed length record structure of 80 bytes.

********************************************************************************
* HXR80LC1 RSEQ-80 Input to LSEQ-80 HEX-Dump  v18.06.15   helpdesk@simotime.com
* HXR80LC1 This Data File HexDump Member was generated by SimoTime Technologies
********************************************************************************
Starting, RSEQ-80 Input to LSEQ-80 HEX-Dump  http://www.SimoTime.com
SYSUT2  000000001---------------------------------------------------------------
....:...10....:...20....:...30....:...40....:...50....:...60....:...70....:...80
!àí¬.¬.€.....!àë¬.¬.€.....&.í¬.¬.€...&.ë¬.¬.€...â+í¬.¬.€....â+ë¬.¬.€....ãñ<<áꀀ
54553532333335455353233333545535320005455353200044553532000044553532000044444522
A45F5F0000000A43F5F00000000B5F5F0000F0B3F5F0000C2E5F5F0000002E3F5F00000069CC5200
ZDU_5_0 00000ZDS_5_0 00000PKU_5_0 ...PKS_5_0 ...BNU_5_0 ....BNS_5_0 ....FILLER
SYSUT2  000000002---------------------------------------------------------------
....:...10....:...20....:...30....:...40....:...50....:...60....:...70....:...80
!àí¬.¬.€.....!àë¬.¬.€.....&.í¬.¬.€...&.ë¬.¬.€...â+í¬.¬.€...#â+ë¬.¬.€...#ãñ<<áꀀ
54553532333335455353233333545535320135455353201344553532000744553532000744444522
A45F5F0000123A43F5F00001230B5F5F0002F0B3F5F0002C2E5F5F00000B2E3F5F00000B69CC5200
ZDU_5_0 00123ZDS_5_0 00123PKU_5_0 ..?PKS_5_0 ..<BNU_5_0 ...{BNS_5_0 ...{FILLER
SYSUT2  000000003---------------------------------------------------------------
....:...10....:...20....:...30....:...40....:...50....:...60....:...70....:...80
!àí¬.¬.€.....!àë¬.¬.€....Ë&.í¬.¬.€...&.ë¬.¬.€...â+í¬.¬.€...#â+ë¬.¬.€ŸŸŸeãñ<<áꀀ
54553532333335455353233337545535320135455353201344553532000744553532FFF844444522
A45F5F0000123A43F5F00001230B5F5F0002F0B3F5F0002D2E5F5F00000B2E3F5F00FFF569CC5200
ZDU_5_0 00123ZDS_5_0 0012sPKU_5_0 ..?PKS_5_0 ..=BNU_5_0 ...{BNS_5_0 ÿÿÿ.FILLER
SYSUT2  000000004---------------------------------------------------------------
....:...10....:...20....:...30....:...40....:...50....:...60....:...70....:...80
!àí¬.¬.€.....!àë¬.¬.€....Í&.í¬.¬.€./¬&.ë¬.¬.€./)â+í¬.¬.€...Åâ+ë¬.¬.€ŸŸÙrãñ<<áꀀ
54553532333335455353233337545535320655455353206544553532000644553532FFF944444522
A45F5F0000615A43F5F00006150B5F5F0001F0B3F5F0001D2E5F5F0000272E3F5F00FFD969CC5200
ZDU_5_0 00615ZDS_5_0 0061uPKU_5_0 .a_PKS_5_0 .a]BNU_5_0 ...gBNS_5_0 ÿÿý.FILLER

********************************************************************************
Conclude, RSEQ-80 Input to LSEQ-80 HEX-Dump
000000004 - Record count for SYSUT1
000000004 - Record count for SYSUT2

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

The following is a Windows Command File (HEXN80W1.cmd) that is used to produce a Hex Dump of user-defined records contained within a Record Sequential file.

@echo OFF
     set CmdName=HEXN80W1
rem  * ************************************************************************
rem  *                 HEXN80W1.cmd - a Windows Command File                  *
rem  *          This Job Script is provided by SimoTime Technologies          *
rem  *              (C) Copyright 1987-2019 All Rights Reserved               *
rem  *                Web Site URL:   http://www.simotime.com                 *
rem  *                      e-mail:   helpdesk@simotime.com                   *
rem  * ************************************************************************
rem  *
rem  * Text   - Create a Hex-Dump of a file containing 80-byte records.
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * The job will read a record sequential file of 80-byte records that
rem  * contains user-defined text fields and numeric fields.
rem  * The physical format for the numeric fields are Binary, Packed
rem  * Decimal and Zoned Decimal and may be unsigned or signed.
rem  * The programs will write Hex Dump information to the SYSOUT device.
rem  *
rem  * *******************************************************************
rem  * Step 1, Prepare the System and Job Environment...
rem  *
     call ..\ENV1BASE
rem  *
     call SimoNOTE "*******************************************************%CmdName%"
     call SimoNOTE "Starting JobName %CmdName% - v13.03.04"
:DeleteLSEQ
     call SimoNOTE "Continue Prepare the environment..."
     set SYSUT1=%BaseLib1%\DATA\ASC1\SIMOTIME.DATA.NBRN80D1.DAT
     set SYSUT2=%BaseLib1%\DATA\WRK1\SIMOTIME.DATA.NBRN80X1.txt
     if exist %SYSUT2% del %SYSUT2%
rem  *
rem  * *******************************************************************
rem  * Step 2, Create the Hex-Dump file...
rem  *
     call SimoNOTE "Continue Create the Hex-Dump file..."
     run HXR80LC1
     if not exist %SYSUT2% set JobStatus=0003
     if not "%JobStatus%" == "0000" goto EojNok
     call SimoNOTE "DataTAKE is %SYSUT1%"
     call SimoNOTE "DataMAKE is %SYSUT2%"
rem  *
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
     call SimoNOTE "Conclude SysLog is %SYSLOG%"
     if not "%1" == "nopause" pause

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

The following is a JCL member (HXR80RJ1.jcl) that is used to produce a Hex Dump of user-defined records contained within a Record Sequential file.

//HXR80RJ1 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1
//* *******************************************************************
//*       /HXR80RJ1.jcl - a JCL Member for Batch Job Processing        *
//*       This JCL Member is provided by SimoTime Technologies        *
//*           (C) Copyright 1987-2019 All Rights Reserved             *
//*             Web Site URL:   http://www.simotime.com               *
//*                   e-mail:   helpdesk@simotime.com                 *
//* *******************************************************************
//*
//* Text   - Hex-Dump of Sequential file containing 80-byte records.
//* Author - SimoTime Technologies
//* Date   - January 24, 1996
//*
//* Step 1, JOBSETUP will delete any previously.
//* Step 2, HEXDUMP1 will produce a Hex-Dump of the merged file.
//*
//* This set of programs will run on a mainframe under ZOS or on a
//* Windows System and Micro Focus Enterprise Server or Studio.
//*
//* 1. Demonstrate how to use IEFBR14 with DD statements to delete
//*    files that have been created by a previous execution of this
//*    job.
//* 5. Demonstrate how to create a Hexadecimal Dump of a Sequential
//*    file containing 80-byte, fixed-length records.
//*
//* *******************************************************************
//* Step 1 of 2, Prepare the System and Job Environment...
//*
//JOBSETUP EXEC PGM=IEFBR14
//MK0080X1 DD  DSN=SIMOTIME.DATA.NBRN80X1,
//             DISP=(MOD,DELETE,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,DSORG=PS)
//*
//* *******************************************************************
//* Step 2 of 2, Produce a Hex-Dump of the Merged file...
//*
//HEXDUMP1 EXEC PGM=HX80DUMP
//SYSUT1   DD  DSN=SIMOTIME.DATA.NBRN80D2,DISP=SHR
//SYSUT2   DD  DSN=SIMOTIME.DATA.NBRN80X1,
//             DISP=(NEW,CATLG,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,DSORG=PS)
//SYSOUT   DD  SYSOUT=*
//*
//

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 (HXR80L01.pcf) that is used to produce a Hex Dump.

***********************************************************************
*                HXR80L01.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 a Record Sequential File, Maximum LRECL is 4096 bytes
* SYSUT2 is an ASCII/Text File, Maximum LRECL is 32760 bytes
***********************************************************************
* This Process Control File will be used to generate a COBOL program
* that will do a hexadecimal dump of records contained in SYSUT1.
*
* 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
&USRMODEL  SYSHEXS1.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    RSEQ-80 Input to LSEQ-80 HEX-Dump
&PROGID    HXR80LC1
&SYSUT1    name=SYSUT1 org=Sequential rlen=80
&SYSUT2    name=SYSUT2 org=ASCII/Text rlen=80
*
* The following will determine the HEX-Dump output. The &DFORMAT
* statement will create five (5) lines of dump information.
*    RPI - 1 line for Relative Position Indicator.
*    EBC - 1 line of possible EBCDIC character translation.
*    HEX - 2 lnes of HEX dump. 1st line is high-order nibble.
*                              2nd line is low-order nibble.
*    ASC - 1 line of possible ASCII character translation.
*
&HEXDUMP   SYSUT1 pos 0001 len 80
&DFORMAT   ASC HEX EBC RPI
&SYSLOG    SIMOL32K 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 compiler directives were used to compile the HXR80L01 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 Summary

The generated program will create a Hexadecimal dump file (or HEXDUMP) of user-defined records in a Record Sequential file. 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 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.

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

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

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

Table of Contents Previous Section Next Section Glossary of Terms

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

Table of Contents Previous Section Next Section Contact 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
HEXN8001, Hex Dump for Sequential File
Copyright © 1987-2024
SimoTime Technologies and Services
All Rights Reserved
When technology complements business
http://www.simotime.com