SimoAB01
When technology complements business   The COBOL Source Code
Copyright © 1987-2008  SimoTime Enterprises, LLC  All Rights Reserved http://www.simotime.com

 
Introduction  Version 06.06.22
 
  What It Does
  How to Use
  The COBOL Source Code
  Summary
 
  Software Agreement and Disclaimer
  Downloads and Links to Similar Pages
  Glossary of Terms
  Comments or Suggestions
  About SimoTime

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

This document provides a listing of the COBOL source code for the callable routine SimoAB01. Additional information about this program may be obtained by sending an e-mail to: helpdesk@simotime.com

SimoAB01, What It Does
(Next) (Previous) (Table-of-Contents)

The SimoAB01 routine (or callable program) is for use in a Micro Focus environment. The routine will display the call stack and issue a STOP RUN to terminiate processing.

*******************************************************AbTestE1
Starting JobName AbTestE1
Micro Focus Net Express V5.001.0099
RUN TIME ENVIRONMENT Copyright (C) 1984-2006 Micro Focus (IP) Limited.
URN AXCGG/AA0/00000
* SIMOAB01 ABENDING, display the call stack.  v07.01.24 http://www.simotime.com
* SIMOAB01 Copyright 1987-2007   SimoTime Enterprises, LLC  All Rights Reserved
* SIMOAB01 Routine called by ABSUBRC2
* SIMOAB01 Routine called by ABSUBRC1
* SIMOAB01 Routine called by AbTestC1
Finished JobName AbTestE1, Job Status is 0000
Conclude SysLog is c:\SimoSAM1\LOGS\SpoolSimoNOTE.TXT
Press any key to continue . . .

SimoAB01, How To Use
(Next) (Previous) (Table-of-Contents)

The following will call the ABEND routine. Parameters are not required.

           CALL 'SIMOAB01'

The COBOL Source Code
(Next) (Previous) (Table-of-Contents)

The following is the COBOL Source Code.

      *set assign(external) nooptional-file
       IDENTIFICATION DIVISION.
       PROGRAM-ID.    SIMOAB01.
       AUTHOR.        SIMOTIME ENTERPRISES.
      *****************************************************************
      * Copyright (C) 1987-2008 SimoTime Enterprises, LLC.            *
      *                                                               *
      * 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 commercial purpose requires a fee to be paid to       *
      * SimoTime Enterprises. Once the fee is received by SimoTime    *
      * the latest version of the software will be delivered and a    *
      * license will be granted for use within an enterprise,         *
      * provided the SimoTime copyright notice appear on all copies   *
      * of the software. The SimoTime name or Logo may not be used    *
      * in any advertising or publicity pertaining to the use of the  *
      * software without the written permission of SimoTime           *
      * Enterprises.                                                  *
      *                                                               *
      * Permission to use, copy and modify this software for any      *
      * non-commercial purpose and without fee is hereby granted,     *
      * provided the SimoTime copyright notice appear on all copies   *
      * of the software. The SimoTime name or Logo may not be used    *
      * in any advertising or publicity pertaining to the use of the  *
      * software without the written permission of SimoTime           *
      * Enterprises.                                                  *
      *                                                               *
      * SimoTime Enterprises makes no warranty or representations     *
      * about the suitability of the software 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                                  *
      *                                                               *
      * SimoTime Enterprises                                          *
      * 15 Carnoustie Drive                                           *
      * Novato, CA 94949-5849                                         *
      * 415.883.6565                                                  *
      *                                                               *
      * RESTRICTED RIGHTS LEGEND                                      *
      * Use, duplication, or disclosure by the Government is subject  *
      * to restrictions as set forth in subparagraph (c)(1)(ii) of    *
      * the Rights in Technical Data and Computer Software clause at  *
      * DFARS 52.227-7013 or subparagraphs (c)(1) and (2) of          *
      * Commercial  Computer Software - Restricted Rights  at 48      *
      * CFR 52.227-19, as applicable.  Contact SimoTime Enterprises,  *
      * 15 Carnoustie Drive, Novato, CA 94949-5849.                   *
      *                                                               *
      *****************************************************************
      *      This program is provided by SimoTime Enterprises         *
      *        Our e-mail address is: helpdesk@simotime.com           *
      *     Also, visit our Web Site at http://www.simotime.com       *
      *                                                               *
      *****************************************************************
      * SOURCE MODULE SIMOAB01.CBL
      *****************************************************************
      *
      * SIMOAB01 - Displays a message and does a STOP RUN.
      *
      * DESCRIPTION
      * -----------
      * This program will display a message and force an ABEND with
      * a GOBACK or STOP RUN. The RETURN-CODE will be set to 16.
      *
      * This program is for use in a Micro Focus environment.
      *
      ****************************************************************
      *
      * MAINTENANCE
      * -----------
      * 1989/02/27 SimoTime, Created program.
      * 1989/02/27 SimoTime, no changes to date
      *
      *****************************************************************
      *
       DATA DIVISION.
       WORKING-STORAGE SECTION.
      *
      *****************************************************************
      *    Data-structure for Title and Copyright...
      *    ------------------------------------------------------------
       01  SIM-TITLE.
           05  T1 pic X(11) value '* SIMOAB01 '.
           05  T2 pic X(34) value 'ABENDING, display the call stack. '.
           05  T3 pic X(10) value ' v08.01.24'.
           05  T4 pic X(24) value ' http://www.simotime.com'.
       01  SIM-COPYRIGHT.
           05  C1 pic X(11) value '* SIMOAB01 '.
           05  C2 pic X(20) value 'Copyright 1987-2008 '.
           05  C3 pic X(28) value '  SimoTime Enterprises, LLC '.
           05  C4 pic X(20) value ' All Rights Reserved'.

       01  SYSLOG-LOG-STATUS.
           05  SYSLOG-LOG-STAT1    pic X.
           05  SYSLOG-LOG-STAT2    pic X.

       01  FIRST-TIME              pic X       value 'Y'.

       01  MESSAGE-BUFFER.
           05  MESSAGE-HEADER      pic X(11)   value '* SIMOAB01 '.
           05  MESSAGE-TEXT.
               10  MESSAGE-TEXT-01 pic X(68)   value SPACES.
               10  MESSAGE-TEXT-02 pic X(177)  value SPACES.

       01  MSG-CALLING-NAME-STMT.
           05  FILLER              pic X(2)  value '* '.
           05  MSG-PREVIOUS-NAME   pic X(8)  value 'SIMOAB01'.
           05  FILLER              pic X(08) value ' program'.
           05  FILLER              pic X(11) value ' called by '.
           05  MSG-CALLING-NAME    pic X(8).

       01  LOOP-LIMIT              pic 9(3)  value 50.
       01  LOOP-COUNT              pic 9(3)  value 0.

       01  GPI-GROUP.
           05  GPI-FUNCTION        pic x(4) comp-5.
           05  GPI-PARAM-BLOCK.
               10  GPI-SIZE        pic x(4) comp-5 value 20.
               10  GPI-FLAGS       pic x(4) comp-5 value 1.
               10  GPI-HANDLE      usage pointer.
               10  GPI-PROG-ID     usage pointer.
               10  GPI-ATTRS       pic x(4) comp-5.
           05  GPI-NAME-BUF        pic x(128).
           05  GPI-NAME-LEN        pic x(4) comp-5 value 128.
           05  GPI-STATUS-CODE     PIC x(2) comp-5.
      *
      *    0    Success.
      *    500  End of information (returned by function 2 when there
      *         is no caller of the currently associated program, or
      *         by function 5 when no more entry points exist).
      *    1001 Invalid GPI-HANDLE input.
      *    1009 Invalid parameter.
      *    1013 Buffer too small for information to be returned

      *****************************************************************
       PROCEDURE DIVISION.
      *    The following will cause the ANIMATOR to be started. By
      *    using the View, Debug Windows and Call Stack you can see
      *    the call progression that got you here.
      *
      *    call 'CBL_DEBUGBREAK'

           move SIM-TITLE to MESSAGE-BUFFER
           perform Z-DISPLAY-CONSOLE-MESSAGE
           move SIM-COPYRIGHT to MESSAGE-BUFFER
           perform Z-DISPLAY-CONSOLE-MESSAGE

      *    To chase the call stack...
           perform CHASE-CALL-STACK

           add 16 to ZERO giving RETURN-CODE

      *    The STOP RUN will force an immediate ABEND, a GOBACK will
      *    return to the calling program.
      *    GOBACK
           STOP RUN
           .

      *****************************************************************
       CHASE-CALL-STACK.
      *    Get handle for current program...
           move 0 to GPI-FUNCTION
           move 1 to GPI-FLAGS
           move SPACES to GPI-NAME-BUF
           move 128 to GPI-NAME-LEN
           call 'CBL_GET_PROGRAM_INFO' using
                                       by value      GPI-FUNCTION
                                       by reference  GPI-PARAM-BLOCK
                                       by reference  GPI-NAME-BUF
                                       by reference  GPI-NAME-LEN
                                       returning     GPI-STATUS-CODE
      *    Prepare to chase call stack...
           move 2 to GPI-FUNCTION
           move 3 to GPI-FLAGS
      *    Chase the CALL stack...
           perform varying LOOP-COUNT from 1 by 1
             until LOOP-COUNT > LOOP-LIMIT
             or    GPI-STATUS-CODE not = 0
             move SPACES to GPI-NAME-BUF
             move 128 to GPI-NAME-LEN
             call 'CBL_GET_PROGRAM_INFO'
                   using
                   by value      GPI-FUNCTION
                   by reference  GPI-PARAM-BLOCK
                   by reference  GPI-NAME-BUF
                   by reference  GPI-NAME-LEN
                   returning     GPI-STATUS-CODE
             if  GPI-STATUS-CODE = 0
                 move GPI-NAME-BUF to MESSAGE-TEXT
                 perform Z-DISPLAY-CONSOLE-MESSAGE
             end-if
           end-perform
           exit.

      *****************************************************************
      * Display a message generated by this program.                  *
      *****************************************************************
       Z-DISPLAY-CONSOLE-MESSAGE.
           if MESSAGE-TEXT-02 = SPACES
              display MESSAGE-BUFFER(1:79)
           else
              display MESSAGE-BUFFER
           end-if
           move SPACES to MESSAGE-TEXT
           exit.

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

The purpose of this document is to provide a COBOL Source member for viewing.

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

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

Permission to use, copy, modify and distribute this software for a non-commercial purpose and without fee is hereby granted, provided the SimoTime copyright notice appear on all copies of the software. The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Enterprises.

SimoTime Enterprises makes no warranty or representations about the suitability of the software 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.

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

You may view an example of a COBOL program that uses SimoBITS at http://www.simotime.com/abtest01.htm.

You may view the complete list of SimoTime callable Modules or Driver Programs at http://www.simotime.com/simomods.htm.

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.

This item will provide a link to  an ASCII or EBCDIC translation table. A column for decimal, hexadecimal and binary is also included.

This document provides a quick summary of the  File Status Key  for VSAM data sets and QSAM files.

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 .

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

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

Comments 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

We appreciate your comments and feedback.

About SimoTime Enterprises, LLC
(Next) (Previous) (Table-of-Contents)

Founded in 1987, SimoTime Enterprises is a privately owned, Limited Liability Corporation located in Novato, California. 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-2008  SimoTime Enterprises, LLC  All Rights Reserved
When technology complements business
http://www.simotime.com