Abnormal Termination
Example for Micro Focus Environment
  Table of Contents  v-24.01.01 - abtest01.htm 
  Introduction
  Programming Objectives
  Programming Input and Output
  Programming Requirements
  Programming Overview
  A CMD Member for the Windows
  A JCL Member for the Mainframe
  COBOL Test Programs
  Display Call Stack, Mainline Program
  Display Call Stack, First Level Call
  Display Call Stack, Second Level Call
  COBOL, called ABEND Routines
  ILBOABN0, Mainframe ABEND Routine
  ILBOABN0, Alternate ABEND Routines
  Examples of Program Failures
  Divide by Zero, RTS0048
  Memory Error, RTS0114 or S0C4
  Numeric Error, RTS0163 or S0C7
  Called Program not Found, RTS0173
  Micro Focus Compile Directives
  Summary
  Software Agreement and Disclaimer
  Downloads and Links
  Current Server or Internet Access
  Internet Access Required
  Glossary of Terms
  Contact or Feedback
  Company Overview
The SimoTime Home Page 

Table of Contents Previous Section Next Section Introduction

An application program may encounter an unexpected condition and a programmer may want to post a message about the condition and terminate the program execution. This suite of sample programs describes how to call an ABEND (ABnormal ENDing) routine in a Micro Focus environment. Also, This routine will make an attempt to call a second routine to display the call stack starting with the program that called the ABEND (or abnormal termination) routine.

This example provides replacement modules (SIMOABN0 and MFEVENTS) for ILBOABN0 or User Written ABEND routines that are used by applications currently running on a mainframe and are being migrated, moved or ported to run in a Linux, UNIX or Windows (LUW) environment with Micro Focus. A sample program (ABTESTC1.CBL) is provided and describes the details of calling and reviewing the output of the ABEND routine.

This suite of programs includes three (3) sample programs that will cause an abnormal termination at execution time. Refer to the Examples of Actual Program Failures section of this document for additional information.


We have made a significant effort to ensure the documents and software technologies are correct and accurate. We reserve the right to make changes without notice at any time. The function delivered in this version is based upon the enhancement requests from a specific group of users. The intent is to provide changes as the need arises and in a timeframe that is dependent upon the availability of resources.

Copyright © 1987-2025
SimoTime Technologies and Services
All Rights Reserved

Table of Contents Previous Section Next Section Programming Objectives

The primary objective is to provide a programmer with a callable routine that will terminate program execution. The secondary objective is to access the Micro Focus call stack and display the information to a SYSOUT device.

Table of Contents Previous Section Next Section Programming Input and Output

The purpose of the sample programs is to test the ABEND routines. The ABEND routines (SIMOABN0 and MFEVENTS) are called without parameters. If parameters are supplied they are ignored. The following is an example of a COBOL statement that will call the ABEND routine.

CALL 'SIMOABN0'
.

The output of the ABEND 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.

* ABTESTC1 ABEND driver program, CALL Stack   v08.06.05 http://www.simotime.com
* ABTESTC1 Copyright 1987-2017    SimoTime Technologies     All Rights Reserved
* ABSUBRC1 ABEND example, program CALL Stack  v08.06.05 http://www.simotime.com
* ABSUBRC1 Copyright 1987-2017    SimoTime Technologies     All Rights Reserved
* ABSUBRC2 ABEND example, program CALL Stack  v08.06.05 http://www.simotime.com
* ABSUBRC2 Copyright 1987-2017    SimoTime Technologies     All Rights Reserved
* SIMOABN0 ABENDING, display the call stack.  v08.01.24 http://www.simotime.com
* SIMOABN0 Copyright 1987-2017    SimoTime Technologies     All Rights Reserved
* MFEVENTS Display the Micro Focus call stack v10.06.08 http://www.simotime.com
* MFEVENTS Copyright 1987-2017    SimoTime Technologies     All Rights Reserved
* MFEVENTS SIMOABN0
* MFEVENTS ABSUBRC2
* MFEVENTS ABSUBRC1
* MFEVENTS ABTESTC1
* MFEVENTS mfjxe00
* MFEVENTS CASBAT
* MFEVENTS casspool
* MFEVENTS CASBAT
* MFEVENTS DFHECICS
* MFEVENTS mvsSI
* SIMOABN0 Processing is being Terminated...

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

     *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
     *-*-*  Micro Focus ESJCL  ASCII  JES2 Version ED22.00.00_022                              *-*-*
     *-*-*  Copyright (C) 1997-2013 Micro Focus. All rights reserved.                          *-*-*
     *-*-*  Job: 19470 Name: ABTESTJ1 User: mfuser   Date: 12/22/16 Time: 11:46:05             *-*-*
     *-*-*  File: $TXRFDIR/MFUSER11460555.T                                                    *-*-*
     *-*-*  DSN:                                                                               *-*-*
     *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

   1 //ABTESTJ1 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1
   2 //* *******************************************************************
   3 //*       ABTESTJ1.JCL - a JCL Member for Batch Job Processing        *
   4 //*       This JCL Member is provided by SimoTime Technologies        *
   5 //*           (C) Copyright 1987-2017 All Rights Reserved             *
   6 //*             Web Site URL:   http://www.simotime.com               *
   7 //*                   e-mail:   helpdesk@simotime.com                 *
   8 //* *******************************************************************
   9 //*
  10 //* Text    - ABEND Routine for the Micro Focus Environment.
  11 //* Author  - SimoTime Technologies
  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 displays the call stack and issues a STOP RUN to terminate
  17 //* the process.
  18 //*
  19 //* This ABEND routine is for use in a Micro Focus environment.
  20 //*
  21 //* *******************************************************************
  22 //* Step 1 of 1, Test the ABEND Routine.
  23 //*
  24 //STEP0010 EXEC PGM=ABTESTC1
  25 //SYSOUT   DD  SYSOUT=*
  26 //*
**** JCLCM0180I Job ready for execution.
**** Execution on Server SIMOBATA  Process       1864

     11:46:06 JCLCM0188I JOB  STARTED

     11:46:06 JCLCM0190I STEP STARTED   STEP0010
     11:46:06 JCLCM0199I Program ABTESTC1 is COBOL VSC2  ASCII  Big-Endian    NOAMODE.
     MFE2016.S1222.S114605.J19470.D00001.SYSOUT                        SYSOUT
      C:\SIMOSAM1\DEVL\DATA\SPOOL\MFE2*114605.J19470.D00001.SYSOUT.DAT  SPOOLED
---> 11:46:06 JCLCM0191I STEP ENDED     STEP0010 - COND CODE 0016

---> 11:46:06 JCLCM0182I JOB  ENDED   - COND CODE 0016

Table of Contents Previous Section Next Section Programming Requirements

This suite of sample programs were tested and will run on the following platforms. Additional SimoTime modules are used and will be required prior to executing the sample test program.

1 The ABEND 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 configured 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 SIMOABN0.CBL and MFEVENTS.CBL programs that are provided in the SimoMODS package. Refer to the SimoTime web site for more information.
3 This suite of programs may be ported to run on a LINUX or UNIX platforms supported by Micro Focus COBOL.
  Requirements and Prerequisites

Table of Contents Previous Section Next Section Programming Overview

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

               
ABTESTJ1
jcl
ABTESTE1
cmd
Start the ABEND Test
   
   
   
   
   
   
ABTESTC1
cbl
   
   
Main Program for Testing ABEND
   
   
   
ABSUBRC1
cbl
   
   
1st nested call
   
   
   
ABSUBRC2
cbl
   
   
2nd nested call
   
   
   
SIMOABN0
cbl
ABEND routine
   
   
   
MFEVENTS
cbl
Display Call Stack
EOJ
End of Job
 
An Example for Executing a User ABEND Routine

The main program (ABTESTC1) will call the first subroutine (ABSUBRC1) which will call the second subroutine (ABSUBRC2) which will call the ABEND routine (SIMOABN0) which will display the call stack to a SYSOUT device (by calling MFEVENTS.CBL). Since SIMOABN0 issues a STOP RUN the processing will be terminated along with all the programs involved in the calling process. The source code for the CMD file, the JCL member and the COBOL programs is provided and may be modified to fit your environment.

Table of Contents Previous Section Next Section A CMD Member for the Windows

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

@echo OFF
rem  * *******************************************************************
rem  *               ABTESTE1.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    - User ABEND for Micro Focus environment
rem  * Author  - SimoTime Technologies
rem  * Date    - November 11, 2003
rem  * Version - 06.07.16
rem  *
rem  * This set of programs illustrate the use a COBOL program for
rem  * abnormally terminating a program and displaying the call stack.
rem  *
rem  * This procedure uses the SIMONOTE.CMD to display information to the
rem  * screen and write to a log file.
rem  * the parameters to be passed as if they were from JCL.
rem  * The SimoNOTE programs is available from the SimoTime web site
rem  * and is part of the SimoMODS package.
rem  *
rem  * The call to ENV1BASE will set the environment variables. This
rem  * technique is used to define a single place where commonly use
rem  * environment variable may be set and then used by multiple users.
rem  *
rem  * This set of programs will run on a Personal Computer with Windows
rem  * and Micro Focus Net Express or Mainframe Express.
rem  *
rem  * ********************************************************************
rem  * Step   1 of 2  Set the global environment variables...
rem  *
     set CmdName=ABTESTE1
     call ..\ENV1BASE %CmdName%
     if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
rem  *
     call SimoNOTE "*******************************************************%CmdName%"
     call SimoNOTE "Starting CmdName %CmdName%, V08.06.05, User is %USERNAME%"
rem  * ********************************************************************
rem  * Step   2 of 2  Execute the sample program...
rem  *
     run ABTESTC1
     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% "
     set SYSNOTE=%BASEAPP%\LOGS\SYSNOTE_%CmdName%.TXT
     echo %DATE% - %TIME% Starting User ABEND Processing for %CmdName%>>%SYSNOTE%
     set >>%SYSNOTE%
     echo %DATE% - %TIME% Complete User ABEND Processing for %CmdName%>>%SYSNOTE%
     goto :End
:End
     call SimoNOTE "Conclude SysOut is %SYSOUT%"
     if not "%SIMOMODE%" == "BATCH" pause
     exit /B %JobStatus%

Table of Contents Previous Section Next Section A JCL Member for the Mainframe

The following (ABTESTJ1.jcl) is a sample of the JCL needed to run this job with Micro Focus Enterprise Server or Micro Focus Mainframe Express.

//ABTESTJ1 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1
//* *******************************************************************
//*       ABTESTJ1.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    - ABEND 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 displays the call stack and issues a STOP RUN to terminate
//* the process.
//*
//* This ABEND routine is for use in a Micro Focus environment.
//*
//* *******************************************************************
//* Step 1 of 1, Test the ABEND Routine.
//*
//STEP0010 EXEC PGM=ABTESTC1
//SYSOUT   DD  SYSOUT=*
//*

Table of Contents Previous Section Next Section COBOL Test Programs

This section will describe the three programs that are used to test the ABEND routines

Table of Contents Previous Section Next Section Display Call Stack, Mainline Program

The following (ABTESTC1.cbl) is the main program that is executed from JCL or a Windows Command file.

       IDENTIFICATION DIVISION.
       PROGRAM-ID.    ABTESTC1.
       AUTHOR.        SIMOTIME TECHNOLOGIES.
      *****************************************************************
      * SOURCE MODULE ABTESTC1.CBL
      *****************************************************************
      * ABTESTC1 - Displays a message and calls ABSUBRC1.
      *
      * DESCRIPTION
      * -----------
      * This program will display a message and call the first nested
      * program.
      *
      *****************************************************************
      * MAINTENANCE
      * -----------
      * 1999/03/89 SimoTime, Created program.
      * 1999/03/89 SimoTime, No changes to date.
      *
      *****************************************************************
       ENVIRONMENT DIVISION.
      *****************************************************************
       DATA DIVISION.
       WORKING-STORAGE SECTION.
      *****************************************************************
      *    Data-structure for Title and Copyright...
      *    ------------------------------------------------------------
       01  SIM-TITLE.
           05  T1 pic X(11) value '* ABTESTC1 '.
           05  T2 pic X(34) value 'ABEND driver program, CALL Stack  '.
           05  T3 pic X(10) value ' v08.06.05'.
           05  T4 pic X(24) value ' http://www.simotime.com'.
       01  SIM-COPYRIGHT.
           05  C1 pic X(11) value '* ABTESTC1 '.
           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'.

      *****************************************************************
       PROCEDURE DIVISION.
           perform POST-STARTUP-INFO

           call 'ABSUBRC1'

      *    If the SIMOABN0 routine has a STOP RUN then it will
      *    force the runtime to ABEND and will not return to this
      *    point. This program will be cancelled along with the ABEND
      *    routine.

           display '* ABTESTC1 RC=' RETURN-CODE

           GOBACK.

      *****************************************************************
       POST-STARTUP-INFO.
           display SIM-TITLE
           display SIM-COPYRIGHT
           exit.

Table of Contents Previous Section Next Section Display Call Stack, First Level Call

The following (ABSUBRC1.cbl) is called from the mainline program.

       IDENTIFICATION DIVISION.
       PROGRAM-ID.    ABSUBRC1.
       AUTHOR.        SIMOTIME TECHNOLOGIES.
      *****************************************************************
      * SOURCE MODULE ABSUBRC1.CBL
      *****************************************************************
      * ABSUBRC1 - Displays a message and calls ABSUBRC2.
      *
      * DESCRIPTION
      * -----------
      * This program will display a message and call ABSUBRC2. The
      * expected result is that ABSUBRC2 will ABEND and never return.
      *
      *****************************************************************
      * MAINTENANCE
      * -----------
      * 1999/03/89 SimoTime, Created program.
      * 1999/03/89 SimoTime, No changes to date.
      *
      *****************************************************************
       ENVIRONMENT DIVISION.
      *****************************************************************
       DATA DIVISION.
       WORKING-STORAGE SECTION.
      *****************************************************************
      *    Data-structure for Title and Copyright...
      *    ------------------------------------------------------------
       01  SIM-TITLE.
           05  T1 pic X(11) value '* ABSUBRC1 '.
           05  T2 pic X(34) value 'ABEND example, program CALL Stack '.
           05  T3 pic X(10) value ' v08.06.05'.
           05  T4 pic X(24) value ' http://www.simotime.com'.
       01  SIM-COPYRIGHT.
           05  C1 pic X(11) value '* ABSUBRC1 '.
           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'.

      *****************************************************************
       PROCEDURE DIVISION.
           perform POST-STARTUP-INFO

           call 'ABSUBRC2'

      *    If the SIMOABN0 routine has a STOP RUN then it will
      *    force the runtime to ABEND and will not return to this
      *    point. This program will be cancelled along with the ABEND
      *    routine.

           display '* ABSUBRC1 RC=' RETURN-CODE

           GOBACK.

      *****************************************************************
       POST-STARTUP-INFO.
           display SIM-TITLE
           display SIM-COPYRIGHT
           exit.

Table of Contents Previous Section Next Section Display Call Stack, Second Level Call

The following (ABSUBRC2.cbl) is the third level application program in the call stack.

       IDENTIFICATION DIVISION.
       PROGRAM-ID.    ABSUBRC2.
       AUTHOR.        SIMOTIME TECHNOLOGIES.
      *****************************************************************
      * SOURCE MODULE ABSUBRC2.CBL
      *****************************************************************
      * ABSUBRC2 - Displays a message and calls SIMOAB01.
      *
      * DESCRIPTION
      * -----------
      * This program will display a message and call SIMOABN0. The
      * expected result is SIMOABN0 will post a message, call MFEVENTS
      * to display the call stack and issue a STOP RUN to terminate
      * processing.
      *
      *****************************************************************
      * MAINTENANCE
      * -----------
      * 1999/03/89 SimoTime, Created program.
      * 1999/03/89 SimoTime, No changes to date.
      *
      *****************************************************************
       ENVIRONMENT DIVISION.
      *****************************************************************
       DATA DIVISION.
       WORKING-STORAGE SECTION.
      *****************************************************************
      *    Data-structure for Title and Copyright...
      *    ------------------------------------------------------------
       01  SIM-TITLE.
           05  T1 pic X(11) value '* ABSUBRC2 '.
           05  T2 pic X(34) value 'ABEND example, program CALL Stack '.
           05  T3 pic X(10) value ' v08.06.05'.
           05  T4 pic X(24) value ' http://www.simotime.com'.
       01  SIM-COPYRIGHT.
           05  C1 pic X(11) value '* ABSUBRC2 '.
           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'.

      *****************************************************************
       PROCEDURE DIVISION.
           perform POST-STARTUP-INFO

      *    Call the ABEND routine.
      *
           call 'SIMOABN0'

      *    If the SIMOABN0 routine has a STOP RUN that will force
      *    the runtime to terminate processing. It will not return to
      *    this point. This program will be cancelled along with the
      *    ABEND routine.

           display '* ABSUBRC2 RC=' RETURN-CODE

           GOBACK.

      *****************************************************************
       POST-STARTUP-INFO.
           display SIM-TITLE
           display SIM-COPYRIGHT
           exit.

Table of Contents Previous Section Next Section COBOL, called ABEND Routines

This program (MFEVENTS.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.

Table of Contents Previous Section Next Section ILBOABN0, Mainframe ABEND Routine

This is an IBM Mainframe utility program that may be explicitly called from an application program (usually COBOL) when an abnormal termination or unexpected condition is encountered in the program. This program provides mainframe dump information for the general purposes registers and memory area used by the program. With the release of Enterprise COBOL the replacement of ILBOABN0 is recommended. Micro Focus provides a version of ILBOABN0 with Mainframe Express and Enterprise Server.

The SimoABN0 program provided in this example may be renamed to ILBOABN0 (the COBOL source code is included). This replacement program must be compiled using a Micro Focus dialect with the CHARSET(ASCII) directive.

Table of Contents Previous Section Next Section ILBOABN0, Alternate ABEND Routines

You may  click here to view the source code  for a callable ABEND routine (SIMOABN0.CBL) that will simply terminate the job with a return-code equal to 16. It is the user's or programmer's responsibility to display any pertinent information prior to calling this ABEND routine.

You may  click here to view the source code  for the callable ABEND routine (MFEVENTS.CBL) that identifies and displays the call stack for the Micro Focus environment.

Table of Contents Previous Section Next Section Examples of Program Failures

This section contains sample programs that will actually ABEND with a system error message (or Micro Focus Run Time error). The following chart shows a summary of the sample programs.

Program Name Description
AB0048C1 This program will cause a Micro Focus run time error (RTS0048) when attempting to do an arithmetic calculation and a divide by zero.
AB0114C1 This program will cause a Micro Focus run time error (RTS0114) when attempting to do a move in a COBOL program using reference modification with an invalid offset value.
AB0163C1 This program will cause a Micro Focus run time error (RTS163) when attempting to do an arithmetic calculation using non-numeric values in numeric fields. This would cause a S0C7 error on an IBM Mainframe.
AB0173C1 This program will cause a Micro Focus run time error (RTS173) when attempting to call a program that does not exists.
  Examples of Actual Program Failures

Table of Contents Previous Section Next Section Divide by Zero, RTS0048

The following program (AB0048C1.cbl) will cause a program ABEND (or ABnormal ENDing) when attempting to do an arithmetic calculation and a divide by zero. A JCL member (AB0048J1.jcl) is provided for the Mainframe environment and a Windows Command file (AB0048E1.cmd) is provided for the Windows, non-mainframe environment.

       IDENTIFICATION DIVISION.
       PROGRAM-ID.    AB0048C1.
       AUTHOR.        SIMOTIME TECHNOLOGIES.
      *****************************************************************
      * SOURCE MODULE AB0048C1.CBL
      *****************************************************************
      * AB0048C1 - Create an RTS0048 or Divide-by-Zero Error Condition.
      *
      * DESCRIPTION
      * -----------
      * This program will attempt an arithmetic calculation that does
      * a divide by zero.
      *
      *****************************************************************
      * MAINTENANCE
      * -----------
      * 1999/03/89 SimoTime, Created program.
      * 1999/03/89 SimoTime, No changes to date.
      *
      *****************************************************************
       ENVIRONMENT DIVISION.
      *****************************************************************
       DATA DIVISION.
       WORKING-STORAGE SECTION.
      *****************************************************************
      *    Data-structure for Title and Copyright...
      *    ------------------------------------------------------------
       01  SIM-TITLE.
           05  T1 pic X(11) value '* AB0048C1 '.
           05  T2 pic X(34) value 'Attempt divide by zero calculation'.
           05  T3 pic X(10) value ' v08.06.05'.
           05  T4 pic X(24) value ' http://www.simotime.com'.
       01  SIM-COPYRIGHT.
           05  C1 pic X(11) value '* AB0048C1 '.
           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  TEST-GROUP.
           05  TEST-NUMBER     pic 9(5) comp-3.
       01  TEST-RESULT         pic 999.

      *****************************************************************
       PROCEDURE DIVISION.
           perform POST-STARTUP-INFO

           add 123 to ZERO giving TEST-NUMBER
           move ZERO to TEST-RESULT
      *    divide TEST-NUMBER by TEST-RESULT giving TEST-RESULT
           if 1 / 0 = 0 continue end-if

      *    Should never get here...
           display '* AB0048C1 Should never get here...'
           GOBACK.

      *****************************************************************
       POST-STARTUP-INFO.
           display SIM-TITLE
           display SIM-COPYRIGHT
           exit.

Table of Contents Previous Section Next Section Memory Error, RTS0114 or S0C4

This suite of programs will demonstrate and describe how to cause an RTS0114 Error by doing a move in a COBOL program using reference modification with an invalid offset value.

Link to Internet   Link to Server   Explore the Problem Determination Techniques for an RTS0114 Error that use the CORE_ON_ERROR function provided in Micro Focus Enterprise Server.

Table of Contents Previous Section Next Section Numeric Error, RTS0163 or S0C7

The following program (AB0163C1.cbl) will cause a program ABEND (or ABnormal ENDing) when attempting to do an arithmetic calculation using non-numeric values in numeric fields. A JCL member (AB0163J1.jcl) is provided for the Mainframe environment and a Windows Command file (AB0163E1.cmd) is provided for the Windows, non-mainframe environment.

       IDENTIFICATION DIVISION.
       PROGRAM-ID.    AB0163C1.
       AUTHOR.        SIMOTIME TECHNOLOGIES.
      *
      *****************************************************************
      * SOURCE MODULE AB0163C1.CBL
      *****************************************************************
      * AB0163C1 - Create a S0C7 or RTS0163 Error Condition.
      *
      * DESCRIPTION
      * -----------
      * This program will attempts an arithmetic calculation using
      * a field that contains a non-numeric value.
      *
      *****************************************************************
      * MAINTENANCE
      * -----------
      * 1999/03/89 SimoTime, Created program.
      * 1999/03/89 SimoTime, No changes to date.
      *
      *****************************************************************
       ENVIRONMENT DIVISION.
      *
      *****************************************************************
       DATA DIVISION.
       WORKING-STORAGE SECTION.
      *****************************************************************
      *    Data-structure for Title and Copyright...
      *    ------------------------------------------------------------
       01  SIM-TITLE.
           05  T1 pic X(11) value '* AB0163C1 '.
           05  T2 pic X(34) value 'Attempt non-numeric calculation   '.
           05  T3 pic X(10) value ' v08.06.05'.
           05  T4 pic X(24) value ' http://www.simotime.com'.
       01  SIM-COPYRIGHT.
           05  C1 pic X(11) value '* AB0163C1 '.
           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  TEST-GROUP.
           05  TEST-NUMBER     pic 9(5) comp-3.
       01  TEST-RESULT         pic 999.

      *****************************************************************
       PROCEDURE DIVISION.
           perform POST-STARTUP-INFO

           move 'IJK' to TEST-GROUP
           add TEST-NUMBER to TEST-NUMBER giving TEST-RESULT

      *    Should never get here...
           display '* AB0163C1 Should never get here...'
           GOBACK.

      *****************************************************************
       POST-STARTUP-INFO.
           display SIM-TITLE
           display SIM-COPYRIGHT
           exit.

Table of Contents Previous Section Next Section Called Program not Found, RTS0173

The following program (AB0173C1.cbl) will cause a program ABEND (or ABnormal ENDing) when attempting to call a program that does not exists. A JCL member (AB0173J1.jcl) is provided for the Mainframe environment and a Windows Command file (AB0173E1.cmd) is provided for the Windows, non-mainframe environment.

       IDENTIFICATION DIVISION.
       PROGRAM-ID.    AB0173C1.
       AUTHOR.        SIMOTIME TECHNOLOGIES.
      *****************************************************************
      * SOURCE MODULE AB0173C1.CBL
      *****************************************************************
      * AB0173C1 - Create an RTS0173 Error Condition.
      *
      * DESCRIPTION
      * -----------
      * This program will attempt a call to a program that does not
      * exist.
      *
      *****************************************************************
      * MAINTENANCE
      * -----------
      * 1999/03/89 SimoTime, Created program.
      * 1999/03/89 SimoTime, No changes to date.
      *
      *****************************************************************
       ENVIRONMENT DIVISION.
      *****************************************************************
       DATA DIVISION.
       WORKING-STORAGE SECTION.
      *****************************************************************
      *    Data-structure for Title and Copyright...
      *    ------------------------------------------------------------
       01  SIM-TITLE.
           05  T1 pic X(11) value '* AB0173C1 '.
           05  T2 pic X(34) value 'Attempt call, non-existing program'.
           05  T3 pic X(10) value ' v08.06.05'.
           05  T4 pic X(24) value ' http://www.simotime.com'.
       01  SIM-COPYRIGHT.
           05  C1 pic X(11) value '* AB0173C1 '.
           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  PROGRAM-NAME        pic X(8) value is SPACES.

      *****************************************************************
       PROCEDURE DIVISION.
           perform POST-STARTUP-INFO

           move 'NOTTHERE' to PROGRAM-NAME
           call PROGRAM-NAME

      *    Should never get here...
           display '* AB0173C1 Should never get here...'
           GOBACK.

      *****************************************************************
       POST-STARTUP-INFO.
           display SIM-TITLE
           display SIM-COPYRIGHT
           exit.

Table of Contents Previous Section Next Section Micro Focus Compile Directives

The following shows the compiler directives used in the Micro Focus environment.

DIALECT"OS390"
CHARSET"ASCII"
ASSIGN"EXTERNAL"
IDXFORMAT"8"
IBMCOMP
NOTRUNC
HOSTNUMMOVE
HOSTNUMCOMPARE
NOSIGNFIXUP
HOSTARITHMETIC
CHECKNUM
NOOPTIONAL-FILE
NOQUERY
COBIDY
ANIM
outdd"SYSOUT 121 L"
SHARE-OUTDD
DATAMAP
settings
list()
noformWIP

Table of Contents Previous Section Next Section Summary

The purpose of this program is to provide a callable ABEND (or abnormal termination) routine that will display the call stack in a Micro Focus environment. The document may be used to assist as a tutorial for new programmers or as a quick reference for experienced programmers.

In the world of programming there are many ways to solve a problem. This documentation and software were developed and tested on systems that are configured for a SIMOTIME environment based on the hardware, operating systems, user requirements and security requirements. Therefore, adjustments may be needed to execute the jobs and programs when transferred to a system of a different architecture or configuration.

SIMOTIME Services has experience in moving or sharing data or application processing across a variety of systems. For additional information about SIMOTIME Services or Technologies please contact us using the information in the  Contact or Feedback  section of this document.

Table of Contents Previous Section Next Section Software Agreement and Disclaimer

Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Technologies. Once the fee is received by SimoTime the latest version of the software, documentation or training material will be delivered and a license will be granted for use within an enterprise, provided the SimoTime copyright notice appear on all copies of the software. The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Technologies.

SimoTime Technologies makes no warranty or representations about the suitability of the software, documentation or learning material for any purpose. It is provided "AS IS" without any expressed or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement. SimoTime Technologies shall not be liable for any direct, indirect, special or consequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software, documentation or training material.

Table of Contents Previous Section Next Section Downloads and Links

This section includes links to documents with additional information that are beyond the scope and purpose of this document. The first group of documents may be available from a local system or via an internet connection, the second group of documents will require an internet connection.

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

Table of Contents Previous Section Next Section Current Server or Internet Access

The following links may be to the current server or to the Internet.

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

Link to Internet   Link to Server   Explore a job ABEND with GDG's and the Job Restart capabilities that are available in Micro Focus Enterprise Server. Also, this suite of programs includes a description and demonstration of the diagnostic capabilities for the CORE_ON_ERROR function of Micro Focus Enterprise Server.

Link to Internet   Link to Server   Explore the Hexadecimal Dump capabilites using COBOL to dump the content of a data string. This suite of programs includes a sample program that calls the SIMODUMP program to do the actual formatting for the hexadecimal dump information.

Link to Internet   Link to Server   Explore a Test Case for a Snap Dump suite of programs that will describe and demonstrate a method of dumping the working storage section of a COBOL program. This information could be very useful when determining the cause of a user-defined ABEND.

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

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

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

Link to Internet   Link to Server   Explore The File Status Return Codes that are used to interpret the results of accessing VSAM data sets and/or QSAM files.

Table of Contents Previous Section Next Section Internet Access Required

The following links will require an internet connection.

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

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

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

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

Table of Contents Previous Section Next Section Glossary of Terms

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

Table of Contents Previous Section Next Section Contact or Feedback

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

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

 

We appreciate hearing from you.

Table of Contents Previous Section Next Section Company Overview

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

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

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

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


Return-to-Top
Abnormal Termination (ABEND) Example for the Micro Focus Environment
Copyright © 1987-2025
SimoTime Technologies and Services
All Rights Reserved
When technology complements business
http://www.simotime.com