Post Message to SYSOUT SimoTRAK - Track & Time Events |
The SimoTime Home Page |
This document describes the function and usage of the SimoTRAK module. A listing of the COBOL source code for the SimoTRAK routine is included.
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-2024
SimoTime Technologies and Services
All Rights Reserved
The SimoTRAK routine (or callable program) is a callable routine that will post a text string with a date and time stamp to SYSOUT. The purpose is to provide an application programmer with the ability to post a message (i.e. a paragraph name) to a pass area and call a routine that will log the event and calculate the elapsed time since the last call.
The SimoTRAK program provides an easy to use, callable routine for identifying points of interest in a program and tracking the elapsed time between the points.
First, the pass area (or data structure) must be defined in the WORKING-STORAGE section of the program that will call SIMOTRAK. A COBOL copy file is provided for this purpose and the same copy file is used in the LINKAGE section of SIMOTRAK.
COPY PASSTRAK.
Next, the data items in the pass area need to be initialized prior to calling SIMOTRAK.
move 'TRAK' to SIMOTRAK-REQUEST move 'CBTRAKC1' to SIMOTRAK-PROG
Note: On the preceding items the SIMOTRAK-REQUEST field must contain 'TRAK' or the SIMOTRAK program will simply return to caller with a RETURN-CODE value of 16. The SIMOTRAK-PROG field may be an 8-byte text string and is typically the name of the program.
Next, the following shows the lines of code that provide additional, user-defined information and makes the call to SIMOTRAK.
move 'STTRAK01' to SIMOTRAK-ID move 'ENTR - PROCEDURE DIVISION' to SIMOTRAK-TEXT call 'SIMOTRAK' using SIMOTRAK-PASS-AREA
Note: On the preceding items the SIMOTRAK-ID field may be an 8-byte, user-defined text string that identifies this point of interest. The SIMOTRAK-TEXT field may be a 32-byte, user-defined text string.
The SimoTRAK program was created and tested on an intel system with Microsoft Windows/XP and Micro Focus Net Express. This packet uses members that are part of The SimoMODS Series of callable programs. Therefore, the SimoMODS packet should be installed prior to running programs that use SimoTRAK.
Refer to the Download and Links section of this document for links to additional documents that discuss this topic.
The following (SIMOTRAK.cbl) is the COBOL Source Code.
*set ASSIGN(EXTERNAL) NOOPTIONAL-FILE SEQUENTIAL(LINE) IDENTIFICATION DIVISION. PROGRAM-ID. SIMOTRAK. 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 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. * * * * 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 * * 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 Member: SIMOTRAK.CBL ***************************************************************** * * SIMOTRAK - Call SIMOTRAK to write record to the Message file. * * CALLING PROTOCOL * ---------------- * Use standard procedure to EXECUTE, RUN or ANIMATE. * * DESCRIPTION * ----------- * This program will write messages to SYSOUT. * * REQUIREMENTS * ------------ * The OS390 or later is required for Y2K date processing. * ***************************************************************** * * MAINTENANCE * ----------- * 1989/12/18 Simmons, Created program. * 1999/01/18 Simmons, Use full century date (ccyymmdd). * ***************************************************************** * DATA DIVISION. WORKING-STORAGE SECTION. 01 FIRST-TIME pic X value 'Y'. 01 WORK-DATE. 05 WORK-DATE-08 pic X(8). 01 WORK-TIME pic X(8). 01 WORK-TIME-V redefines WORK-TIME. 05 WORK-HH pic 99. 05 WORK-MM pic 99. 05 WORK-SS pic 99. 05 WORK-MS pic 99. 01 WORK-SECS pic 9(5)V9(2). 01 SECONDS-IN-DAY pic 9(5)V9(2) value 86400.00. 01 SYSOUT-START. 05 SYSOUT-START-PROG-NAME pic X(8). 05 filler pic X value ','. 05 SYSOUT-START-PROG-ID pic X(8). 05 filler pic X value ','. 05 SYSOUT-START-DATE-01 pic X(8). 05 filler pic X value ','. 05 SYSOUT-START-TIME-01 pic X(8). 05 filler pic X value ','. 05 SYSOUT-START-SECS-01 pic 9(5)V9(2). 05 filler pic X value ','. 05 filler pic X value ','. 05 filler pic X value ','. 05 SYSOUT-START-TEXT pic X(32). 05 filler pic X value ','. 01 SYSOUT-PRIOR. 05 SYSOUT-PRIOR-PROG-NAME pic X(8). 05 filler pic X value ','. 05 SYSOUT-PRIOR-PROG-ID pic X(8). 05 filler pic X value ','. 05 SYSOUT-PRIOR-DATE-01 pic X(8). 05 filler pic X value ','. 05 SYSOUT-PRIOR-TIME-01 pic X(8). 05 filler pic X value ','. 05 SYSOUT-PRIOR-SECS-01 pic 9(5)V9(2). 01 SYSOUT-ALIVE. 05 SYSOUT-ALIVE-PROG-NAME pic X(8). 05 filler pic X value ','. 05 SYSOUT-ALIVE-PROG-ID pic X(8). 05 filler pic X value ','. 05 SYSOUT-ALIVE-DATE-01 pic X(8). 05 filler pic X value ','. 05 SYSOUT-ALIVE-TIME-01 pic X(8). 05 filler pic X value ','. 05 SYSOUT-ALIVE-SECS-01 pic 9(5)V9(2). 05 filler pic X value ','. 05 SYSOUT-ALIVE-ELAPSED pic 9(5)V9(2). 05 filler pic X value ','. 05 SYSOUT-ALIVE-SUMMARY pic 9(5)V9(2). 05 filler pic X value ','. 05 SYSOUT-ALIVE-TEXT pic X(32). 05 filler pic X value ','. ***************************************************************** LINKAGE SECTION. COPY PASSTRAK. ***************************************************************** PROCEDURE DIVISION using SIMOTRAK-PASS-AREA. if FIRST-TIME = 'Y' perform FIRST-TIME-LOGIC end-if add 8 to ZERO giving SIMOTRAK-STATUS if SIMOTRAK-REQUEST = 'TRAK' perform POST-TO-SYSOUT move ZERO to SIMOTRAK-STATUS else add 16 to ZERO giving SIMOTRAK-STATUS end-if GOBACK. ***************************************************************** FIRST-TIME-LOGIC. move 'ENTR - SIMOTRAK is Starting' to SYSOUT-START-TEXT perform Z-GET-DATE-AND-TIME move 'N' to FIRST-TIME move SIMOTRAK-PROG to SYSOUT-START-PROG-NAME move SIMOTRAK-ID to SYSOUT-START-PROG-ID move WORK-DATE to SYSOUT-START-DATE-01 SYSOUT-PRIOR-DATE-01 move WORK-TIME to SYSOUT-START-TIME-01 SYSOUT-PRIOR-TIME-01 move WORK-SECS to SYSOUT-START-SECS-01 SYSOUT-PRIOR-SECS-01 display SYSOUT-START exit. ***************************************************************** POST-TO-SYSOUT. perform Z-GET-DATE-AND-TIME move SIMOTRAK-PROG to SYSOUT-ALIVE-PROG-NAME move SIMOTRAK-ID to SYSOUT-ALIVE-PROG-ID move SIMOTRAK-TEXT to SYSOUT-ALIVE-TEXT perform CALCULATE-TIMES display SYSOUT-ALIVE exit. ***************************************************************** CALCULATE-TIMES. move WORK-DATE to SYSOUT-ALIVE-DATE-01 move WORK-TIME to SYSOUT-ALIVE-TIME-01 move WORK-SECS to SYSOUT-ALIVE-SECS-01 if SYSOUT-PRIOR-SECS-01 < SYSOUT-ALIVE-SECS-01 or SYSOUT-PRIOR-SECS-01 = SYSOUT-ALIVE-SECS-01 compute SYSOUT-ALIVE-ELAPSED = SYSOUT-ALIVE-SECS-01 - SYSOUT-PRIOR-SECS-01 else compute SYSOUT-ALIVE-ELAPSED = (SECONDS-IN-DAY - SYSOUT-PRIOR-SECS-01) + SYSOUT-ALIVE-SECS-01 end-if if SYSOUT-START-SECS-01 < SYSOUT-ALIVE-SECS-01 or SYSOUT-START-SECS-01 = SYSOUT-ALIVE-SECS-01 compute SYSOUT-ALIVE-SUMMARY = SYSOUT-ALIVE-SECS-01 - SYSOUT-START-SECS-01 else compute SYSOUT-ALIVE-SUMMARY = (SECONDS-IN-DAY - SYSOUT-START-SECS-01) + SYSOUT-ALIVE-SECS-01 end-if move SYSOUT-ALIVE-DATE-01 to SYSOUT-PRIOR-DATE-01 move SYSOUT-ALIVE-TIME-01 to SYSOUT-PRIOR-TIME-01 move SYSOUT-ALIVE-SECS-01 to SYSOUT-PRIOR-SECS-01 exit. ***************************************************************** * The following Z-Routines perform administrative functions * * for this program. * ***************************************************************** Z-GET-DATE-AND-TIME. accept WORK-DATE from DATE YYYYMMDD accept WORK-TIME from TIME move 0 to WORK-SECS if WORK-TIME is NUMERIC compute WORK-SECS = WORK-HH * 3600 + WORK-MM * 60 + WORK-SS + WORK-MS / 100 end-if exit.
The following (PASSTRAK.cpy) is the COBOL Copy File that defines the Pass Area.
***************************************************************** * 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 * ***************************************************************** *
This document describes the function and usage of the SimoTRAK module. This document may be used 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, Comment 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.
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.
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 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 icon.
Explore the COBOL Connection for more examples of COBOL programming techniques and sample code.
Explore a complete list of the SimoTime Callable Routines or Utility Programs. This includes the callable routines and utility programs for the Micro Focus environment.
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.
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.
Explore the Glossary of Terms for a list of terms and definitions used in this suite of documents and white papers.
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.
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 |
Post a Message to SYSOUT |
Copyright © 1987-2024 SimoTime Technologies and Services All Rights Reserved |
When technology complements business |
http://www.simotime.com |