| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JCL or CMD to run sample job |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Main Program to define WORKING-STORAGE |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Dump WORKING-STORAGE to SYSOUT |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
End of Job |
| |
|
|
|
|
|
|
|
|
|
|
An Example for Executing a Program to DUMP the WORKING-STORAGE Section to SYSOUT
|
Color Associations: The light-green boxes are unique to SIMOTIME Technologies using an IBM Mainframe System or Micro Focus Enterprise Developer.
The light-red boxes are unique to the SIMOTIME Technologies using a Linux, UNIX or Windows System and COBOL Technologies such as Micro Focus.
The light-yellow boxes are SIMOTIME Technologies, Third-party Technologies, decision points or program transitions in the processing logic or program generations.
The light-blue boxes identify the input/output data structures such as Documents, Spreadsheets, Data Files, VSAM Data Sets, Partitioned Data Set Members (PDSM's) or Relational Tables.
The light-gray boxes identify a system function or an informational item.
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
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
Requirements & Prerequisites
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, SimoLOGS.GNT and SimoSNAP.GNT.
A CMD Member
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 * CBSNAPE1.CMD - a Windows Command File *
rem * This program is provided by SimoTime Technologies *
rem * (C) Copyright 1987-2019 All Rights Reserved *
rem * Web Site URL: http://www.simotime.com *
rem * e-mail: helpdesk@simotime.com *
rem * *******************************************************************
rem *
rem * Text - SimoSNAP, Sample use of a Callable Memory Dump Routine
rem * Author - SimoTime Technologies
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 * ************ ************ ************
rem * * RUN ******* CBSNAPC1 ******* CONSOLE *
rem * ********utl* ********cbl* * ************
rem * *
rem * *
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.
if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
set CmdName=CbSnapE1
call ..\Env1BASE
rem *
call SimoNOTE "*******************************************************%CmdName%"
call SimoNOTE "Starting CmdName %CmdName%"
rem * ********************************************************************
rem * Step 2 of 2 Execute the sample program...
rem *
run CbSnapC1
if not "%ERRORLEVEL%" == "0" set JobStatus=0010
if not "%JobStatus%" == "0000" goto :EojNOK
:EojAOK
call SimoNOTE "Finished CmdName %CmdName%, Job Status is %JobStatus%"
goto :End
:EojNOK
call SimoNOTE "ABENDING CmdName %CmdName%, Job Status is %JobStatus%"
echo %DATE% - %TIME% Starting User ABEND Processing...>>%SYSLOG%
set >>%SYSLOG%
echo %DATE% - %TIME% Complete User ABEND Processing...>>%SYSLOG%
goto :End
:End
call SimoNOTE "Conclude SysOut is %SYSOUT%"
if not "%1" == "nopause" pause
exit /B %JobStatus%
A JCL Member
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
//* *******************************************************************
//* CBSNAPJ1.JCL - a JCL Member for Batch Job Processing *
//* This JCL Member is provided by SimoTime Technologies *
//* (C) Copyright 1987-2019 All Rights Reserved *
//* Web Site URL: http://www.simotime.com *
//* e-mail: helpdesk@simotime.com *
//* *******************************************************************
//*
//* Text - SNAP Dump Routine for the Micro Focus Environment.
//* Author - SimoTime Technologies
//* 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 Dump routine is for use in a Micro Focus environment.
//*
//* *******************************************************************
//* Step 1 of 1, Test the Snap Dump Routine.
//*
//STEP0010 EXEC PGM=CBSNAPC1
//SYSOUT DD SYSOUT=*
//*
COBOL Demonstration Program
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 TECHNOLOGIES.
*****************************************************************
* Copyright (C) 1987-2019 SimoTime Technologies. *
* *
* 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 *
* Technologies. *
* *
* Permission to use, copy, modify and distribute this software *
* for any commercial purpose requires a fee to be paid to *
* SimoTime Technologies. 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 *
* Technologies. *
* *
* SimoTime Technologies 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 *
* Technologies shall not be liable for any direct, indirect, *
* special or consequential damages resulting from the loss of *
* use, data or projects, whether in an action of contract or *
* tort, arising out of or in connection with the use or *
* performance of this software *
* *
* SimoTime Technologies *
* 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 Technologies, *
* 15 Carnoustie Drive, Novato, CA 94949-5849. *
* *
*****************************************************************
* This program is provided by SimoTime Technologies *
* Our e-mail address is: helpdesk@simotime.com *
* Also, visit our Web Site at http://www.simotime.com *
*****************************************************************
*
*****************************************************************
* 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-2019 '.
05 C3 pic X(28) value ' SimoTime Technologies '.
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 for using this program'.
05 C3 pic X(32) value ' provided from SimoTime Technolo'.
05 C4 pic X(04) value 'gies'.
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 TEXT-STRING pic X(21) value '**-HIDE-AND-SEEK-**'.
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 Technologies *
* Our e-mail address is: helpdesk@simotime.com *
* Also, visit our Web Site at http://www.simotime.com *
*****************************************************************
COBOL Memory Dump Routine
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.
Define Working Storage Boundaries
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.
*****************************************************************
* STSNAPB1 is a COBOL Copy File *
* Copy File for SnapDump Start of Working Storage *
* Copyright (C) 1987-2019 SimoTime Technologies *
* All Rights Reserved *
*****************************************************************
* Provided by SimoTime Technologies *
* Our e-mail address is: helpdesk@simotime.com *
* Also, visit our Web Site at http://www.simotime.com *
*****************************************************************
01 STSNAP-START.
05 FILLER pic X(16) value 'STSNAP-START-TAG'.
*
*** STSNAPB1 - End-of-Copy File - - - - - - - - - - - STSNAPB1 *
*****************************************************************
*
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.
*****************************************************************
* STSNAPB2 is a COBOL Copy File *
* Copy File for SnapDump End of Working Storage *
* Copyright (C) 1987-2019 SimoTime Technologies *
* All Rights Reserved *
*****************************************************************
* Provided by SimoTime Technologies *
* Our e-mail address is: helpdesk@simotime.com *
* Also, visit our Web Site at http://www.simotime.com *
*****************************************************************
01 STSNAP-CEASE.
05 FILLER pic X(16) value 'STSNAP-CEASE-TAG'.
*
*** STSNAPB2 - End-of-Copy File - - - - - - - - - - - STSNAPB2 *
*****************************************************************
*
Summary
This document may be used to assist as a tutorial for new programmers or as a quick reference for experienced programmers. In the world of programming there are many ways to solve a problem. This document and the links to other documents are intended to provide a choice of alternatives.
In the world of programming there are many ways to solve a problem. This documentation and software were developed and tested on systems that are configured for a SIMOTIME environment based on the hardware, operating systems, user requirements and security requirements. Therefore, adjustments may be needed to execute the jobs and programs when transferred to a system of a different architecture or configuration.
SIMOTIME Services has experience in moving or sharing data or application processing across a variety of systems. For additional information about SIMOTIME Services or Technologies please contact us using the information in the Contact or Feedback section of this document.
Software Agreement and Disclaimer
Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Technologies. Once the fee is received by SimoTime the latest version of the software, documentation or training material will be delivered and a license will be granted for use within an enterprise, provided the SimoTime copyright notice appear on all copies of the software. The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Technologies.
SimoTime Technologies makes no warranty or representations about the suitability of the software, documentation or learning material for any purpose. It is provided "AS IS" without any expressed or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement. SimoTime Technologies shall not be liable for any direct, indirect, special or consequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software, documentation or training material.
Downloads and Links
This section includes links to documents with additional information that are beyond the scope and purpose of this document. The first group of documents may be available from a local system or via an internet connection, the second group of documents will require an internet connection.
Note: A SimoTime License is required for the items to be made available on a local system or server.
Current Server or Internet Access
The following links may be to the current server or to the Internet.
Explore the COBOL Connection for more examples of COBOL programming techniques and sample code.
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 that are used to interpret the results of accessing VSAM data sets and/or QSAM files.
Internet Access Required
The following links will require an internet connect.
This suite of programs and documentation is available for download.
Link to an Evaluation zPAK Option that includes the program members, documentation and control files.
A good place to start is
The SimoTime Home Page
for access to white papers, program examples and product information. This link requires an Internet Connection
Explore
The Micro Focus Web Site
for more information about products (including Micro Focus COBOL) and services available from Micro Focus. This link requires an Internet Connection.
Glossary of Terms
Explore the Glossary of Terms for a list of terms and definitions used in this suite of documents and white papers.
Contact or Feedback
This document was created and is maintained by SimoTime Technologies. If you have any questions, suggestions, comments or feedback please use the following contact information.
|
1.
|
Send an e-mail to our helpdesk.
|
|
2.
|
Our telephone numbers are as follows.
|
|
2.1.
|
1 415 763-9430 office-helpdesk
|
|
2.2.
|
1 415 827-7045 mobile
|
We appreciate hearing from you.
Company Overview
SimoTime Technologies was founded in 1987 and is a privately owned company. We specialize in the creation and deployment of business applications using new or existing technologies and services. We have a team of individuals that understand the broad range of technologies being used in today's environments. Our customers include small businesses using Internet technologies to corporations using very large mainframe systems.
Quite often, to reach larger markets or provide a higher level of service to existing customers it requires the newer Internet technologies to work in a complementary manner with existing corporate mainframe systems. We specialize in preparing applications and the associated data that are currently residing on a single platform to be distributed across a variety of platforms.
Preparing the application programs will require the transfer of source members that will be compiled and deployed on the target platform. The data will need to be transferred between the systems and may need to be converted and validated at various stages within the process. SimoTime has the technology, services and experience to assist in the application and data management tasks involved with doing business in a multi-system environment.
Whether you want to use the Internet to expand into new market segments or as a delivery vehicle for existing business functions simply give us a call or check the web site at http://www.simotime.com
Copyright © 1987-2025 SimoTime Technologies and Services All Rights Reserved |
| When technology complements business |
| http://www.simotime.com |
|