Memory Dump
 COBOL Working Storage
http://www.simotime.com
When technology complements business    Copyright © 1987-2010  SimoTime Enterprises  All Rights Reserved
  Table of Contents Version 10.03.20 
  Introduction
 
  Programming Objectives
  Programming Input and Output
  Programming Requirements
  Programming Overview
  The Call Interface
  System Requirements and Prerequisites
  A CMD Member for the Windows Environment
  A JCL Member for the Mainframe Environment
  The COBOL Demonstration Program
  The COBOL Snap Dump (or Memory Dump) Routine
  The Copy Files to Define the Start/Cease of Working Storage
  Summary
 
  Software Agreement and Disclaimer
  Downloads and Links to Similar Pages
  Comments or Suggestions
  About SimoTime

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

This example provides a callable module (SIMOSNAP) that is used to determine the size and dump the content of a COBOL program's WORKING-STORAGE section in a Hex-dump format. The SIMOSNAP routine is intended to be used by application programs currently running on a Linux, UNIX or Windows (LUW) system with Micro Focus. A sample program (CBSNAPC1.CBL) is provided and describes the details of calling and reviewing the output of the snap-dump routine.

Programming Objectives
(Next) (Previous) (Table-of-Contents)

The primary objective is to provide a programmer with a callable routine that will dump the content of a COBOL program's WORKING-STORAGE Section and display the information to a SYSOUT device. A secondary objective is to determine the size of memory area and display this information to the SYSOUT device.

Programming Input and Output
(Next) (Previous) (Table-of-Contents)

The purpose of the sample programs is to test the DUMP routine. The DUMP routine (SIMOSNAP) is called with two (2) parameters. The parameters are also referred to as "eye-catchers" that identify the start and ending points of the section of memory to be dumped.. The following is an example of a COBOL statement that will call the DUMP routine.

           call 'SIMOSNAP' using STSNAP-START STSNAP-CEASE

The output of the DUMP routine is a display of information to SYSOUT. If JCL is used with the Enterprise Server Mainframe Sub System (ES/MSS) then the information will be written to the device specified by the SYSOUT DD statement. If a Windows Command file is used the information will be written to the device specified by the SYSOUT environment variable.

The following information is posted to the SYSOUT device.

* CBSNAPC1 Sample, Dump of Working Storage    v06.12.12 http://www.simotime.com                                          
* CBSNAPC1 Copyright 1987-2009   SimoTime Enterprises, LLC  All Rights Reserved                                          
* CBSNAPC1 Use SimoSNAP with explicit coding...                                                                          
@SimoSNAP by SimoTime Enterprises**********************************************                                          
@SimoSNAP Dump Buffer Size is 0000448                                                                                    
@Hex-Disp Hex..... ........ ........ ........ ebcdic.......... ascii...........                                          
@00000000 5354534E 41502D53 54415254 2D544147 ...+.&.......... STSNAP-START-TAG                                          
@00000010 2A204342 534E4150 43312053 616D706C .....+.&..../_.% * CBSNAPC1 Sampl                                          
@00000020 652C2044 756D7020 6F662057 6F726B69 ....._..?...?... e, Dump of Worki                                          
@00000030 6E672053 746F7261 67652020 20207630 >....?./........ ng Storage    v0                                          
@00000040 362E3132 2E313220 68747470 3A2F2F77 ................ 6.12.12 http://w                                          
@00000050 77772E73 696D6F74 696D652E 636F6D20 ....._?.._...?_. ww.simotime.com                                           
@00000060 2A204342 534E4150 43312043 6F707972 .....+.&....?.`. * CBSNAPC1 Copyr                                          
@00000070 69676874 20313938 372D3230 30392020 ................ ight 1987-2009                                            
@00000080 2053696D 6F54696D 6520456E 74657270 ..._?.._...>....  SimoTime Enterp                                          
@00000090 72697365 732C204C 4C432020 416C6C20 .......<<....%%. rises, LLC  All                                           
@000000A0 52696768 74732052 65736572 76656420 ................ Rights Reserved                                           
@000000B0 2A204342 534E4150 43312054 68616E6B .....+.&...../>. * CBSNAPC1 Thank                                          
@000000C0 20796F75 2C207468 69732074 6563686E .`?............>  you, this techn                                          
@000000D0 6F6C6F67 79207761 73207072 6F647563 ?%?.`../....?... ology was produc                                          
@000000E0 65642062 79205369 6D6F5469 6D652045 ....`..._?.._... ed by SimoTime E                                          
@000000F0 6E746572 70726973 65732C20 4C4C4320 >...........<<.. nterprises, LLC                                           
@00000100 2A204342 534E4150 43312050 6C656173 .....+.&...&%./. * CBSNAPC1 Pleas                                          
@00000110 65207365 6E642061 6C6C2069 6E717569 ....>../%%..>... e send all inqui                                          
@00000120 72657320 6F722073 75676765 7374696F ....?..........? res or suggestio                                          
@00000130 6E732074 6F207468 65206865 6C706465 >...?.......%... ns to the helpde                                          
@00000140 736B4073 696D6F74 696D652E 636F6D20 .. .._?.._...?_. sk@simotime.com                                           
@00000150 2A204342 534E4150 43312020 20202020 .....+.&........ * CBSNAPC1                                                
@00000160 20202020 20202020 20202020 20202020 ................                                                           
@00000170 20202020 20202020 20202020 20202020 ................                                                           
@00000180 20202020 20202020 20202020 20202020 ................                                                           
@00000190 20202020 20202020 20202020 20202020 ................                                                           
@000001A0 00123C00 00007B30 30313233 20202020 ......#......... ..<...{00123                                              
@000001B0 5354534E 41502D43 45415345 2D544147 ...+.&.......... STSNAP-CEASE-TAG                                          
* CBSNAPC1 Sample User Code...                                                                                           
* CBSNAPC1 Thank you, this technology was produced by SimoTime Enterprises, LLC                                          
* CBSNAPC1 Please send all inquires or suggestions to the helpdesk@simotime.com

The following is written to the spool file when using Micro Focus Enterprise Server (ES/MTO).

     *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 
     *-*-*  Micro Focus ESJCL Version 6.0.001 ASCII  JES2 SEE60_GA_20090618        *-*-* 
     *-*-*  Copyright (C) 1997-2009 Micro Focus (IP) Limited. All rights reserved. *-*-* 
     *-*-*  Job: 03305 Name: CBSNAPJ1 User: mfuser   Date: 06/09/10 Time: 10:20:21 *-*-* 
     *-*-*  File: $TXRFDIR/T000000050.T                                            *-*-* 
     *-*-*  DSN:                                                                   *-*-* 
     *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 
 
   1 //CBSNAPJ1 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1 
   2 //* ******************************************************************* 
   3 //*                   This program is provided by:                    * 
   4 //*                    SimoTime Enterprises, LLC                      * 
   5 //*           (C) Copyright 1987-2010 All Rights Reserved             * 
   6 //*             Web Site URL:   http://www.simotime.com               * 
   7 //*                   e-mail:   helpdesk@simotime.com                 * 
   8 //* ******************************************************************* 
   9 //* 
  10 //* Text    - SNAP Dump Routine for the Micro Focus Environment. 
  11 //* Author  - SimoTime Enterprises 
  12 //* Date    - September 23, 2006 
  13 //* Version - 07.01.22 
  14 //* 
  15 //* This set of programs illustrate the use a callable COBOL program 
  16 //* that performs a dump of the COBOL Working Storage Section based 
  17 //* on the use of embedded "EYE-CATCHER" fields.. 
  18 //* 
  19 //* This SNAP Dumproutine is for use in a Micro Focus environment. 
  20 //* 
  21 //* ******************************************************************* 
  22 //* Step   1 of 2  Test the Snap Dump Routine. 
  23 //* 
  24 //STEP0010 EXEC PGM=CBSNAPC1 
  25 //SYSOUT   DD  SYSOUT=* 
  26 //* 
**** JCLCM0180I Job ready for execution. 
**** EXECUTION SUMMARY ----------------------------------------------------- 
 
     10:20:22 JCLCM0188I JOB  STARTED 
 
     10:20:22 JCLCM0190I STEP STARTED   STEP0010 
     10:20:22 JCLCM0199I Program CBSNAPC1 is COBOL VSC2  ASCII  Big-Endian    NOAMODE. 
     MFE2010.S0609.S102021.J03305.D00001.SYSOUT                        SYSOUT 
      C:\SIMOSAM1\DATALIBA\SPOOL\MFE20*102021.J03305.D00001.SYSOUT.DAT  SPOOLED 
---> 10:20:22 JCLCM0191I STEP ENDED     STEP0010 - COND CODE 0000 
 
---> 10:20:22 JCLCM0182I JOB  ENDED   - COND CODE 0000 

Programming Requirements
(Next) (Previous) (Table-of-Contents)

This suite of samples programs will run on the following platforms.

1. The DUMP routine was executed and tested on Windows/XP. The samples were executed using Micro Focus Net Express with a Windows CMD file and Micro Focus Enterprise Server with the Mainframe Sub-System option using JCL. Both environments were configued to run in an ASCII encoded environment.
2. The SimoMODS package should be installed prior to using this suite of sample programs. This example uses the SIMOSNAP.CBL program that is provided in the SimoMODS package. Refer to the SimoTime web site for more infomation.
3. This suite of programs may be ported to run on a LINUX or UNIX platforms supported by Micro Focus COBOL.

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

The following is a flowchart of the job for executing the program to test the DUMP routine.

                   
 
CBSNAPJ1
jcl
     
CBSNAPE1
cmd
      The JCL or CMD member for running the application.
 
     
     
     
 
 
 
     
     
     
 
 
 
     
     
     
       
     
CBSNAPC1
CBL
 
 
 
     
     
     
      Main Program
     
 
 
SIMOSNAP
cbl
 
 
 
SYSOUT
spool
  Dump to SYSOUT
     
End-of-Job
EOJ
           
                   
 An Example for Executing a Program to DUMP the WORKING-STORAGE Section to SYSOUT

The main program (CBSNAPC1) will call the DUMP routine (SIMOSNAP) which will display the content of WORKING-STORAGE to a SYSOUT device (using a HEX Dump format). The source code for the CMD file, the JCL member and the COBOL programs is provided and may be modified to fit your environment.

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

The callable interface requires two data structures to be defined in the Working Storage section of the calling program.

Two copy files are provided to define the "eye-catcher" fields in the COBOL Working Storage Section. The copy statements will create the fields that will be used by the SimoSNAP routine to determine the start and stop addresses for the memory dump.

The first copy statement (STSNAPB1.CPY) should be the first statement in the COBOL Working Storage Section. The second copy statement (STSNAPB2.CPY) should be the last statement in the COBOL Working Storage Section.

       WORKING STORAGE.
      *The following should be the first statement in Working Storage.
       COPY STSNAPB1

      *...
      *The User's Working Storage Definitions go here...
      *...

      *The following should be the last statement in Working Storage.
       COPY STSNAPB2.

Note: The copy files insert sixteen (16) byte literals as the first and last fields in the Working Storage Section. The source code may be viewed in  The Copy File section  of this document.

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

      *****************************************************************
      *    The coding required to do the call to the File Status Routine.
      *    ------------------------------------------------------------
           call 'SIMOSNAP' using STSNAP-START STSNAP-CEASE

System Requirements and Prerequisites
(Next) (Previous) (Table-of-Contents)

The programs in this packet were created and tested on an intel system with Microsoft Windows/XP and Micro Focus Net Express. The source code and executables are Windows Command files and COBOL programs.

This packet uses members that are part of  The SimoMODS Series  of callable programs. Therefore, the SimoMODS packet should be installed prior to running this packet of programs. The required prerequisite programs from the SimoMODS Series are SimoNOTE.CMD, SimoEXEC.EXE, SimoLOGS.DLL and SimoSNAP.DLL.

A CMD Member for the Windows Environment
(Next) (Previous) (Table-of-Contents)

The following is the Windows Command file (CBSNAPE1.CMD) that is required to run as a job on a PC using Micro Focus Net Express.

@echo OFF
rem  * *******************************************************************
rem  *                   This program is provided by:                    *
rem  *                    SimoTime Enterprises, LLC                      *
rem  *           (C) Copyright 1987-2010 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  *
rem  * Text    - SimoSNAP, Sample use of a Callable Memory Dump Routine
rem  * Author  - SimoTime Enterprises
rem  * Date    - November 11, 2003
rem  * Version - 06.12.12
rem  *
rem  * This set of programs illustrate the use a COBOL program to do
rem  * a memory dump of Working Storage when an unexpected condition
rem  * is encountered.
rem  *
rem  * This technique provides for the use of a single COBOL source
rem  * program that will run in a Windows environment with Micro Focus
rem  * Net Express.
rem  *
rem  * This set of programs was tested on a Personal Computer with Windows
rem  * Windows and Micro Focus Net Express.
rem  *
rem  *   ************
rem  *   * CBSNAPE1 *
rem  *   ********cmd*
rem  *        *  *
rem  *        *  *        ************     ************
rem  *        *  ***call*** SIMONOTE ******* CONSOLE  *
rem  *        *           ********cmd*  *  ************
rem  *        *                         *
rem  *        *                         *  ************
rem  *        *                         ****  SYSLOG  *
rem  *        *                            *******data*
rem  *        *
rem  *   ************     ************     ************
rem  *   * SIMOEXEC ******* CBSNAPC1 ******* CONSOLE  *
rem  *   ********exe*     ********cbl*  *  ************
rem  *        *                *
rem  *        *                *
rem  *        *           ************
rem  *        *           * SIMOSNAP *
rem  *        *           ********cbl*
rem  *        *                *
rem  *        *                *
rem  *        *           ************     ************
rem  *        *           * SIMOLOGS ******* CONSOLE  *
rem  *        *           ********cbl*  *  ************
rem  *        *                         *
rem  *        *                         *  ************
rem  *        *                         ****  SYSLOG  *
rem  *        *                            *******data*
rem  *   ************
rem  *   *   EOJ    *
rem  *   ************
rem  *
rem  * ********************************************************************
rem  * Step   1 of 2  Set the global environment variables...
rem  *
     setlocal
rem  * The following call statement will set commonly used environment
rem  * variables. This call technique is used so the commonly used
rem  * variables may be stored in a single location. This makes it easier
rem  * to change when porting programs across systems with differing
rem  * configurations.
     call Env1PROD
     if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
rem  *
     call SimoNOTE "*******************************************************CbSnapE1"
     call SimoNOTE "Starting JobName CbSnapE1"
rem  * ********************************************************************
rem  * Step   2 of 2  Execute the sample program...
rem  *
     SimoEXEC EXEC CbSnapC1
     if ERRORLEVEL = 0 goto :EojAOK
     set JobStatus=0010
     goto :EojNOK
:EojAOK
     call SimoNOTE "Finished JobName CbSnapE1, Job Status is %JobStatus%"
     goto :End
:EojNOK
     call SimoNOTE "ABENDING JobName CbSnapE1, Job Status is %JobStatus%"
     echo CBSNAPC1 is ABENDING>>%BaseLib1%\LOGS\ABENDLOG.TXT
     goto :End
:End
     call SimoNOTE "Conclude SysLog is %SYSLOG%"
     if not "%1" == "nopause" pause
     endlocal

The preceding command file makes a call to Env1PROD.CMD to set environment variables. This call technique is used so the commonly used variables may be stored in a single location. This makes it easier to change environment requirements when porting programs across systems with differing configurations. The following shows the content of the Env1PROD.CMD file.

@echo off
rem  * *******************************************************************
rem  *                   This program is provided by:                    *
rem  *                    SimoTime Enterprises, LLC                      *
rem  *           (C) Copyright 1987-2010 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  *
rem  * Text   - Provide a single point to set common environment variables.
rem  * Author - SimoTime Enterprises
rem  * Date   - January 24, 1996
rem  *
rem  * Set the commonly used environment variables. This is used to provide
rem  * a single point for managing the commonly used environment variables.
rem  *
     set BaseLib1=c:\Assist01\WIN1
     set syslog=%BaseLib1%\LOGS\SpoolSimoNOTE.TXT
     set SimoNOTE=%BaseLib1%\LOGS\SpoolSimoNOTE.TXT
     call SimoNOTE "Starting JobName Env1PROD.CMD"
     set sysout=%BaseLib1%\LOGS\ApplSysOut.TXT
rem  * The following are for the SimoTRAKing
     set StTRAKJR=%BaseLib1%\LOGS\STTRAKJR.TXT
     set StTRAKDX=%BaseLib1%\LOGS\STTRAKDX.DAT
     set StTRAKEX=%BaseLib1%\LOGS\STTRAKEX.CSV
     set StTRAKTX=%BaseLib1%\DataTxt1\STTRAKTX.TXT
rem  *
     set path=C:\Program Files\Micro Focus\Net Express 5.0\Base;C:\Program Files\Micro Focus\Net Express 5.0\Base\bin;%path%
rem  *
     set JobStatus=0000
     call SimoNOTE "Finished JobName Env1PROD.CMD"

A JCL Member for the Mainframe Environment
(Next) (Previous) (Table-of-Contents)

The following (CBSNAPJ1.JCL) is a sample of the JCL needed to run this job with Micro Focus Enterprise Server.

//CBSNAPJ1 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1
//* *******************************************************************
//*                   This program is provided by:                    *
//*                    SimoTime Enterprises, LLC                      *
//*           (C) Copyright 1987-2010 All Rights Reserved             *
//*             Web Site URL:   http://www.simotime.com               *
//*                   e-mail:   helpdesk@simotime.com                 *
//* *******************************************************************
//*
//* Text    - SNAP Dump Routine for the Micro Focus Environment.
//* Author  - SimoTime Enterprises
//* Date    - September 23, 2006
//* Version - 07.01.22
//*
//* This set of programs illustrate the use a callable COBOL program
//* that performs a dump of the COBOL Working Storage Section based
//* on the use of embedded "EYE-CATCHER" fields..
//*
//* This SNAP Dumproutine is for use in a Micro Focus environment.
//*
//* *******************************************************************
//* Step   1 of 2  Test the Snap Dump Routine.
//*
//STEP0010 EXEC PGM=CBSNAPC1
//SYSOUT   DD  SYSOUT=*
//*

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

This program (CBSNAPC1.CBL) was written to test the callable COBOL program (SIMOSNAP.CBL) that does the memory dump of the Working Storage Section.

       IDENTIFICATION DIVISION.
       PROGRAM-ID.    CBSNAPC1.
       AUTHOR.        SIMOTIME ENTERPRISES.
      *****************************************************************
      *
      * SOURCE MODULE CBSNAPC1.CBL
      *
      *****************************************************************
      *
      * CBSNAPC1 - Memory Dump of COBOL's Working Storage.
      *
      *
      * DESCRIPTION
      * -----------
      * This program will display hexadecimal dump information to the
      * console and write the information to a log file. The dump is
      * of the COBOL Working Storage section.
      *
      *****************************************************************
      *
      * MAINTENANCE
      * -----------
      * 1999/03/89 Simmons, Created program.
      * 1999/03/89 Simmons, No changes to date.
      *
      *****************************************************************
      *
       ENVIRONMENT DIVISION.
      *****************************************************************
      *
       DATA DIVISION.
       WORKING-STORAGE SECTION.
       COPY STSNAPB1.
      *****************************************************************
      *    Data-structure for Title and Copyright...
      *    ------------------------------------------------------------
       01  SIM-TITLE.
           05  T1 pic X(11) value '* CBSNAPC1 '.
           05  T2 pic X(34) value 'Sample, Dump of Working Storage   '.
           05  T3 pic X(10) value ' v06.12.12'.
           05  T4 pic X(24) value ' http://www.simotime.com'.
       01  SIM-COPYRIGHT.
           05  C1 pic X(11) value '* CBSNAPC1 '.
           05  C2 pic X(20) value 'Copyright 1987-2010 '.
           05  C3 pic X(28) value '  SimoTime Enterprises, LLC '.
           05  C4 pic X(20) value ' All Rights Reserved'.

       01  SIM-THANKS-01.
           05  C1 pic X(11) value '* CBSNAPC1 '.
           05  C2 pic X(32) value 'Thank you, this technology was p'.
           05  C3 pic X(32) value 'roduced by SimoTime Enterprises,'.
           05  C4 pic X(04) value ' LLC'.

       01  SIM-THANKS-02.
           05  C1 pic X(11) value '* CBSNAPC1 '.
           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 '* CBSNAPC1 '.
           05  MESSAGE-TEXT        pic X(68).

       01  TEST-FIELDS.
           05  PACKED-FIELD        pic S9(5)   comp-3  value 123.
           05  BINARY-FIELD        pic S9(5)   comp    value 123.
           05  SIGNED-ZONED        pic S9(5)   display value 123.

       COPY STSNAPB2.

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

           perform Z-POST-COPYRIGHT

           move 'Use SimoSNAP with explicit coding...' to MESSAGE-TEXT
           perform Z-POST-MESSAGE
           call 'SIMOSNAP' using STSNAP-START STSNAP-CEASE
           move 'Sample User Code...' to MESSAGE-TEXT
           perform Z-POST-MESSAGE

           perform Z-THANK-YOU

           GOBACK.

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

      *****************************************************************
       Z-POST-MESSAGE.
           display MESSAGE-BUFFER
           move SPACES to MESSAGE-TEXT
           exit.

      *****************************************************************
       Z-THANK-YOU.
           display SIM-THANKS-01
           display SIM-THANKS-02
           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 Snap Dump (or Memory Dump) Routine
(Next) (Previous) (Table-of-Contents)

This program (SIMOSNAP.CBL) was originally written to be used as a diagnostic aid for SimoTime consultants and programmers. Today, this program is used by a number of our customers as a diagnostic aid for programming debugging or for tracking the results of program behavior in both a development and production environment. The program has been tested on Windows/XP system with Net Express from Micro Focus.

You may  click here to view the source code  for the callable snap dump routine

The Copy Files to Define the Start/Cease of Working Storage
(Next) (Previous) (Table-of-Contents)

Two copy files are provided to define the "eye-catcher" fields in the COBOL Working Storage Section. The copy statements will create fields that will be used by the SimoSNAP routine to determine the start and stop addresses for the memory dump.

The first copy statement (STSNAPB1.CPY) should be the first statement in the COBOL Working Storage Section. This copy file will create a sixteen (16) byte literal that may be used as an eye-catcher when viewing the memory dump. This literal is used by the SimoSNAP routine to validate the start of the COBOL Working Storage Section.

      *****************************************************************
      *        Copy File for SnapDump Start of Working Storage.       *
      *****************************************************************
      *         Copyright (C) 1987-2010 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       *
      *****************************************************************
       01  STSNAP-START.
           05  FILLER      pic X(16)   value 'STSNAP-START-TAG'.
      *!   STSNAPB1 - End-of-Copy File...

The second copy statement (STSNAPB2.CPY) should be the last statement in the COBOL Working Storage Section. This copy file will create a sixteen (16) byte literal that may be used as an eye-catcher when viewing the memory dump. This literal is used by the SimoSNAP routine to validate the end (or cessation) of the COBOL Working Storage Section.

      *****************************************************************
      *        Copy File for SnapDump End of Working Storage.         *
      *****************************************************************
      *         Copyright (C) 1987-2010 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       *
      *****************************************************************
       01  STSNAP-CEASE.
           05  FILLER      pic X(16)   value 'STSNAP-CEASE-TAG'.
      *!   STSNAPB2 - End-of-Copy File...

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 suite of programs is provided as a COBOL programming example of one of the many possible diagnostic aids for debugging a program or observing the results of program behavior.

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

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

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

You may download this example at  http://www.simotime.com/sim4dzip.htm#COBOLSnapDump  as a Z-Pack. The 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.

Please view the complete list of SimoTime Z-Pack Examples at  http://www.simotime.com/sim4dzip.htm .

Note: You must be attached to the Internet to download a Z-Pack or view the list.

The  hexadecimal dump  of the parameter-buffer uses the same technique as describe in another SimoTime example that describes the dumping of a data string using COBOL. The name of the member that does the actual hexadecimal dump is called SimoDUMP. A copy file (PASSDUMP.CPY) is provided for defining the pass area.

The  SimoZAPS Utility Program  has the capability of generating a COBOL program that will do the conversion of sequential and VSAM (KSDS) files between EBCDIC and ASCII. SimoZAPS can also read a sequential file in EBCDIC format and create an ASCII/CRLF file or VSAM KSDS file in ASCII format. The conversion tables may be viewed or modified to meet unique requirements. The Hexcess/2 function provides the capability of viewing, finding or patching the contents of a file in hexadecimal.

Check out  The COBOL Connection  for more examples of mainframe COBOL coding techniques and sample code.

Check out  The SimoTime Library  for a wide range of topics for Programmers, Project Managers and Software Developers.

To review all the information available on this site start at  The SimoTime Home Page .

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

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

About SimoTime Enterprises
(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-2010  SimoTime Enterprises  All Rights Reserved
When technology complements business
http://www.simotime.com