COBOL Hexadecimal Dump
 Callable Hex-Dump Routine
When technology complements business    Copyright © 1987-2012  SimoTime Enterprises  All Rights Reserved
  Table of Contents Version 10.11.01 
  Introduction
  Introduction, Diagram of Logic Flow
  Introduction, Sample Output
  Introduction, Sample Output to SYSOUT
  Introduction, Sample Output to a Log File
  The Call Interface
  CMD File for Execution in a non-Mainframe Environment
  JCL Members for Execution in a Mainframe Oriented Environment
  JCL Member for Display upon Console
  JCL Member for Write-to-Log File
  The COBOL Demonstration Program
  The COBOL Hex-Dump Routine
  The COBOL Write-to-Log File
  The Copy File for Pass Area Parameters
  The Copy File for Hex-Table
  Summary
  Software Agreement and Disclaimer
  Downloads and Links to Similar Pages
  Downloads and Links, Internet Access Required
  Downloads and Links, Local Access
  Glossary of Terms
  Comments, Suggestions or Feedback
  Company Overview
The SimoTime Home Page

Introduction
(Next) (Previous) (Table-of-Contents)

The DISPLAY function of COBOL will display a message upon a user's console or the system operator's console in an MVS environment. It is quite often used to display information in routines that are performing an abnormal termination of a program. Also, it is still being used as a debugging tool. This approach provides valuable information when a failure occurs. However, there are times when a field or data string may have information that contains non-printable/displayable characters. A callable routine that would display a field or data string in a hexadecimal, EBCDIC and ASCII format could be an effective tool in providing this information.

This suite of programs provides a demonstration program and a callable program to display a data string in a hexadecimal format for both EBCDIC and ASCII. Both COBOL programs were written and tested using the COBOL/2 dialect. Also, both COBOL programs will work with COBOL for MVS and COBOL/370. A JCL member is provided to run the job as an MVS batch job on an IBM mainframe or with Micro Focus technologies that support the execution of a mainframe-oriented application running on a Linux, UNIX or Windows platform.

In the world of programming there are many ways to solve a problem. This suite of programs is provided as a COBOL example of a possible solution for producing hexadecimal dump information without an assembler subrouitne.

Note: The source code for this example is available from the SimoTime Library under Download Directory at www.simotime.com.

Introduction, Diagram of Logic Flow
(Next) (Previous) (Table-of-Contents)

The following flowchart provides a quick overview of processing logic used with the hexadecimal dump routine.

             
Entry Point
ZOS
Entry Point
Windows
The JCL or CMD member with the optional statement to write to a log file.      
   
   
CBLHBXJ1
jcl
CBLHBXE1
cmd
The JCL or CMD member for running the application.
   
   
 
 
   
   
 
 
   
   
   
   
CBLHBXC1
cbl
The CBLHBXC1 member is a COBOL Demonstration program that calls the actual Hexadecimal Dump routine.
   
   
   
IF EOJ
 
 
 
 
   
   
If EOJ then go to End-of-Job.
   
No
Yes
   
SIMODUMP
cbl
 
 
Console
   
The SIMODUMP member is a COBOL Hexadecimal Dump routine that displays the dump information on the screen.The dump information is only displayed if the SIMODUMP-REQUEST field contains SHOW or BOTH.
   
   
   
   
SIMOLOGS
cbl
 
 
SYSLOG
rseq
   
The SIMOLOGS member is a COBOL Write-to-Log routine that writes the dump information to a log file. This routine is only called if the SIMODUMP-SYSOUT field contains FILE or BOTH.
   
   
   
   
   
   
   
 
 
 
 
   
   
EOJ
End-of-Job
 
Example of using the Callable Hex-Dump Routine

Introduction, Sample Output
(Next) (Previous) (Table-of-Contents)

The following shows the output written to SYSOUT and to a Log File.

Introduction, Sample Output to SYSOUT
(Next) (Previous) (Table-of-Contents)

The following is an example of the hexadecimal dump information written to the SYSOUT device

* SIMODUMP COBOL Hexadecimal Dump Routine     v11.11.03 http://www.simotime.com
* SIMODUMP Copyright 1987-2012 --- SimoTime Enterprises --- All Rights Reserved
* TXTINFO1 Text String
* SIMODUMP COBOL Hexadecimal Dump Routine     v11.11.03 http://www.simotime.com
* SIMODUMP Copyright 1987-2012 --- SimoTime Enterprises --- All Rights Reserved
* SIMODUMP COBOL Hexadecimal Dump Routine     v11.11.03 http://www.simotime.com
* SIMODUMP Copyright 1987-2012 --- SimoTime Enterprises --- All Rights Reserved
* TXTINFO1 Text String
* SIMODUMP COBOL Hexadecimal Dump Routine     v11.11.03 http://www.simotime.com
* SIMODUMP Copyright 1987-2012 --- SimoTime Enterprises --- All Rights Reserved
* USERINFO Starting... Length = 0016
*  Offset Hex..... ........ ........ ........ ebcdic.......... ascii...........
*   1-016 55534552 20537472 696E6720 30303031 .........>...... USER String 0001
* USERINFO Complete... Length = 0016
* SIMODUMP COBOL Hexadecimal Dump Routine     v11.11.03 http://www.simotime.com
* SIMODUMP Copyright 1987-2012 --- SimoTime Enterprises --- All Rights Reserved
* DISPLAY1 Starting... Length = 0128
*  Offset Hex..... ........ ........ ........ ebcdic.......... ascii...........
*   1-016 41424344 45464748 494A4B4C 4D4E4F50 ...........<(+|& ABCDEFGHIJKLMNOP
*  17-032 51525354 5556575A 595A2020 20202020 .......!.!...... QRSTUVWZYZ
*  33-048 5B5D7B7D 28292020 20202020 20202020 $)#'............ []{}()
*  49-064 0000615C 40404040 00000A01 20202020 ../*    ........ ..a\@@@@....
*  65-080 30313233 34353637 38392020 20202020 ................ 0123456789
*  81-096 20202020 20202020 20202020 20202020 ................
*  97-112 20202020 20202020 20202020 20202020 ................
* 113-128 20202020 20202020 20202020 20656E64 ..............>.              end
* DISPLAY1 Complete... Length = 0128
* LOGTEST1 Starting... Length = 0128
*  Offset Hex..... ........ ........ ........ ebcdic.......... ascii...........
*   1-016 00010203 04050607 08090A0B 0C0D0E0F ................ ................
*  17-032 10111213 14151617 18191A1B 1C1D1E1F ................ ................
*  33-048 20212223 24252627 28292A2B 2C2D2E2F ................  !"#$%&'()*+,-./
*  49-064 30313233 34353637 38393A3B 3C3D3E3F ................ 0123456789:;<=>?
*  65-080 40414243 44454647 48494A4B 4C4D4E4F  ...........<(+| @ABCDEFGHIJKLMNO
*  81-096 50515253 54555657 58595A5B 5C5D5E5F &.........!$*);. PQRSTUVWXYZ[\]^_
*  97-112 60616263 64656667 68696A6B 6C6D6E6F -/........|.%_>? `abcdefghijklmno
* 113-128 70717273 74757677 78797A7B 7C7D7E7F .........`:#@'=" pqrstuvwxyz{.}~.
* LOGTEST1 Complete... Length = 0128
* LOGTEST2 Starting... Length = 0128
*  Offset Hex..... ........ ........ ........ ebcdic.......... ascii...........
*   1-016 80818283 84858687 88898A8B 8C8D8E8F .abcdefghi.{...+ ................
*  17-032 90919293 94959697 98999A9B 9C9D9E9F .jklmnopqr.}.... ................
*  33-048 A0A1A2A3 A4A5A6A7 A8A9AAAB ACADAEAF ..stuvwxyz...... ................
*  49-064 B0B1B2B3 B4B5B6B7 B8B9BABB BCBDBEBF ..........[].... ................
*  65-080 C0C1C2C3 C4C5C6C7 C8C9CACB CCCDCECF {ABCDEFGHI...... ................
*  81-096 D0D1D2D3 D4D5D6D7 D8D9DADB DCDDDEDF }JKLMNOPQR...... ................
*  97-112 E0E1E2E3 E4E5E6E7 E8E9EAEB ECEDEEEF ..STUVWXYZ...... ................
* 113-128 F0F1F2F3 F4F5F6F7 F8F9FAFB FCFDFEFF 0123456789...... ................
* LOGTEST2 Complete... Length = 0128

Introduction, Sample Output to a Log File
(Next) (Previous) (Table-of-Contents)

The following is an example of the hexadecimal dump information that is written to a log file with the date and time stamp..

*** 2011/11/03 16:14:58:06 *   1-016 00010203 04050607 08090A0B 0C0D0E0F ................ ................
*** 2011/11/03 16:14:58:06 *  17-032 10111213 14151617 18191A1B 1C1D1E1F ................ ................
*** 2011/11/03 16:14:58:06 *  33-048 20212223 24252627 28292A2B 2C2D2E2F ................  !"#$%&'()*+,-./
*** 2011/11/03 16:14:58:06 *  49-064 30313233 34353637 38393A3B 3C3D3E3F ................ 0123456789:;<=>?
*** 2011/11/03 16:14:58:06 *  65-080 40414243 44454647 48494A4B 4C4D4E4F  ...........<(+| @ABCDEFGHIJKLMNO
*** 2011/11/03 16:14:58:06 *  81-096 50515253 54555657 58595A5B 5C5D5E5F &.........!$*);. PQRSTUVWXYZ[\]^_
*** 2011/11/03 16:14:58:06 *  97-112 60616263 64656667 68696A6B 6C6D6E6F -/........|.%_>? `abcdefghijklmno
*** 2011/11/03 16:14:58:08 * 113-128 70717273 74757677 78797A7B 7C7D7E7F .........`:#@'=" pqrstuvwxyz{.}~.
*** 2011/11/03 16:14:58:08 *   1-016 80818283 84858687 88898A8B 8C8D8E8F .abcdefghi.{...+ ................
*** 2011/11/03 16:14:58:08 *  17-032 90919293 94959697 98999A9B 9C9D9E9F .jklmnopqr.}.... ................
*** 2011/11/03 16:14:58:08 *  33-048 A0A1A2A3 A4A5A6A7 A8A9AAAB ACADAEAF ..stuvwxyz...... ................
*** 2011/11/03 16:14:58:08 *  49-064 B0B1B2B3 B4B5B6B7 B8B9BABB BCBDBEBF ..........[].... ................
*** 2011/11/03 16:14:58:08 *  65-080 C0C1C2C3 C4C5C6C7 C8C9CACB CCCDCECF {ABCDEFGHI...... ................
*** 2011/11/03 16:14:58:08 *  81-096 D0D1D2D3 D4D5D6D7 D8D9DADB DCDDDEDF }JKLMNOPQR...... ................
*** 2011/11/03 16:14:58:08 *  97-112 E0E1E2E3 E4E5E6E7 E8E9EAEB ECEDEEEF ..STUVWXYZ...... ................
*** 2011/11/03 16:14:58:08 * 113-128 F0F1F2F3 F4F5F6F7 F8F9FAFB FCFDFEFF 0123456789...... ................
*** 2011/11/03 16:14:59:28 *   1-016 5049432D 39202020 30303030 30313233 &............... PIC-9   00000123
*** 2011/11/03 16:14:59:48 *  17-032 5049432D 39502020 30303030 30313233 &....&.......... PIC-9P  00000123
*** 2011/11/03 16:14:59:69 *  33-048 5049432D 394D2020 30303030 30313273 &....(.......... PIC-9M  0000012s
*** 2011/11/03 16:14:59:89 *  49-064 5049432D 395A2020 30303030 30303030 &....!.......... PIC-9Z  00000000
*** 2011/11/03 16:15:00:09 *  65-080 434F4D50 2D332020 00000000 0000123F .|(&............ COMP-3  .......?
*** 2011/11/03 16:15:00:30 *  81-096 434F4D50 2D335020 00000000 0000123C .|(&..&......... COMP-3P .......<
*** 2011/11/03 16:15:00:50 *  97-112 434F4D50 2D334D20 00000000 0000123D .|(&..(......... COMP-3M .......=
*** 2011/11/03 16:15:00:70 * 113-128 434F4D50 2D335A20 00000000 0000000C .|(&..!......... COMP-3Z ........
*** 2011/11/03 16:15:01:93 *   1-016 434F4D50 20202020 0000007B 20202020 .|(&.......#.... COMP    ...{
*** 2011/11/03 16:15:02:14 *  17-032 434F4D50 2F502020 0000007B 20202020 .|(&.&.....#.... COMP/P  ...{
*** 2011/11/03 16:15:02:34 *  33-048 434F4D50 2F4D2020 FFFFFF85 20202020 .|(&.(.....e.... COMP/M  ....
*** 2011/11/03 16:15:02:54 *  49-064 434F4D50 2F5A2020 00000000 20202020 .|(&.!.......... COMP/Z  ....
*** 2011/11/03 16:15:02:74 *  65-080 20202020 20202020 20202020 20202020 ................
*** 2011/11/03 16:15:02:95 *  81-096 20202020 20202020 20202020 20202020 ................
*** 2011/11/03 16:15:03:15 *  97-112 20202020 20202020 20202020 20202020 ................
*** 2011/11/03 16:15:03:35 * 113-128 20202020 20202020 20202020 20202020 ................ 

The Call Interface
(Next) (Previous) (Table-of-Contents)

The coding to do the actual call to display and/or log the hex dump information is as follows.

      *****************************************************************
      *    Prepare the Pass Area and call the SIMODUMP program.
      *    -----------------------------------------------------------------
           move 'DUMP'           to SIMODUMP-REQUEST
           move 'OPR1'           to SIMODUMP-OUTPUT
           move 'USERINFO'       to SIMODUMP-DUMP-ID
           add length of USER-STRING-01 to ZERO giving SIMODUMP-LENGTH
           CALL 'SIMODUMP' USING SIMODUMP-PASS-AREA
      *                          SIMODUMP-BUFFER
                                 USER-STRING-01

Note: In the preceding example the SIMODUMP-BUFFER is replaced with the name of a user data field.

If the call to the hex dump routine wants to do logging to a file then the appropriate DD statement must be inserted into the JCL. The following is a brief description of each of the fields used within the pass area (SIMODUMP-PASS-AREA).

Field Description
SIMODUMP-REQUEST
DUMP This parameter value will cause the text string in the SIMODUMP-BUFFER to be displayed (and logged if specified) in hexadecimal format. This is the default value..
NOTE This parameter value will simply display and log if specified the first 68 bytes in the SIMODUMP-BUFFER.. This parameter is case sensitive and must be upper-case.
SIMODUMP-RESULT This is an indicator as to the success or failure of the request. A value of zero (0000) indicates the routine was successful in displaying the dump information. A non-zero value indicates a failure.
SIMODUMP-DUMP-ID This is an eight character field that is used to identify the dump. When multiple calls are made to the dump routine it is less confusing if each dump request has a unique identifier.
SIMODUMP-OUTPUT Type of request, must be one of the following and must be upper-case.
LOG1 This request will write the information to the SYSLOG file. This option requires a DD statement in the JCL.
OPR1 This request will display the dump information on the operator console.
OPR2 This request will display the dump information on the console and write the dump information to the SYSLOG file. This option requires a DD statement in the JCL.
OUT1 This request will display the dump information on the SYSOUT device.
OUT2 This request will display the dump information on the SYSOUT device and write the dump information to the SYSLOG file. This option requires a DD statement in the JCL.
If a parameter other then the preceding are passed the 'OPR1' is assumed.
SIMODUMP-COPYRIGHT 
SHOW This parameter value will cause the SimoTime copyright information to be displayed when the SimoDUMP routine is called. This is the default value..
HIDE This parameter value will cause the SimoTime Copyright information not to be displayed when the SimoDUMP routine is called. Any other value will cause the copyright information to be displayed. This parameter is case sensitive and must be upper-case.
SIMODUMP-IDX Index for table that contains the dump information
SIMODUMP-LINES This is a table with eight entries of eigty bytes. Each entry contains a line of dump information.
SIMODUMP-LENGTH The length or number of characters to be displayed. This must be a value from 1-128. If a value other than 1-128 is passed then 128 will be assumed.
SIMODUMP-BUFFER A 128 byte buffer containing the information to be displayed.

CMD File for Execution in a non-Mainframe Environment
(Next) (Previous) (Table-of-Contents)

This section provides the sample command file (CBLHBXE1.CMD) required to run the dump programs on a PC with Micro Focus Net Express.

@echo OFF
rem  * *******************************************************************
rem  *               CBLHBXE1.CMD - a Windows Command File               *
rem  *         This program is provided by SimoTime Enterprises          *
rem  *           (C) Copyright 1987-2012 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  *
rem  * Text   - Processing Numeric Fields
rem  * Author - SimoTime Enterprises
rem  * Date   - January 24, 1996
rem  *
rem  * *******************************************************************
rem  * Step 1, Delete any previously created file...
rem  *
     set CmdName=cblhbxe1
     call ..\Env1BASE %CmdName%
     if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
rem  *
     call SimoNOTE "*******************************************************%CmdName%"
     call SimoNOTE "Starting JobName %CmdName%"
     run CBLHBXC1
     if not ERRORLEVEL = 0 set JobStatus=0010
     if not %JobStatus% == 0000 goto :EojNok
: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

JCL Members for Execution in a Mainframe Oriented Environment
(Next) (Previous) (Table-of-Contents)

This section provides the sample JCL required to run the dump programs on a mainframe with MVS or on a PC with Micro Focus Mainframe Express. The JOB, STEPLIB and DD statements will need to be changed for a specific mainframe environment.

The first example shows the JCL when the logging to a file is not used. The dump information will be diplayed to the screen. If the calling program should request a log-to-file (i.e. SIMODUMP-REQUEST = 'FILE' on OPEN failure would occur since there is no DD statement for the logging file (SYSLOG). The dump routine would then assume 'SHOW' and display the dump information to the screen.

The second example shows the use of the logging function that writes the dump information to a file (SYSLOG).

JCL Member for Display upon Console
(Next) (Previous) (Table-of-Contents)

The following is the mainframe JCL (CBLHBXJ1.JCL) required to run the mainline program. The JOB and STEPLIB statements will need to be changed for a specific mainframe environment. Since this JCL member does not have a DD statement for the SYSLOG file the SimoLOGS routine will fail on the OPEN and post a message to the console and simply display the dump information to the console. The file I/O error for the SYSLOG file and the dump information will be written to the spool file.

//CBLHBXJ1 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1,
//             COND=(0,LT)
//* *******************************************************************
//*        This program is provided by: SimoTime Enterprises          *
//*           (C) Copyright 1987-2012 All Rights Reserved             *
//*             Web Site URL:   http://www.simotime.com               *
//*                   e-mail:   helpdesk@simotime.com                 *
//* *******************************************************************
//*
//* Text   - COBOL calls COBOL for Hexadecimal Dump of a data buffer.
//* Author - SimoTime Enterprises
//* Date   - January 01, 1989
//*
//* This set of programs illustrate the use of COBOL for displaying
//* a data buffer in hexadecimal format.
//*
//* Since this JCL member does not have a DD statement for the SYSLOG
//* file the SimoLOGS routine will fail on the OPEN and post a message
//* to the console and simply display the dump information to the
//* console. The file I/O error for the SYSLOG file and the dump
//* information will be written to the spool file.
//*
//* This set of programs will run on a mainframe under MVS or on a
//* Personal Computer with Windows and Micro Focus Mainframe Express.
//*
//*    ************
//*    * CBLHBXJ1 *
//*    ********jcl*
//*         *
//*         *
//*    ************     ************      ************
//*    * CBLHBXC1 ******* SIMODUMP ******** CONSOLE  *
//*    ********cbl*     ********cbl*      ******dsply*
//*                          *
//*                          *
//*                     ************     ************
//*                     * SIMOLOGS *******  SYSLOG  *
//*                     ********cbl*     *******file*
//*
//* *******************************************************************
//* Step   1 of 1  This is a single step job.
//*
//CBLHBXX1 EXEC PGM=CBLHBXC1
//STEPLIB  DD  DSN=MFI01.SIMOPROD.LOADLIB1,DISP=SHR
//SYSOUT   DD  SYSOUT=*
//*

JCL Member for Write-to-Log File
(Next) (Previous) (Table-of-Contents)

The following is the mainframe JCL (CBLHBXJ2.JCL) required to run the mainline program. The JOB, STEPLIB and DD statements will need to be changed for a specific mainframe environment.

//CBLHBXJ2 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1,
//             COND=(0,LT)
//* *******************************************************************
//*        This program is provided by: SimoTime Enterprises          *
//*           (C) Copyright 1987-2012 All Rights Reserved             *
//*             Web Site URL:   http://www.simotime.com               *
//*                   e-mail:   helpdesk@simotime.com                 *
//* *******************************************************************
//*
//* Text   - COBOL calls COBOL for Hexadecimal Dump of a data buffer.
//* Author - SimoTime Enterprises
//* Date   - January 01, 1989
//*
//* This set of programs illustrate the use of COBOL for displaying
//* a data buffer in hexadecimal format. This job may also write
//* to a log file (SYSLOG).
//*
//*      ************
//*      * CBLHBXJ1 *
//*      ********jcl*
//*           *
//*           *
//*      ************
//*      * IEFBR14  *
//*      ************
//*           *
//*           *
//*      ************     ************     ************
//*      * CBLHBXC1 *-----* SIMODUMP *-----* Console  *
//*      ********cbl*     ************     ************
//*                            *
//*                            *
//*                       ************     ************
//*                       * SIMOLOGS *-----*  SYSLOG  *
//*                       ************     ************
//*
//*
//* This set of programs will run on a mainframe under MVS or on a
//* Personal Computer with Windows and Micro Focus Mainframe Express.
//*
//* *******************************************************************
//* Step 1 of 2, Delete previous log file and create new log file...
//*
//HBXDEL01 EXEC PGM=IEFBR14
//LOGHBX   DD  DSN=SIMOTIME.DATA.LOGHBX01,DISP=(MOD,DELETE,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,10),
//             DCB=(RECFM=V,LRECL=1055,DSORG=PS)
//HBXCRT01 EXEC PGM=IEFBR14
//LOGHBX   DD  DSN=SIMOTIME.DATA.LOGHBX01,DISP=(NEW,CATLG,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,10),
//             DCB=(RECFM=V,LRECL=1055,DSORG=PS)
//*
//* *******************************************************************
//* Step 2 of 2, Write dump info to new QSAM log file...
//*
//CBLHBX22 EXEC PGM=CBLHBXC1
//STEPLIB  DD  DSN=MFI01.SIMOPROD.LOADLIB1,DISP=SHR
//SYSLOG   DD  DSN=SIMOTIME.DATA.LOGHBX01,DISP=SHR
//SYSOUT   DD  SYSOUT=*
//*

The COBOL Demonstration Program
(Next) (Previous) (Table-of-Contents)

This program (CBLHBXC1.CBL) was written to test and demonstrate the calling of theCOBOL program (SIMODUMP.CBL) that does the display of a data buffer in the hexadecimal format.

       IDENTIFICATION DIVISION.
       PROGRAM-ID.    CBLHBXC1.
       AUTHOR.        SIMOTIME ENTERPRISES.
      *****************************************************************
      * Copyright (C) 1987-2012 SimoTime Enterprises.                 *
      *                                                               *
      * All rights reserved.  Unpublished, all rights reserved under  *
      * copyright law and international treaty.  Use of a copyright   *
      * notice is precautionary only and does not imply publication   *
      * or disclosure.                                                *
      *                                                               *
      * Permission to use, copy, modify and distribute this software  *
      * for any non-commercial purpose and without fee is hereby      *
      * granted, 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    *
      * Enterprises.                                                  *
      *                                                               *
      * Permission to use, copy, modify and distribute this software  *
      * for any commercial purpose requires a fee to be paid to       *
      * SimoTime Enterprises. Once the fee is received by SimoTime    *
      * the latest version of the software 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           *
      * Enterprises.                                                  *
      *                                                               *
      * SimoTime Enterprises makes no warranty or representations     *
      * about the suitability of the software 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       *
      * Enterprises 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                                  *
      *                                                               *
      * SimoTime Enterprises                                          *
      * 15 Carnoustie Drive                                           *
      * Novato, CA 94949-5849                                         *
      * 415.883.6565                                                  *
      *                                                               *
      * RESTRICTED RIGHTS LEGEND                                      *
      * Use, duplication, or disclosure by the Government is subject  *
      * to restrictions as set forth in subparagraph (c)(1)(ii) of    *
      * the Rights in Technical Data and Computer Software clause at  *
      * DFARS 52.227-7013 or subparagraphs (c)(1) and (2) of          *
      * Commercial  Computer Software - Restricted Rights  at 48      *
      * CFR 52.227-19, as applicable.  Contact SimoTime Enterprises,  *
      * 15 Carnoustie Drive, Novato, CA 94949-5849.                   *
      *                                                               *
      *****************************************************************
      *      This program is provided by SimoTime Enterprises         *
      *        Our e-mail address is: helpdesk@simotime.com           *
      *     Also, visit our Web Site at http://www.simotime.com       *
      *                                                               *
      *****************************************************************
      *
      *****************************************************************
      * Source Member: CBLHBXC1.CBL
      * Copy Files     PASSDUMP.CPY
      * Calls to:      SIMODUMP may call SIMOLOGS
      *****************************************************************
      *
      * CBLHBXC1 - Call SIMODUMP to build hexadecimal dump information.
      *
      * CALLING PROTOCOL
      * ----------------
      * Use standard procedure to EXECUTE, RUN or ANIMATE.
      *
      * DESCRIPTION
      * -----------
      * This is a demonstration program to show how to call the
      * COBOL Hexadecimal Dump Routine.
      *
      *          ************
      *          * CBLHBXJ1 *
      *          ********jcl*
      *               *
      *               *
      *          ************     ************     ************
      *          * CBLHBXC1 ******* SIMODUMP *******  SYSOUT  *
      *          ********cbl*     ********cbl*     ************
      *               *                *
      *               *                *
      *               *           ************     ************
      *               *           * SIMOLOGS *******  SYSLOG  *
      *               *           ********cbl*     *******file*
      *               *
      *          ************
      *          *   EOJ    *
      *          ************
      *
      *****************************************************************
      *
      * MAINTENANCE
      * -----------
      * 1989/02/27 Simmons, Created program.
      * 1997/03/17 Simmons, Updated for COBOL/2.
      *
      *****************************************************************
      *
       ENVIRONMENT DIVISION.
       DATA DIVISION.
       WORKING-STORAGE SECTION.
      *****************************************************************
      *    Data-structure for Title and Copyright...
      *    ------------------------------------------------------------
       01  SIM-TITLE.
           05  T1 pic X(11) value '* CBLHBXC1 '.
           05  T2 pic X(34) value 'COBOL Hexadecimal Dump Routine    '.
           05  T3 pic X(10) value ' v11.11.03'.
           05  T4 pic X(24) value ' http://www.simotime.com'.
       01  SIM-COPYRIGHT.
           05  C1 pic X(11) value '* CBLHBXC1 '.
           05  C2 pic X(20) value 'Copyright 1987-2012 '.
           05  C3 pic X(28) value '     SimoTime Enterprises   '.
           05  C4 pic X(20) value ' All Rights Reserved'.

       01  SIM-THANKS-01.
           05  C1 pic X(11) value '* CBLHBXC1 '.
           05  C2 pic X(32) value 'Thank you for using this softwar'.
           05  C3 pic X(32) value 'e provided from SimoTime Enterpr'.
           05  C4 pic X(04) value 'ises'.

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

      *****************************************************************
      *    Buffer used for posting messages to the console.
      *    ------------------------------------------------------------
       01  MESSAGE-BUFFER.
           05  MESSAGE-HEADER      pic X(11)   value '* CBLHBXC1 '.
           05  MESSAGE-TEXT.
               10  MESSAGE-TEXT-1  pic X(68).
               10  MESSAGE-TEXT-2  pic X(41).

       01  TWO-BYTES.
           05  TWO-BYTES-01        pic X.
           05  TWO-BYTES-02        pic X.
       01  TWO-BYTES-BINARY        redefines   TWO-BYTES
                                   pic S9(3)   comp.

      *****************************************************************
      *    Work fields used for testing call to SIMODUMP.
      *    ------------------------------------------------------------
       01  ASC            pic X(10) value X'30313233343536373839'.
       01  PACK-BINARY    pic X(12) value X'0000615C4040404000000A01'.

       01  ALPHABET-UPPER pic X(26) value 'ABCDEFGHIJKLMNOPQRSTUVWZYZ'.

       01  NUMERIC-BUFFER-01.
           05  filler          pic X(8)            value 'PIC-9   '.
           05  NB-PIC-9        pic 9(8)            value 123.
           05  filler          pic X(8)            value 'PIC-9P  '.
           05  NB-PIC-9-PLUS   pic S9(8)           value 123.
           05  filler          pic X(8)            value 'PIC-9M  '.
           05  NB-PIC-9-MINUS  pic S9(8)           value -123.
           05  filler          pic X(8)            value 'PIC-9Z  '.
           05  NB-PIC-9-ZERO   pic S9(8)           value 0.
           05  filler          pic X(8)            value 'COMP-3  '.
           05  NB-COMP-3       pic 9(15)   comp-3  value 123.
           05  filler          pic X(8)            value 'COMP-3P '.
           05  NB-COMP-3-PLUS  pic S9(15)  comp-3  value 123.
           05  filler          pic X(8)            value 'COMP-3M '.
           05  NB-COMP-3-MINUS pic S9(15)  comp-3  value -123.
           05  filler          pic X(8)            value 'COMP-3Z '.
           05  NB-COMP-3-ZERO  pic S9(15)  comp-3  value 0.

       01  NUMERIC-BUFFER-02.
           05  filler          pic X(8)            value 'COMP    '.
           05  NB-COMP         pic 9(9)    comp    value 123.
           05  filler          pic X(4)            value is SPACES.
           05  filler          pic X(8)            value 'COMP/P  '.
           05  NB-COMP-PLUS    pic S9(9)   comp    value 123.
           05  filler          pic X(4)            value is SPACES.
           05  filler          pic X(8)            value 'COMP/M  '.
           05  NB-COMP-MINUS   pic S9(9)   comp    value -123.
           05  filler          pic X(4)            value is SPACES.
           05  filler          pic X(8)            value 'COMP/Z  '.
           05  NB-COMP-ZERO    pic S9(9)   comp    value 0.
           05  filler          pic X(4)            value is SPACES.
           05  filler          pic X(64)           value is SPACES.

       01  IX-1                pic 9999    value 0.
       01  IX-2                pic 9999    value 0.

       01  USER-STRING-01      pic X(16)   value 'USER String 0001'.

       COPY PASSDUMP.

      *****************************************************************
       PROCEDURE DIVISION.

           perform Z-POST-COPYRIGHT.

           perform INITIALIZE-PASS-AREA

           perform POST-TEXT-INFO-TO-SYSOUT

           perform DUMP-USER-STRING

           perform DUMP-BUFFER-TO-SYSOUT.

           perform DUMP-BUFFER-FOR-ALL.

           perform DUMP-NUMERIC-BUFFER.

           perform Z-THANK-YOU.

           GOBACK.

      *****************************************************************
      * Post a Text Note to SYSOUT.
      *****************************************************************
       POST-TEXT-INFO-TO-SYSOUT.
           move 'NOTE'           to SIMODUMP-REQUEST
           move 'OUT1'           to SIMODUMP-OUTPUT
           move 'SHOW'           to SIMODUMP-COPYRIGHT
           move 'TXTINFO1'       to SIMODUMP-DUMP-ID
           move SPACES           to SIMODUMP-BUFFER
           move 'Text String '   to SIMODUMP-BUFFER
           add 12 to ZERO    giving SIMODUMP-LENGTH
           call 'SIMODUMP'    using SIMODUMP-PASS-AREA
                                    SIMODUMP-BUFFER
           move SIMODUMP-REQUEST to MESSAGE-TEXT(57:4)
           move SIMODUMP-RESULT  to MESSAGE-TEXT(61:4)
           move SIMODUMP-OUTPUT  to MESSAGE-TEXT(65:4)
           perform Z-POST-MESSAGE
           exit.

      *****************************************************************
       DUMP-USER-STRING.
           move 'DUMP'           to SIMODUMP-REQUEST
           move 'OUT1'           to SIMODUMP-OUTPUT
           move 'SHOW'           to SIMODUMP-COPYRIGHT
           move 'USERINFO'       to SIMODUMP-DUMP-ID
           add length of USER-STRING-01 to ZERO giving SIMODUMP-LENGTH
           call 'SIMODUMP'    using SIMODUMP-PASS-AREA
                                    USER-STRING-01
           exit.

      *****************************************************************
      * Move information to DUMP BUFFER and display the information.
      *****************************************************************
       DUMP-BUFFER-TO-SYSOUT.
           move 'DUMP-BUFFER-TO-SYSOUT is starting' to MESSAGE-TEXT
           perform Z-POST-MESSAGE
           move 'DUMP'           to SIMODUMP-REQUEST
           move 'OUT1'           to SIMODUMP-OUTPUT
           add 128 to ZERO   giving SIMODUMP-LENGTH
           move 'DISPLAY1'       to SIMODUMP-DUMP-ID
           move ALPHABET-UPPER   to SIMODUMP-BUFFER
           move '[]{}()'         to SIMODUMP-BUFFER(33:6)
           move PACK-BINARY      to SIMODUMP-BUFFER(49:12)
           move ASC              to SIMODUMP-BUFFER(65:10)
           move 'end'            to SIMODUMP-BUFFER(126:3)
           call 'SIMODUMP'    using SIMODUMP-PASS-AREA
                                    SIMODUMP-BUFFER
           move 'DUMP-BUFFER-TO-SYSOUT is complete' to MESSAGE-TEXT
           move SIMODUMP-REQUEST to MESSAGE-TEXT(57:4)
           move SIMODUMP-RESULT  to MESSAGE-TEXT(61:4)
           move SIMODUMP-OUTPUT  to MESSAGE-TEXT(65:4)
           perform Z-POST-MESSAGE
           exit.

      *****************************************************************
      * Create the full 256 character set and display in hex-dump
      * using two calls of 128 bytes each.
      *****************************************************************
       DUMP-BUFFER-FOR-ALL.
           move 'DUMP-BUFFER-FOR-ALL is starting' to MESSAGE-TEXT
           perform Z-POST-MESSAGE
           move 'DUMP'         to SIMODUMP-REQUEST
           move 'OUT2'         to SIMODUMP-OUTPUT
           move 'HIDE'         to SIMODUMP-COPYRIGHT
           add 128 to ZERO giving SIMODUMP-LENGTH
           move 'LOGTEST1'     to SIMODUMP-DUMP-ID

           subtract TWO-BYTES-BINARY from TWO-BYTES-BINARY
           add 1 to ZERO giving IX-1
           add 1 to ZERO giving IX-2
           perform 128 times
               move TWO-BYTES-02 to SIMODUMP-BUFFER(IX-1:1)
               add 1 to TWO-BYTES-BINARY
               add 1 to IX-1
           end-perform
           call 'SIMODUMP'    using SIMODUMP-PASS-AREA
                                    SIMODUMP-BUFFER

           add 1 to ZERO giving IX-1
           move 'LOGTEST2' to SIMODUMP-DUMP-ID
           perform 128 times
               move TWO-BYTES-02 to SIMODUMP-BUFFER(IX-1:1)
               add 1 to TWO-BYTES-BINARY
               add 1 to IX-1
           end-perform
           call 'SIMODUMP'    using SIMODUMP-PASS-AREA
                                    SIMODUMP-BUFFER
           move 'SHOW'        to SIMODUMP-COPYRIGHT

           move 'DUMP-BUFFER-FOR-ALL is complete' to MESSAGE-TEXT
           move SIMODUMP-REQUEST to MESSAGE-TEXT(57:4)
           move SIMODUMP-RESULT  to MESSAGE-TEXT(61:4)
           move SIMODUMP-OUTPUT  to MESSAGE-TEXT(65:4)
           perform Z-POST-MESSAGE
           exit.

      *****************************************************************
      * Display various numeric values and formats.
      *****************************************************************
       DUMP-NUMERIC-BUFFER.
           move 'DUMP-NUMERIC-BUFFER is starting' to MESSAGE-TEXT
           perform Z-POST-MESSAGE
           move 'DUMP'            to SIMODUMP-REQUEST
           move 'OPR2'            to SIMODUMP-OUTPUT
           add 128 to ZERO    giving SIMODUMP-LENGTH
           move 'NUMERIC1'        to SIMODUMP-DUMP-ID
           move NUMERIC-BUFFER-01 to SIMODUMP-BUFFER
           call 'SIMODUMP'    using SIMODUMP-PASS-AREA
                                    SIMODUMP-BUFFER

           move 'NUMERIC2'        to SIMODUMP-DUMP-ID
           move NUMERIC-BUFFER-02 to SIMODUMP-BUFFER
           call 'SIMODUMP'     using SIMODUMP-PASS-AREA
                                    SIMODUMP-BUFFER
           move 'DUMP-NUMERIC-BUFFER is complete' to MESSAGE-TEXT
           move SIMODUMP-REQUEST to MESSAGE-TEXT(57:4)
           move SIMODUMP-RESULT  to MESSAGE-TEXT(61:4)
           move SIMODUMP-OUTPUT  to MESSAGE-TEXT(65:4)
           perform Z-POST-MESSAGE
           exit.

      *****************************************************************
       INITIALIZE-PASS-AREA.
           move 'DUMP'         to SIMODUMP-REQUEST
           move 'OPR1'         to SIMODUMP-REQUEST
           move 'SHOW'         to SIMODUMP-COPYRIGHT
           move 'HEXDUMP1'     to SIMODUMP-DUMP-ID
           move 0              to SIMODUMP-RESULT
           add 128 to ZERO giving SIMODUMP-LENGTH
           move all SPACES     to SIMODUMP-BUFFER
           exit.

      *****************************************************************
      * The following Z-Routines perform administrative tasks         *
      * for this program.                                             *
      *****************************************************************
       Z-POST-COPYRIGHT.
           display SIM-TITLE     upon console
           display SIM-COPYRIGHT upon console
           exit.

      *****************************************************************
       Z-POST-MESSAGE.
           if  MESSAGE-TEXT-2 = SPACES
               display MESSAGE-BUFFER(1:79) upon console
           else
               display MESSAGE-BUFFER upon console
           end-if
           move SPACES to MESSAGE-TEXT
           exit.

      *****************************************************************
       Z-THANK-YOU.
           display SIM-THANKS-01 upon console
           display SIM-THANKS-02 upon console
           exit.
      *****************************************************************
      *      This example is provided by SimoTime Enterprises         *
      *        Our e-mail address is: helpdesk@simotime.com           *
      *     Also, visit our Web Site at http://www.simotime.com       *
      *****************************************************************

The COBOL Hex-Dump Routine
(Next) (Previous) (Table-of-Contents)

This program (SIMODUMP.CBL) was written to be used as a debugging aid. It uses the DISPLAY function of COBOL to display hexadecimal dump information of a data field. This program requires a copyfile (TAB4DUMP.CPY) that is included in the downloadable package for this set of sample programs.

       IDENTIFICATION DIVISION.
       PROGRAM-ID.    SIMODUMP.
       AUTHOR.        SIMOTIME ENTERPRISES.
      *****************************************************************
      * Copyright (C) 1987-2012 SimoTime Enterprises.                 *
      *                                                               *
      * All rights reserved.  Unpublished, all rights reserved under  *
      * copyright law and international treaty.  Use of a copyright   *
      * notice is precautionary only and does not imply publication   *
      * or disclosure.                                                *
      *                                                               *
      * Permission to use, copy, modify and distribute this software  *
      * for any non-commercial purpose and without fee is hereby      *
      * granted, 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    *
      * Enterprises.                                                  *
      *                                                               *
      * Permission to use, copy, modify and distribute this software  *
      * for any commercial purpose requires a fee to be paid to       *
      * SimoTime Enterprises. Once the fee is received by SimoTime    *
      * the latest version of the software 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           *
      * Enterprises.                                                  *
      *                                                               *
      * SimoTime Enterprises makes no warranty or representations     *
      * about the suitability of the software 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       *
      * Enterprises 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                                  *
      *                                                               *
      * SimoTime Enterprises                                          *
      * 15 Carnoustie Drive                                           *
      * Novato, CA 94949-5849                                         *
      * 415.883.6565                                                  *
      *                                                               *
      * RESTRICTED RIGHTS LEGEND                                      *
      * Use, duplication, or disclosure by the Government is subject  *
      * to restrictions as set forth in subparagraph (c)(1)(ii) of    *
      * the Rights in Technical Data and Computer Software clause at  *
      * DFARS 52.227-7013 or subparagraphs (c)(1) and (2) of          *
      * Commercial  Computer Software - Restricted Rights  at 48      *
      * CFR 52.227-19, as applicable.  Contact SimoTime Enterprises,  *
      * 15 Carnoustie Drive, Novato, CA 94949-5849.                   *
      *                                                               *
      *****************************************************************
      *      This program is provided by SimoTime Enterprises         *
      *        Our e-mail address is: helpdesk@simotime.com           *
      *     Also, visit our Web Site at http://www.simotime.com       *
      *                                                               *
      *****************************************************************
      *
      *****************************************************************
      * Source Member: SIMODUMP.CBL
      * Copy Files:    PASSDUMP.CPY
      *                HEXTABLE.CPY
      * Calls to:      SIMOLOGS is optional
      *****************************************************************
      *
      * SIMODUMP - Call SIMOLOGS to build hexadecimal dump information.
      *
      * CALLING PROTOCOL
      * ----------------
      * Use standard procedure to EXECUTE, RUN or ANIMATE.
      *
      * DESCRIPTION
      * -----------
      * This set of programs illustrate the use of COBOL for displaying
      * a data buffer in hexadecimal format.
      *
      *          ************
      *          * CBLHBXJ1 *
      *          ********jcl*
      *               *
      *          ************
      *          * CBLHBXC1 *
      *          ********cbl*
      *               *
      *          ************     ************      ************
      *          * CBLHBXC1 *-----* SIMODUMP *-----* CONSOLE  *
      *          ********cbl*     ********cbl*      ******dsply*
      *                                *
      *                                *
      *                           ************     ************
      *                           * SIMOLOGS *-----* CBLHBXD1 *
      *                           ********cbl*     *******file*
      *
      *****************************************************************
      *
      * MAINTENANCE
      * -----------
      * 1989/02/27 Simmons, Created program.
      * 1997/03/17 Simmons, Updated for COBOL/2.
      *
      *****************************************************************
      *
       ENVIRONMENT DIVISION.
       DATA DIVISION.
       WORKING-STORAGE SECTION.
      *****************************************************************
      *    Data-structure for Title and Copyright...
      *    ------------------------------------------------------------
       01  SIM-TITLE.
           05  T1 pic X(11) value '* SIMODUMP '.
           05  T2 pic X(34) value 'COBOL Hexadecimal Dump Routine    '.
           05  T3 pic X(10) value ' v11.11.03'.
           05  T4 pic X(24) value ' http://www.simotime.com'.
       01  SIM-COPYRIGHT.
           05  C1 pic X(11) value '* SIMODUMP '.
           05  C2 pic X(20) value 'Copyright 1987-2012 '.
           05  C3 pic X(28) value '--- SimoTime Enterprises ---'.
           05  C4 pic X(20) value ' All Rights Reserved'.

      *****************************************************************
      *    Buffer used for posting messages to the console.
      *    ------------------------------------------------------------
       01  MESSAGE-BUFFER.
           05  MESSAGE-HEADER.
               10  filler          pic X(02)   value '* '.
               10  MESSAGE-HEAD02  pic X(08)   value 'SIMODUMP'.
               10  filler          pic X       value SPACE.
           05  MESSAGE-TEXT        pic X(68).

       01  MSG-79                  pic X(79)   value SPACES.

      *****************************************************************
      *    Buffer used for posting dump information to the console.
      *    ------------------------------------------------------------
       01  DUMP-BUFFER.
           05  DUMP-TEXT           pic X(79).

      *****************************************************************

       01  TWO-BYTES.
           05  TWO-BYTES-01        pic X.
           05  TWO-BYTES-02        pic X.
       01  TWO-BYTES-BINARY        redefines   TWO-BYTES
                                   pic S9(3)   comp.

       01  IX-0           pic 9999 value 0.
       01  IX-1           pic 9999 value 0.
       01  IX-2           pic 9999 value 0.
       01  IX-3           pic 9999 value 0.
       01  IX-4           pic 9999 value 0.
       01  IX-5           pic 9999 value 0.

       01  WA-5                    pic X(5)    value is SPACES.

       01  BUFFER-LENGTH           pic 9999    value 0.
       01  LINE-LENGTH             pic 9999    value 0.

       01  DUMP-HEADER.
           05  filler pic X value '*'.
           05  filler pic X value ' '.
           05  H1 pic X(7)  value ' Offset'.
           05  filler pic X value ' '.
           05  H2 pic X(35) value 'Hex..... ........ ........ ........'.
           05  filler pic X value ' '.
           05  H3 pic X(16) value 'ebcdic..........'.
           05  filler pic X value ' '.
           05  H4 pic X(16) value 'ascii...........'.

       01  DUMP-LINE.
           05  filler pic X value '*'.
           05  filler pic X value ' '.
           05  D1 pic X(7)  value 'x00-x0F'.
           05  filler pic X value ' '.
           05  D2 pic X(35) value 'xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx'.
           05  filler pic X value ' '.
           05  D3 pic X(16) value '................'.
           05  filler pic X value ' '.
           05  D4 pic X(16) value '................'.

       01  X-DUMP-LINE.
           05  filler pic X value '*'.
           05  filler pic X value ' '.
           05  X1 pic X(7)  value 'x00-x0F'.
           05  filler pic X value ' '.
           05  X2 pic X(35) value 'xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx'.
           05  filler pic X value ' '.
           05  X3 pic X(16) value '................'.
           05  filler pic X value ' '.
           05  X4 pic X(16) value '................'.

       01  ADDRESS-OFFSET-HEX.
           05  A0 pic X(7)  value 'x00-x0F'.
           05  A1 pic X(7)  value 'x10-x1F'.
           05  A2 pic X(7)  value 'x20-x2F'.
           05  A3 pic X(7)  value 'x30-x3F'.
           05  A4 pic X(7)  value 'x40-x4F'.
           05  A5 pic X(7)  value 'x50-x5F'.
           05  A6 pic X(7)  value 'x60-x6F'.
           05  A7 pic X(7)  value 'x70-x7F'.

       01  ADDRESS-OFFSET-DEC.
           05  B0 pic X(7)  value '  1-016'.
           05  B1 pic X(7)  value ' 17-032'.
           05  B2 pic X(7)  value ' 33-048'.
           05  B3 pic X(7)  value ' 49-064'.
           05  B4 pic X(7)  value ' 65-080'.
           05  B5 pic X(7)  value ' 81-096'.
           05  B6 pic X(7)  value ' 97-112'.
           05  B7 pic X(7)  value '113-128'.

       01  DUMP-STATUS-LINE.
           05  filler          pic X(2)  value '* '.
           05  DS-DUMP-ID      pic X(8)  value 'HEXDUMP1'.
           05  filler          pic X     value is SPACE.
           05  DS-DUMP-STATUS  pic X(8)  value 'Starting'.
           05  filler          pic X(4)  value '... '.
           05  filler          pic X(9)  value 'Length = '.
           05  DS-LENGTH       pic 9999  value 0.

       01  MESSAGE-0004-1.
           05  filler pic X(29) value 'SIMODUMP-LENGTH is invalid,  '.
           05  filler pic X(29) value 'must be value from 1 to 128. '.
       01  MESSAGE-0004-2.
           05  filler pic X(29) value 'Assuming length of 128 bytes.'.

       01  MESSAGE-0008-1.
           05  filler pic X(29) value 'SIMODUMP-SYSOUT is invalid,  '.
           05  filler pic X(29) value 'must be SHOW, FILE or BOTH.  '.
       01  MESSAGE-0008-2.
           05  filler pic X(22) value 'Assuming SHOW mode.   '.

      *****************************************************************
      *    Pass area for call SIMOLOGS.
      *    ------------------------------------------------------------
       COPY PASSLOGS.

       COPY HEXTABLE.

      *****************************************************************
       LINKAGE SECTION.
       COPY PASSDUMP.

      *****************************************************************
       PROCEDURE DIVISION using SIMODUMP-PASS-AREA, SIMODUMP-BUFFER.
           perform FIRST-TIME-PROCESSING

           evaluate SIMODUMP-REQUEST
               when 'NOTE' perform ACTION-IS-POST-TEXT-INFO
               when 'DUMP' perform ACTION-IS-POST-DUMP-INFO
               when other  move 'DUMP' to SIMODUMP-REQUEST
                           perform ACTION-IS-POST-DUMP-INFO
           end-evaluate

           GOBACK.

      *****************************************************************
       ACTION-IS-POST-TEXT-INFO.
           move SIMODUMP-DUMP-ID      to MESSAGE-HEAD02
           move SIMODUMP-BUFFER(1:68) to MESSAGE-TEXT
           perform Z-DISPLAY-MESSAGE-BUFFER
           exit.

      *****************************************************************
       ACTION-IS-POST-DUMP-INFO.
           perform EDIT-PASS-AREA

           if  SIMODUMP-OUTPUT = 'LOG1'
           or                  = 'OUT1'
           or                  = 'OUT2'
           or                  = 'OPR1'
           or                  = 'OPR2'
               move SIMODUMP-DUMP-ID to DS-DUMP-ID
               move SIMODUMP-LENGTH  to DS-LENGTH
               move 'Starting'       to DS-DUMP-STATUS
               move DUMP-STATUS-LINE to MSG-79
               perform Z-POST-MSG-79
               move DUMP-HEADER to MSG-79
               perform Z-POST-MSG-79
           end-if

           perform DUMP-PROCESSING

           if  SIMODUMP-OUTPUT(1:3) = 'OPR'
           or  SIMODUMP-OUTPUT(1:3) = 'OUT'
           or  SIMODUMP-OUTPUT(1:3) = 'LOG'
               move SIMODUMP-OUTPUT to SIMOLOGS-REQUEST

               perform varying IX-1 from 1 by 1
               until IX-1 > 8
               or    IX-1 > SIMODUMP-IDX


                 if  SIMODUMP-OUTPUT = 'LOG1'
                 or                  = 'OUT2'
                 or                  = 'OPR2'
                     move SIMODUMP-LINES(IX-1) to SIMOLOGS-MESSAGE
                     perform POST-TO-LOG-FILE
                 else
                     move SIMODUMP-LINES(IX-1) to MSG-79
                     perform Z-POST-MSG-79
                 end-if
               end-perform

               move 'Complete'       to DS-DUMP-STATUS
               move DUMP-STATUS-LINE to MSG-79
               perform Z-POST-MSG-79
           end-if


           move SIMOLOGS-REQUEST to SIMODUMP-OUTPUT
           move SIMOLOGS-STATUS  to SIMODUMP-RESULT

           exit.

      *****************************************************************
       DUMP-PROCESSING.
           add 1 to ZERO giving IX-0
           add 1 to ZERO giving IX-1
           add 1 to ZERO giving IX-5
           subtract SIMODUMP-IDX from SIMODUMP-IDX
           add SIMODUMP-LENGTH to ZERO giving BUFFER-LENGTH
           if  BUFFER-LENGTH greater than 15
               add 16 to ZERO giving LINE-LENGTH
           else
               add BUFFER-LENGTH to ZERO giving LINE-LENGTH
           end-if
           perform until BUFFER-LENGTH = 0
               add 1 to ZERO giving IX-2
               add 1 to ZERO giving IX-3
               add 1 to ZERO giving IX-4
               move X-DUMP-LINE to DUMP-LINE
               move ADDRESS-OFFSET-DEC(IX-0:7) to D1
               add 7 to IX-0
               perform DUMP-SINGLE-LINE
               if  BUFFER-LENGTH greater than 15
                   subtract 16 from BUFFER-LENGTH
               else
                   subtract BUFFER-LENGTH from BUFFER-LENGTH
               end-if
               if  BUFFER-LENGTH greater than 15
                   add 16 to ZERO giving LINE-LENGTH
               else
                   add BUFFER-LENGTH to ZERO giving LINE-LENGTH
               end-if
           end-perform

           exit.

      *****************************************************************
       DUMP-SINGLE-LINE.
           perform until LINE-LENGTH = 0
      *        Get table element
               subtract TWO-BYTES-BINARY from TWO-BYTES-BINARY
               move SIMODUMP-BUFFER(IX-1:1) to TWO-BYTES-02
               add TWO-BYTES-BINARY to 1 giving IX-5
               move TAB-X1(IX-5) to WA-5
               move WA-5(1:2) to D2(IX-2:2)
      *        Increment to next position in hex-dump area of buffer
               add 2 to IX-2
               if  IX-2 = 9
               or  IX-2 = 18
               or  IX-2 = 27
                   add 1 to IX-2
               end-if
      *        EBCDIC Print Character and increment to next position
               move WA-5(3:1) to D3(IX-3:1)
               add 1 to IX-3
      *        ASCII  Print Character and increment to next position
               move WA-5(4:1) to D4(IX-4:1)
               add 1 to IX-4
      *        Increment pointer to next input buffer byte
               add 1 to IX-1
               subtract 1 from LINE-LENGTH
           end-perform
           move DUMP-LINE to DUMP-TEXT
           add 1 to SIMODUMP-IDX
           move DUMP-LINE to SIMODUMP-LINES(SIMODUMP-IDX)
           exit.

      *****************************************************************
       EDIT-PASS-AREA.
           perform EDIT-PASS-AREA-SYSOUT
           perform EDIT-PASS-AREA-LENGTH
           exit.

       EDIT-PASS-AREA-LENGTH.
           subtract SIMODUMP-RESULT from SIMODUMP-RESULT

           if  SIMODUMP-LENGTH not NUMERIC
               add 128 to ZERO giving SIMODUMP-LENGTH
               add 4 to ZERO giving SIMODUMP-RESULT
           end-if

           if  SIMODUMP-LENGTH less than 1
           or  SIMODUMP-LENGTH greater than 128
               add 4 to ZERO giving SIMODUMP-RESULT
               add 128 to ZERO giving SIMODUMP-LENGTH
           end-if

           if  SIMODUMP-RESULT not = ZERO
               move MESSAGE-0004-1 to MESSAGE-TEXT
               perform Z-POST-MSG-79
               move MESSAGE-0004-2 to MESSAGE-TEXT
               perform Z-POST-MSG-79
           end-if

           exit.

       EDIT-PASS-AREA-SYSOUT.
           if  SIMODUMP-OUTPUT = 'NONE'
           or                  = 'OUT1'
           or                  = 'OUT2'
           or                  = 'OPR1'
           or                  = 'OPR2'
           or                  = 'LOG1'
               subtract SIMODUMP-RESULT from SIMODUMP-RESULT
           else
               add 4 to ZERO   giving SIMODUMP-RESULT
               move 'OPR1'     to     SIMODUMP-OUTPUT
               move MESSAGE-0008-1 to MESSAGE-TEXT
               perform Z-POST-MSG-79
               move MESSAGE-0008-2 to MESSAGE-TEXT
               perform Z-POST-MSG-79
           end-if
           exit.

      *****************************************************************
       FIRST-TIME-PROCESSING.
           add 8 to ZERO giving SIMODUMP-RESULT
           move 'SIMODUMP'   to MESSAGE-HEAD02

           if  SIMODUMP-COPYRIGHT not = 'HIDE'
               perform POST-COPYRIGHT
           end-if

           add 1 to ZERO giving SIMODUMP-IDX
           perform 8 times
               move SPACES to SIMODUMP-LINES(SIMODUMP-IDX)
               add 1 to SIMODUMP-IDX
           end-perform
           subtract SIMODUMP-IDX from SIMODUMP-IDX
           exit.

      *****************************************************************
       POST-COPYRIGHT.
           move SIM-TITLE to     MSG-79
           perform        Z-POST-MSG-79
           move SIM-COPYRIGHT to MSG-79
           perform        Z-POST-MSG-79
           exit.

      *****************************************************************
       POST-TO-LOG-FILE.
           add  16 to ZERO giving SIMOLOGS-STATUS
      *    move DUMP-BUFFER to SIMOLOGS-MESSAGE
           call 'SIMOLOGS' using SIMOLOGS-PASS-AREA
           if  SIMOLOGS-STATUS not = ZERO
               move 'OPR1' to SIMODUMP-OUTPUT
               add SIMOLOGS-STATUS to ZERO giving SIMODUMP-RESULT
           end-if
           exit.

      *****************************************************************
       Z-POST-MSG-79.
           if  SIMODUMP-OUTPUT(1:3) = 'OUT'
               display MSG-79
           else
               display MSG-79 upon console
           end-if
           move SPACES to MSG-79
           exit.

      *****************************************************************
       Z-DISPLAY-MESSAGE-BUFFER.
           if  SIMODUMP-OUTPUT(1:3) = 'OUT'
               display MESSAGE-BUFFER
           else
               display MESSAGE-BUFFER upon console
           end-if
           move SPACES to MESSAGE-TEXT
           exit.
      *****************************************************************
      *      This example is provided by SimoTime Enterprises         *
      *        Our e-mail address is: helpdesk@simotime.com           *
      *     Also, visit our Web Site at http://www.simotime.com       *
      *****************************************************************

The COBOL Write-to-Log File
(Next) (Previous) (Table-of-Contents)

This program (SIMOLOGS.CBL) performs the necessary I/O to write to a log file (SYSLOG). If the logging function is used (i.e SIMODUMP-REQUEST contains a value of 'FILE' or 'BOTH' ) then a DD statement is required in the JCL. This program uses a Y2K (Year 2000) compliant date access function and required the COBOL/390 dialect.

DIALECT(ENTCOBOL)
CHARSET(ASCII)
ASSIGN(External)
RTNCODE-SIZE"2"
ANIM
outdd"SYSOUT 121 L"
SHARE-OUTDD
DATAMAP
settings
list()
noform

The Copy File for Pass Area Parameters
(Next) (Previous) (Table-of-Contents)

The following is the copy file (PASSDUMP.CPY) used for the pass area when calling the dump routine.

      *****************************************************************
      *                PASSDUMP is a COBOL Copy File                  *
      *     Data Structure or Pass Area used for calling SIMODUMP.    *
      *         Copyright (C) 1987-2012 SimoTime Enterprises          *
      *                     All Rights Reserved                       *
      *****************************************************************
      *              Provided by SimoTime Enterprises                 *
      *        Our e-mail address is: helpdesk@simotime.com           *
      *     Also, visit our Web Site at http://www.simotime.com       *
      *****************************************************************
      * Values for SIMODUMP-REQUEST                                   *
      * DUMP   Dump the Buffer in Hexadecimal format                  *
      * NOTE   Display or Write the text to the screen or log file    *
      *                                                               *
      * Values for SIMODUMP-SYSOUT                                    *
      * OPR1   Display dump information on operator console           *
      * OPR2   Display to operator console and write to log file      *
      * OUT1   Display dump information to SYSOUT device              *
      * OUT2   Display to SYSOUT device and write to log file         *
      * LOG1   Write dump information to the log file (SYSLOG)        *
      * NONE   Do not output to screen or file, put dump info in      *
      *        pass area table and return to caller.                  *
      *                                                               *
      * Values for SIMODUMP-COPYRIGHT                                 *
      * HIDE   Do not display the copyright information. Any other    *
      *        entry will display the copyright information.          *
      *****************************************************************
       01  SIMODUMP-PASS-AREA.
      *    Initial information is provided by the calling program,
      *    The SIMODUMP-REQUEST field will be modified to "DUMP" if it
      *    does not contain a valid entry.
      *    The SIMODUMP-RESULT field may also be modified by the
      *    SimoDUMP routine.
           05  SIMODUMP-REQUEST        PIC X(4).
           05  SIMODUMP-RESULT         PIC 9999.
      *    The following are not modified by the SimoDUMP routine...
           05  SIMODUMP-DUMP-ID        PIC X(8).
           05  SIMODUMP-OUTPUT         PIC X(4).
           05  SIMODUMP-COPYRIGHT      PIC X(4).
      *    The following are modified by the SimoDUMP routine...
           05  SIMODUMP-IDX            PIC 99.
           05  SIMODUMP-LINES          PIC X(80)   OCCURS 8 TIMES.
      *    The following are not modified by the SimoDUMP routine...
           05  SIMODUMP-LENGTH         PIC 9999.
       01  SIMODUMP-BUFFER             PIC X(128).
      *
      ***  PASSDUMP - End-of-Copy File - - - - - - - - - - - PASSDUMP *
      *****************************************************************
      *

The Copy File for Hex-Table
(Next) (Previous) (Table-of-Contents)

The following is the copy file (HEXTABLE.CPY) of the conversion table used by the dump routine.

      *****************************************************************
      *                HEXTABLE is a COBOL Copy File                  *
      *            Table for Hexadecimal Dump and Display.            *
      *         Copyright (C) 1987-2012 SimoTime Enterprises          *
      *                     All Rights Reserved                       *
      *****************************************************************
      *              Provided by SimoTime Enterprises                 *
      *        Our e-mail address is: helpdesk@simotime.com           *
      *     Also, visit our Web Site at http://www.simotime.com       *
      *****************************************************************
      *                                                               *
      * The following table contains 256, 5-byte elements.            *
      *                                                               *
      * The format of the table elements is as follows                *
      * Byte  Function                                                *
      *  1-2  Two-byte hexadecimal print value                        *
      *    3  Print character for EBCDIC                              *
      *    4  Print character for ASCII                               *
      *    5  0 - non-printable                                       *
      *       1 - printable for EBCDIC                                *
      *       2 - printable for ASCII                                 *
      *       3 - printable for Both                                  *
      *                                                               *
      * Notice the technique used for an ASCII apostrophe (X'27')     *
      * and an EBCDIC apostrphe (X'7D'). The value content is         *
      * enclosed in double quotes to allow for the definition of      *
      * an apostrophe (or single quote) within the field.             *
      * Please Note: This feature requires the COBOL/390 dialect.     *
      *****************************************************************
      *
       01  TABLE-OF-DATA.
           05  HEX-00  PIC X(5)    VALUE '00..0'.
           05  HEX-01  PIC X(5)    VALUE '01..0'.
           05  HEX-02  PIC X(5)    VALUE '02..0'.
           05  HEX-03  PIC X(5)    VALUE '03..0'.
           05  HEX-04  PIC X(5)    VALUE '04..0'.
           05  HEX-05  PIC X(5)    VALUE '05..0'.
           05  HEX-06  PIC X(5)    VALUE '06..0'.
           05  HEX-07  PIC X(5)    VALUE '07..0'.
           05  HEX-08  PIC X(5)    VALUE '08..0'.
           05  HEX-09  PIC X(5)    VALUE '09..0'.
           05  HEX-0A  PIC X(5)    VALUE '0A..0'.
           05  HEX-0B  PIC X(5)    VALUE '0B..0'.
           05  HEX-0C  PIC X(5)    VALUE '0C..0'.
           05  HEX-0D  PIC X(5)    VALUE '0D..0'.
           05  HEX-0E  PIC X(5)    VALUE '0E..0'.
           05  HEX-0F  PIC X(5)    VALUE '0F..0'.

           05  HEX-10  PIC X(5)    VALUE '10..0'.
           05  HEX-11  PIC X(5)    VALUE '11..0'.
           05  HEX-12  PIC X(5)    VALUE '12..0'.
           05  HEX-13  PIC X(5)    VALUE '13..0'.
           05  HEX-14  PIC X(5)    VALUE '14..0'.
           05  HEX-15  PIC X(5)    VALUE '15..0'.
           05  HEX-16  PIC X(5)    VALUE '16..0'.
           05  HEX-17  PIC X(5)    VALUE '17..0'.
           05  HEX-18  PIC X(5)    VALUE '18..0'.
           05  HEX-19  PIC X(5)    VALUE '19..0'.
           05  HEX-1A  PIC X(5)    VALUE '1A..0'.
           05  HEX-1B  PIC X(5)    VALUE '1B..0'.
           05  HEX-1C  PIC X(5)    VALUE '1C..0'.
           05  HEX-1D  PIC X(5)    VALUE '1D..0'.
           05  HEX-1E  PIC X(5)    VALUE '1E..0'.
           05  HEX-1F  PIC X(5)    VALUE '1F..0'.

           05  HEX-20  PIC X(5)    VALUE '20. 2'.
           05  HEX-21  PIC X(5)    VALUE '21.!2'.
           05  HEX-22  PIC X(5)    VALUE '22."2'.
           05  HEX-23  PIC X(5)    VALUE '23.#2'.
           05  HEX-24  PIC X(5)    VALUE '24.$2'.
           05  HEX-25  PIC X(5)    VALUE '25.%2'.
           05  HEX-26  PIC X(5)    VALUE '26.&2'.
           05  HEX-27  PIC X(5)    VALUE "27.'2".
           05  HEX-28  PIC X(5)    VALUE '28.(2'.
           05  HEX-29  PIC X(5)    VALUE '29.)2'.
           05  HEX-2A  PIC X(5)    VALUE '2A.*2'.
           05  HEX-2B  PIC X(5)    VALUE '2B.+2'.
           05  HEX-2C  PIC X(5)    VALUE '2C.,2'.
           05  HEX-2D  PIC X(5)    VALUE '2D.-2'.
           05  HEX-2E  PIC X(5)    VALUE '2E..2'.
           05  HEX-2F  PIC X(5)    VALUE '2F./2'.

           05  HEX-30  PIC X(5)    VALUE '30.02'.
           05  HEX-31  PIC X(5)    VALUE '31.12'.
           05  HEX-32  PIC X(5)    VALUE '32.22'.
           05  HEX-33  PIC X(5)    VALUE '33.32'.
           05  HEX-34  PIC X(5)    VALUE '34.42'.
           05  HEX-35  PIC X(5)    VALUE '35.52'.
           05  HEX-36  PIC X(5)    VALUE '36.62'.
           05  HEX-37  PIC X(5)    VALUE '37.72'.
           05  HEX-38  PIC X(5)    VALUE '38.82'.
           05  HEX-39  PIC X(5)    VALUE '39.92'.
           05  HEX-3A  PIC X(5)    VALUE '3A.:2'.
           05  HEX-3B  PIC X(5)    VALUE '3B.;2'.
           05  HEX-3C  PIC X(5)    VALUE '3C.<2'.
           05  HEX-3D  PIC X(5)    VALUE '3D.=2'.
           05  HEX-3E  PIC X(5)    VALUE '3E.>2'.
           05  HEX-3F  PIC X(5)    VALUE '3F.?2'.

           05  HEX-40  PIC X(5)    VALUE '40 @3'.
           05  HEX-41  PIC X(5)    VALUE '41.A2'.
           05  HEX-42  PIC X(5)    VALUE '42.B2'.
           05  HEX-43  PIC X(5)    VALUE '43.C2'.
           05  HEX-44  PIC X(5)    VALUE '44.D2'.
           05  HEX-45  PIC X(5)    VALUE '45.E2'.
           05  HEX-46  PIC X(5)    VALUE '46.F2'.
           05  HEX-47  PIC X(5)    VALUE '47.G2'.
           05  HEX-48  PIC X(5)    VALUE '48.H2'.
           05  HEX-49  PIC X(5)    VALUE '49.I2'.
           05  HEX-4A  PIC X(5)    VALUE '4A.J2'.
           05  HEX-4B  PIC X(5)    VALUE '4B.K3'.
           05  HEX-4C  PIC X(5)    VALUE '4C<L3'.
           05  HEX-4D  PIC X(5)    VALUE '4D(M3'.
           05  HEX-4E  PIC X(5)    VALUE '4E+N3'.
           05  HEX-4F  PIC X(5)    VALUE '4F|O3'.

           05  HEX-50  PIC X(5)    VALUE '50&P3'.
           05  HEX-51  PIC X(5)    VALUE '51.Q2'.
           05  HEX-52  PIC X(5)    VALUE '52.R2'.
           05  HEX-53  PIC X(5)    VALUE '53.S2'.
           05  HEX-54  PIC X(5)    VALUE '54.T2'.
           05  HEX-55  PIC X(5)    VALUE '55.U2'.
           05  HEX-56  PIC X(5)    VALUE '56.V2'.
           05  HEX-57  PIC X(5)    VALUE '57.W2'.
           05  HEX-58  PIC X(5)    VALUE '58.X2'.
           05  HEX-59  PIC X(5)    VALUE '59.Y2'.
           05  HEX-5A  PIC X(5)    VALUE '5A!Z3'.
           05  HEX-5B  PIC X(5)    VALUE '5B$[3'.
           05  HEX-5C  PIC X(5)    VALUE '5C*\3'.
           05  HEX-5D  PIC X(5)    VALUE '5D)]3'.
           05  HEX-5E  PIC X(5)    VALUE '5E;^3'.
           05  HEX-5F  PIC X(5)    VALUE '5F._2'.

           05  HEX-60  PIC X(5)    VALUE '60-`3'.
           05  HEX-61  PIC X(5)    VALUE '61/a3'.
           05  HEX-62  PIC X(5)    VALUE '62.b2'.
           05  HEX-63  PIC X(5)    VALUE '63.c2'.
           05  HEX-64  PIC X(5)    VALUE '64.d2'.
           05  HEX-65  PIC X(5)    VALUE '65.e2'.
           05  HEX-66  PIC X(5)    VALUE '66.f2'.
           05  HEX-67  PIC X(5)    VALUE '67.g2'.
           05  HEX-68  PIC X(5)    VALUE '68.h2'.
           05  HEX-69  PIC X(5)    VALUE '69.i2'.
           05  HEX-6A  PIC X(5)    VALUE '6A|j3'.
           05  HEX-6B  PIC X(5)    VALUE '6B.k3'.
           05  HEX-6C  PIC X(5)    VALUE '6C%l3'.
           05  HEX-6D  PIC X(5)    VALUE '6D_m3'.
           05  HEX-6E  PIC X(5)    VALUE '6E>n3'.
           05  HEX-6F  PIC X(5)    VALUE '6F?o3'.

           05  HEX-70  PIC X(5)    VALUE '70.p2'.
           05  HEX-71  PIC X(5)    VALUE '71.q2'.
           05  HEX-72  PIC X(5)    VALUE '72.r2'.
           05  HEX-73  PIC X(5)    VALUE '73.s2'.
           05  HEX-74  PIC X(5)    VALUE '74.t2'.
           05  HEX-75  PIC X(5)    VALUE '75.u2'.
           05  HEX-76  PIC X(5)    VALUE '76.v2'.
           05  HEX-77  PIC X(5)    VALUE '77.w2'.
           05  HEX-78  PIC X(5)    VALUE '78.x2'.
           05  HEX-79  PIC X(5)    VALUE '79`y3'.
           05  HEX-7A  PIC X(5)    VALUE '7A:z3'.
           05  HEX-7B  PIC X(5)    VALUE '7B#{3'.
           05  HEX-7C  PIC X(5)    VALUE '7C@.3'.
           05  HEX-7D  PIC X(5)    VALUE "7D'}3".
           05  HEX-7E  PIC X(5)    VALUE '7E=~3'.
           05  HEX-7F  PIC X(5)    VALUE '7F".2'.

           05  HEX-80  PIC X(5)    VALUE '80..0'.
           05  HEX-81  PIC X(5)    VALUE '81a.1'.
           05  HEX-82  PIC X(5)    VALUE '82b.1'.
           05  HEX-83  PIC X(5)    VALUE '83c.1'.
           05  HEX-84  PIC X(5)    VALUE '84d.1'.
           05  HEX-85  PIC X(5)    VALUE '85e.1'.
           05  HEX-86  PIC X(5)    VALUE '86f.1'.
           05  HEX-87  PIC X(5)    VALUE '87g.1'.
           05  HEX-88  PIC X(5)    VALUE '88h.1'.
           05  HEX-89  PIC X(5)    VALUE '89i.1'.
           05  HEX-8A  PIC X(5)    VALUE '8A..0'.
           05  HEX-8B  PIC X(5)    VALUE '8B{.1'.
           05  HEX-8C  PIC X(5)    VALUE '8C..0'.
           05  HEX-8D  PIC X(5)    VALUE '8D..0'.
           05  HEX-8E  PIC X(5)    VALUE '8E..0'.
           05  HEX-8F  PIC X(5)    VALUE '8F+.1'.

           05  HEX-90  PIC X(5)    VALUE '90..0'.
           05  HEX-91  PIC X(5)    VALUE '91j.1'.
           05  HEX-92  PIC X(5)    VALUE '92k.1'.
           05  HEX-93  PIC X(5)    VALUE '93l.1'.
           05  HEX-94  PIC X(5)    VALUE '94m.1'.
           05  HEX-95  PIC X(5)    VALUE '95n.1'.
           05  HEX-96  PIC X(5)    VALUE '96o.1'.
           05  HEX-97  PIC X(5)    VALUE '97p.1'.
           05  HEX-98  PIC X(5)    VALUE '98q.1'.
           05  HEX-99  PIC X(5)    VALUE '99r.1'.
           05  HEX-9A  PIC X(5)    VALUE '9A..0'.
           05  HEX-9B  PIC X(5)    VALUE '9B}.1'.
           05  HEX-9C  PIC X(5)    VALUE '9C..0'.
           05  HEX-9D  PIC X(5)    VALUE '9D..0'.
           05  HEX-9E  PIC X(5)    VALUE '9E..0'.
           05  HEX-9F  PIC X(5)    VALUE '9F..0'.

           05  HEX-A0  PIC X(5)    VALUE 'A0..0'.
           05  HEX-A1  PIC X(5)    VALUE 'A1..0'.
           05  HEX-A2  PIC X(5)    VALUE 'A2s.1'.
           05  HEX-A3  PIC X(5)    VALUE 'A3t.1'.
           05  HEX-A4  PIC X(5)    VALUE 'A4u.1'.
           05  HEX-A5  PIC X(5)    VALUE 'A5v.1'.
           05  HEX-A6  PIC X(5)    VALUE 'A6w.1'.
           05  HEX-A7  PIC X(5)    VALUE 'A7x.1'.
           05  HEX-A8  PIC X(5)    VALUE 'A8y.1'.
           05  HEX-A9  PIC X(5)    VALUE 'A9z.1'.
           05  HEX-AA  PIC X(5)    VALUE 'AA..0'.
           05  HEX-AB  PIC X(5)    VALUE 'AB..0'.
           05  HEX-AC  PIC X(5)    VALUE 'AC..0'.
           05  HEX-AD  PIC X(5)    VALUE 'AD..0'.
           05  HEX-AE  PIC X(5)    VALUE 'AE..0'.
           05  HEX-AF  PIC X(5)    VALUE 'AF..0'.

           05  HEX-B0  PIC X(5)    VALUE 'B0..0'.
           05  HEX-B1  PIC X(5)    VALUE 'B1..0'.
           05  HEX-B2  PIC X(5)    VALUE 'B2..0'.
           05  HEX-B3  PIC X(5)    VALUE 'B3..0'.
           05  HEX-B4  PIC X(5)    VALUE 'B4..0'.
           05  HEX-B5  PIC X(5)    VALUE 'B5..0'.
           05  HEX-B6  PIC X(5)    VALUE 'B6..0'.
           05  HEX-B7  PIC X(5)    VALUE 'B7..0'.
           05  HEX-B8  PIC X(5)    VALUE 'B8..0'.
           05  HEX-B9  PIC X(5)    VALUE 'B9..0'.
           05  HEX-BA  PIC X(5)    VALUE 'BA[.1'.
           05  HEX-BB  PIC X(5)    VALUE 'BB].1'.
           05  HEX-BC  PIC X(5)    VALUE 'BC..0'.
           05  HEX-BD  PIC X(5)    VALUE 'BD..0'.
           05  HEX-BE  PIC X(5)    VALUE 'BE..0'.
           05  HEX-BF  PIC X(5)    VALUE 'BF..0'.

           05  HEX-C0  PIC X(5)    VALUE 'C0{.1'.
           05  HEX-C1  PIC X(5)    VALUE 'C1A.1'.
           05  HEX-C2  PIC X(5)    VALUE 'C2B.1'.
           05  HEX-C3  PIC X(5)    VALUE 'C3C.1'.
           05  HEX-C4  PIC X(5)    VALUE 'C4D.1'.
           05  HEX-C5  PIC X(5)    VALUE 'C5E.1'.
           05  HEX-C6  PIC X(5)    VALUE 'C6F.1'.
           05  HEX-C7  PIC X(5)    VALUE 'C7G.1'.
           05  HEX-C8  PIC X(5)    VALUE 'C8H.1'.
           05  HEX-C9  PIC X(5)    VALUE 'C9I.1'.
           05  HEX-CA  PIC X(5)    VALUE 'CA..0'.
           05  HEX-CB  PIC X(5)    VALUE 'CB..0'.
           05  HEX-CC  PIC X(5)    VALUE 'CC..0'.
           05  HEX-CD  PIC X(5)    VALUE 'CD..0'.
           05  HEX-CE  PIC X(5)    VALUE 'CE..0'.
           05  HEX-CF  PIC X(5)    VALUE 'CF..0'.

           05  HEX-D0  PIC X(5)    VALUE 'D0}.1'.
           05  HEX-D1  PIC X(5)    VALUE 'D1J.1'.
           05  HEX-D2  PIC X(5)    VALUE 'D2K.1'.
           05  HEX-D3  PIC X(5)    VALUE 'D3L.1'.
           05  HEX-D4  PIC X(5)    VALUE 'D4M.1'.
           05  HEX-D5  PIC X(5)    VALUE 'D5N.1'.
           05  HEX-D6  PIC X(5)    VALUE 'D6O.1'.
           05  HEX-D7  PIC X(5)    VALUE 'D7P.1'.
           05  HEX-D8  PIC X(5)    VALUE 'D8Q.1'.
           05  HEX-D9  PIC X(5)    VALUE 'D9R.1'.
           05  HEX-DA  PIC X(5)    VALUE 'DA..0'.
           05  HEX-DB  PIC X(5)    VALUE 'DB..0'.
           05  HEX-DC  PIC X(5)    VALUE 'DC..0'.
           05  HEX-DD  PIC X(5)    VALUE 'DD..0'.
           05  HEX-DE  PIC X(5)    VALUE 'DE..0'.
           05  HEX-DF  PIC X(5)    VALUE 'DF..0'.

           05  HEX-E0  PIC X(5)    VALUE 'E0..0'.
           05  HEX-E1  PIC X(5)    VALUE 'E1..0'.
           05  HEX-E2  PIC X(5)    VALUE 'E2S.1'.
           05  HEX-E3  PIC X(5)    VALUE 'E3T.1'.
           05  HEX-E4  PIC X(5)    VALUE 'E4U.1'.
           05  HEX-E5  PIC X(5)    VALUE 'E5V.1'.
           05  HEX-E6  PIC X(5)    VALUE 'E6W.1'.
           05  HEX-E7  PIC X(5)    VALUE 'E7X.1'.
           05  HEX-E8  PIC X(5)    VALUE 'E8Y.1'.
           05  HEX-E9  PIC X(5)    VALUE 'E9Z.1'.
           05  HEX-EA  PIC X(5)    VALUE 'EA..0'.
           05  HEX-EB  PIC X(5)    VALUE 'EB..0'.
           05  HEX-EC  PIC X(5)    VALUE 'EC..0'.
           05  HEX-ED  PIC X(5)    VALUE 'ED..0'.
           05  HEX-EE  PIC X(5)    VALUE 'EE..0'.
           05  HEX-EF  PIC X(5)    VALUE 'EF..0'.

           05  HEX-F0  PIC X(5)    VALUE 'F00.1'.
           05  HEX-F1  PIC X(5)    VALUE 'F11.1'.
           05  HEX-F2  PIC X(5)    VALUE 'F22.1'.
           05  HEX-F3  PIC X(5)    VALUE 'F33.1'.
           05  HEX-F4  PIC X(5)    VALUE 'F44.1'.
           05  HEX-F5  PIC X(5)    VALUE 'F55.1'.
           05  HEX-F6  PIC X(5)    VALUE 'F66.1'.
           05  HEX-F7  PIC X(5)    VALUE 'F77.1'.
           05  HEX-F8  PIC X(5)    VALUE 'F88.1'.
           05  HEX-F9  PIC X(5)    VALUE 'F99.1'.
           05  HEX-FA  PIC X(5)    VALUE 'FA..0'.
           05  HEX-FB  PIC X(5)    VALUE 'FB..0'.
           05  HEX-FC  PIC X(5)    VALUE 'FC..0'.
           05  HEX-FD  PIC X(5)    VALUE 'FD..0'.
           05  HEX-FE  PIC X(5)    VALUE 'FE..0'.
           05  HEX-FF  PIC X(5)    VALUE 'FF..0'.

       01  TABLE-OF-PRINT          REDEFINES TABLE-OF-DATA.
           05  TAB-X1  PIC X(5)    OCCURS 256 TIMES.
      *
      ***  HEXTABLE - End-of-Copy File - - - - - - - - - - - HEXTABLE *
      *****************************************************************
      *

Summary
(Next) (Previous) (Table-of-Contents)

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 documents and the links to other documents are intended to provide a choice of alternatives.

Software Agreement and Disclaimer
(Next) (Previous) (Table-of-Contents)

Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Enterprises. 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 Enterprises.

SimoTime Enterprises 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 Enterprises shall not be liable for any direct, indirect, special or consequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software, documentation or training material.

Downloads and Links to Similar Pages
(Next) (Previous) (Table-of-Contents)

This section includes links to documents with additional information that is beyond the scope and purpose of this document. The first sub-section requires an internet connection, the second sub-section references locally available documents.

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

Downloads and Links, Internet Access Required
(Next) (Previous) (Table-of-Contents)

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.

Obtain a copy of this software with supporting material for review and evaluation purposes. Other uses will require a SimoTime Software License. The evaluation copy is delivered electronically in a ZIP File.

Explore an Extended List of Software Technologies that are available for review and evaluation. The software technologies (or Z-Packs) provide individual programming examples, documentation and test data files in a single package. The Z-Packs are usually in zip format to reduce the amount of time to download.

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

Explore The File Status Return Codes to interpret the results of accessing VSAM data sets and QSAM files.

Explore The Micro Focus Web Site for more information about products and services available from Micro Focus.

Downloads and Links, Local Access
(Next) (Previous) (Table-of-Contents)

The following links may be accessible without an internet connection.

Explore The File Status Return Codes to interpret the results of accessing VSAM data sets and QSAM files.

Glossary of Terms
(Next) (Previous) (Table-of-Contents)

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

Comments, Suggestions or Feedback
(Next) (Previous) (Table-of-Contents)

This document was created and is maintained by SimoTime Enterprises.

If you have any questions, suggestions, comments or feedback please call or send an e-mail to: helpdesk@simotime.com

We appreciate hearing from you.

Company Overview
(Next) (Previous) (Table-of-Contents)

Founded in 1987, SimoTime Enterprises 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. This includes the smallest thin client using the Internet and the very large mainframe systems. There is more to making the Internet work for your company's business than just having a nice looking WEB site. It is about combining the latest technologies and existing technologies with practical business experience. It's about the business of doing business and looking good in the process. 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.

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
Copyright © 1987-2012 SimoTime Enterprises  All Rights Reserved
When technology complements business
http://www.simotime.com