Tracking the Elapsed Time
Identify Items of Interest in a Program
  Table of Contents  v-24.01.01 - cbtrak01.htm 
  Introduction
  Program Objectives
  Program Requirements
  Program Output Posted to SYSOUT
  The JCL Member
  The COBOL Program
  COBOL Copy File for Pass Area
  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

This suite of programs provides an example of how to call the SimoTRAK program that will post the point of interest in a program and the elapsed time between this call, the prior call and the first call.


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 Program Objectives

The following table shows some of the functions or capability provided by this suite of programs.

Item Description
1 Provide a demonstration program that will allow an application programmer to identify a program and track the elapsed time for execution.
2 Provide the application programmer with a method for tracking the elapsed time of execution for a block of code within a COBOL program.
3 Provide the application programmer with a method for tracing execution points of interest within a program.
4 Provide the application programmer with a method for placing a program in a wait-state for a specified amount of time.
  Functions provided for the Application Programmer

Table of Contents Previous Section Next Section Program Requirements

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

1 Executes on Windows/XP, Windows/7 or Windows Server using Micro Focus Server or Micro Focus Studio.
2 May be ported to run on the Linux or UNIX platforms supported by Micro Focus.
3 This suite of programs will make calls to common utility programs and callable routines that a available from SimoTime. Therefore, the SIMOMODS technologies or the SimoTime "Enterprise Application Support and Data Management Technologies" will be required.
  Operating Systems and Supporting Software for Program Execution

Table of Contents Previous Section Next Section Program Output Posted to SYSOUT

The following shows the SYSOUT information that is produced by calling the SIMOTRAK program, Notice the highlighted item. This identifies the TEST-ROUTINE-003 as taking the most time to execute.

CBTRAKC1,STTRAK01,20120207,22303650,8103650,,,ENTR - SIMOTRAK is Starting     ,
CBTRAKC1,STTRAK01,20120207,22303650,8103650,0000000,0000000,ENTR - PROCEDURE DIVISION       ,
CBTRAKC1,STTRAK01,20120207,22303689,8103689,0000039,0000039,ENTR - TEST-ROUTINE-001         ,
CBTRAKC1,STTRAK02,20120207,22303890,8103890,0000201,0000240,EXIT - TEST-ROUTINE-001         ,
CBTRAKC1,STTRAK01,20120207,22303890,8103890,0000000,0000240,ENTR - TEST-ROUTINE-002         ,
CBTRAKC1,STTRAK02,20120207,22304191,8104191,0000301,0000541,EXIT - TEST-ROUTINE-002         ,
CBTRAKC1,STTRAK01,20120207,22304191,8104191,0000000,0000541,ENTR - TEST-ROUTINE-003         ,
CBTRAKC1,STTRAK02,20120207,22304692,8104692,0000501,0001042,EXIT - TEST-ROUTINE-003         ,
CBTRAKC1,STTRAK01,20120207,22304692,8104692,0000000,0001042,ENTR - TEST-ROUTINE-004         ,
CBTRAKC1,STTRAK02,20120207,22304993,8104993,0000301,0001343,EXIT - TEST-ROUTINE-004         ,
CBTRAKC1,STTRAK01,20120207,22304993,8104993,0000000,0001343,ENTR - TEST-ROUTINE-005         ,
CBTRAKC1,STTRAK02,20120207,22305194,8105194,0000201,0001544,EXIT - TEST-ROUTINE-005         ,
CBTRAKC1,STTRAK02,20120207,22305230,8105230,0000036,0001580,EXIT - PROCEDURE DIVISION       ,

Table of Contents Previous Section Next Section The JCL Member

The following (CBTRAKJ1.jcl) is the JCL Member used to execute the demonstration program.

//CBTRAKJ1 JOB SIMOTIME,'MFSYSMOD',CLASS=1,MSGCLASS=0,
//             NOTIFY=CSIP1
//* *******************************************************************
//*       CBTRAKJ1.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   - COBOL calls COBOL to post start, current and elapsed time.
//* Author - SimoTime Technologies
//* Date   - January 01, 1989
//*
//* This set of programs illustrate the use a diagnostic approach
//* that identies points of interest in a program and then calls a
//* program to post the point of interest with the start, current and
//* elapsed times. This information will be posted to SYSOUT.
//*
//* This set of programs will run on a Mainframe with ZOS or on
//* a Windows System with Micro Focus Enterprise Server.
//*
//*   ************
//*   * CBTRAKJ1 *
//*   ********jcl*
//*        *
//*        *
//*   ************
//*   * CBTRAKC1 *
//*   ********cbl*
//*        *   *
//*        *   *       ************     ************
//*        *   *-CALL--* SIMOTRAK *-----*  SYSOUT  *
//*        *           ********cbl*     ************
//*        *
//*   ************
//*   *   EOJ    *
//*   ************
//*
//* *******************************************************************
//* Step 1 of 1, This is a single step job.
//*
//CBTRAKS1 EXEC PGM=CBTRAKC1
//STEPLIB  DD  DSN=SIMOTIME.DEMO.LOADLIB1,DISP=SHR
//SYSOUT   DD  SYSOUT=*
//*

Table of Contents Previous Section Next Section The COBOL Program

The following (CBTRAKC1.cbl) is the COBOL Source Code.

       IDENTIFICATION DIVISION.
       PROGRAM-ID.    CBTRAKC1.
       AUTHOR.        SIMOTIME TECHNOLOGIES.
      *****************************************************************
       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01  SIM-TITLE.
           05  T1 pic X(11) value '* CBTRAKC1 '.
           05  T2 pic X(34) value 'Test for SIMOTRAK callable routine'.
           05  T3 pic X(10) value ' v07.08.26'.
           05  T4 pic X(24) value ' http://www.simotime.com'.

       01  SIM-COPYRIGHT.
           05  C1 pic X(11) value '* CBTRAKC1 '.
           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 '* CBTRAKC1 '.
           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 '* CBTRAKC1 '.
           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'.

      *****************************************************************
      * Message Buffer used by the Z-DISPLAY-MESSAGE-TEXT routine.    *
      *****************************************************************
       01  MESSAGE-BUFFER.
           05  MESSAGE-HEADER      pic X(11)   value '* CBWAITC1 '.
           05  MESSAGE-TEXT.
               10  MESSAGE-TEXT-1  pic X(68)   value SPACES.
               10  MESSAGE-TEXT-2  pic X(188)  value SPACES.


       COPY PAWAITER.
       COPY PASSTRAK.

      *****************************************************************
       PROCEDURE DIVISION.
           move 'TRAK'     to SIMOTRAK-REQUEST
           move 'CBTRAKC1' to SIMOTRAK-PROG
           move 'STTRAK01' to SIMOTRAK-ID
           move 'ENTR - PROCEDURE DIVISION' to SIMOTRAK-TEXT
           call 'SIMOTRAK' using SIMOTRAK-PASS-AREA
           perform Z-POST-COPYRIGHT
           perform TEST-ROUTINE-001
           perform TEST-ROUTINE-002
           perform TEST-ROUTINE-003
           perform TEST-ROUTINE-004
           perform TEST-ROUTINE-005
           perform Z-THANK-YOU.
           move 'STTRAK02' to SIMOTRAK-ID
           move 'EXIT - PROCEDURE DIVISION' to SIMOTRAK-TEXT
           call 'SIMOTRAK' using SIMOTRAK-PASS-AREA
           GOBACK.

      *****************************************************************
       TEST-ROUTINE-001.
           move 'STTRAK01' to SIMOTRAK-ID
           move 'ENTR - TEST-ROUTINE-001' to SIMOTRAK-TEXT
           call 'SIMOTRAK' using SIMOTRAK-PASS-AREA

           add 11 to ZERO giving MFWAITER-LENGTH
           move '00:00:02:00' to MFWAITER-TIME
           call 'MFWAITER' using MFWAITER-PASS-AREA

           move 'STTRAK02' to SIMOTRAK-ID
           move 'EXIT - TEST-ROUTINE-001' to SIMOTRAK-TEXT
           call 'SIMOTRAK' using SIMOTRAK-PASS-AREA
           exit.

      *****************************************************************
       TEST-ROUTINE-002.
           move 'STTRAK01' to SIMOTRAK-ID
           move 'ENTR - TEST-ROUTINE-002' to SIMOTRAK-TEXT
           call 'SIMOTRAK' using SIMOTRAK-PASS-AREA

           add 11 to ZERO giving MFWAITER-LENGTH
           move '00:00:03:00' to MFWAITER-TIME
           call 'MFWAITER' using MFWAITER-PASS-AREA

           move 'STTRAK02' to SIMOTRAK-ID
           move 'EXIT - TEST-ROUTINE-002' to SIMOTRAK-TEXT
           call 'SIMOTRAK' using SIMOTRAK-PASS-AREA
           exit.

      *****************************************************************
       TEST-ROUTINE-003.
           move 'STTRAK01' to SIMOTRAK-ID
           move 'ENTR - TEST-ROUTINE-003' to SIMOTRAK-TEXT
           call 'SIMOTRAK' using SIMOTRAK-PASS-AREA

           add 11 to ZERO giving MFWAITER-LENGTH
           move '00:00:05:00' to MFWAITER-TIME
           call 'MFWAITER' using MFWAITER-PASS-AREA

           move 'STTRAK02' to SIMOTRAK-ID
           move 'EXIT - TEST-ROUTINE-003' to SIMOTRAK-TEXT
           call 'SIMOTRAK' using SIMOTRAK-PASS-AREA
           exit.

      *****************************************************************
       TEST-ROUTINE-004.
           move 'STTRAK01' to SIMOTRAK-ID
           move 'ENTR - TEST-ROUTINE-004' to SIMOTRAK-TEXT
           call 'SIMOTRAK' using SIMOTRAK-PASS-AREA

           add 11 to ZERO giving MFWAITER-LENGTH
           move '00:00:03:00' to MFWAITER-TIME
           call 'MFWAITER' using MFWAITER-PASS-AREA

           move 'STTRAK02' to SIMOTRAK-ID
           move 'EXIT - TEST-ROUTINE-004' to SIMOTRAK-TEXT
           call 'SIMOTRAK' using SIMOTRAK-PASS-AREA
           exit.

      *****************************************************************
       TEST-ROUTINE-005.
           move 'STTRAK01' to SIMOTRAK-ID
           move 'ENTR - TEST-ROUTINE-005' to SIMOTRAK-TEXT
           call 'SIMOTRAK' using SIMOTRAK-PASS-AREA

           add 11 to ZERO giving MFWAITER-LENGTH
           move '00:00:02:00' to MFWAITER-TIME
           call 'MFWAITER' using MFWAITER-PASS-AREA

           move 'STTRAK02' to SIMOTRAK-ID
           move 'EXIT - TEST-ROUTINE-005' to SIMOTRAK-TEXT
           call 'SIMOTRAK' using SIMOTRAK-PASS-AREA
           exit.

      *****************************************************************
      * Display CONSOLE messages...                                   *
      *****************************************************************
       Z-DISPLAY-MESSAGE-TEXT.
           if MESSAGE-TEXT-2 = SPACES
               display MESSAGE-BUFFER(1:79)
           else
               display MESSAGE-BUFFER
           end-if
           move all SPACES to MESSAGE-TEXT
           exit.

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

      *****************************************************************
       Z-THANK-YOU.
           display SIM-THANKS-01 upon console
           display SIM-THANKS-02 upon console
           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       *
      *****************************************************************

Table of Contents Previous Section Next Section COBOL Copy File for Pass Area

The following (PASSTRAK.cpy) is the COBOL Copy File that defines the Pass Area Structure.

      *****************************************************************
      *                PASSTRAK is a COBOL Copy File                  *
      *     Data Structure or Pass Area used for calling SIMOTRAK.    *
      *         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       *
      *****************************************************************
      * SIMOTRAK-REQUEST     Must be 'TRAK'                           *
      * SIMOTRAK-STATUS      This is an indicator as to the success   *
      *                      or failure of the request. A value of    *
      *                      zero (0000) indicates the routine was    *
      *                      successful. A non-zero value indicates   *
      *                      a failure.                               *
      * SIMOTRAK-MESSAGE     Contains the message text.               *
      * SIMOTRAK-ID          An 8-byte, user-defined text string that *
      *                      identifies this point of interest.       *
      * SIMOTRAK-PROG        An 8-byte text string and is typically   *
      *                      the name of the program.                 *
      * SIMOTRAK-TEXT        a 32-byte, user-defined text string.     *
      *****************************************************************
       01  SIMOTRAK-PASS-AREA.
           05  SIMOTRAK-REQUEST    pic X(4).
           05  SIMOTRAK-STATUS     pic 9(4).
           05  SIMOTRAK-MESSAGE.
               10  SIMOTRAK-ID     pic X(8).
               10  SIMOTRAK-PROG   pic X(8).
               10  SIMOTRAK-TEXT   pic X(32).
      *
      ***  PASSTRAK - End-of-Copy File - - - - - - - - - - - PASSTRAK *
      *****************************************************************
      *

Table of Contents Previous Section Next Section Summary

This suite of programs provides an example of how to call the SimoTRAK program that will post the point of interest in a program and the elapsed time between this call, the prior call and the first call. This document may serve 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 the JCL Connection for more examples of JCL functionality with programming techniques and sample code.

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 An Enterprise System Model that describes and demonstrates how Applications that were running on a Mainframe System and non-relational data that was located on the Mainframe System were copied and deployed in a Microsoft Windows environment with Micro Focus Enterprise Server.

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

This suite of programs and documentation is available to download for review and evaluation purposes. Other uses will require a SimoTime Software License. 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.

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
Tracking the Elapsed Time, Identify Items of Interest in a Program
Copyright © 1987-2025
SimoTime Technologies and Services
All Rights Reserved
When technology complements business
http://www.simotime.com