| |
|
|
|
|
|
|
|
|
|
|
|
|
Start the process to demonstrate Stub Program |
|
|
|
|
|
|
|
|
|
|
|
|
|
Stub program, write to SYSOUT Device |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if not a call, then EOJ |
|
|
|
|
|
|
Dump user-defined memory location |
|
|
|
|
|
|
|
|
|
|
|
|
|
End-Of-Job |
| |
|
|
|
|
|
|
|
Model or Stub Program for a New COBOL Program
|
Color Associations: The light-green boxes are unique to SIMOTIME Technologies using an IBM Mainframe System or Micro Focus Enterprise Developer.
The light-red boxes are unique to the SIMOTIME Technologies using a Linux, UNIX or Windows System and COBOL Technologies such as Micro Focus.
The light-yellow boxes are SIMOTIME Technologies, Third-party Technologies, decision points or program transitions in the processing logic or program generations.
The light-blue boxes identify the input/output data structures such as Documents, Spreadsheets, Data Files, VSAM Data Sets, Partitioned Data Set Members (PDSM's) or Relational Tables.
The light-gray boxes identify a system function or an informational item.
Execute the Batch Job
This Job has been created to run on a Windows System with Micro Focus Enterprise Server (ES). This Job (or JCL Member) may be submitted for execution to a Micro Focus Enterprise Server Instance (SI) that has been configured with the Mainframe Sub-System Option and has the JES function enabled.
The job may be submitted from within Micro Focus ES Administration (a Browser-based Interface) or from a Windows Command Line using the CASSUB Utility program provided by Micro Focus. The following shows the format for the Micro Focus CASSUB command.
C:\SIMOSAM1\DEVL\JCL> cassub -jmembername -rserverinstancename
The following shows the format for the CASSUB command that we used in a SimoTime System environment.
C:\SIMOSAM1\DEVL\JCL> cassub -j..\STSTUBJ1.JCL -rSIMOBATA
Technical Details
This section provides additional technical details about the modules that are included in the batch job example.
The JCL Member
The following is a JCL member(STSTUBJ1.jcl) used to run the COBOL program.
//STSTUBJ1 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1,USER=SIMOTIME
//* *******************************************************************
//* STSTUBJ1.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 - Execute the COBOL Stub Program
//* Author - SimoTime Technologies
//* Date - January 24, 1996
//*
//* *******************************************************************
//* Step 1 of 1, Execute the program...
//*
//STSTUBS1 EXEC PGM=STSTUBC1,PARM='PARAMETER STRING FROM JCL MEMBER'
//SYSOUT DD SYSOUT=*
//
The COBOL Source Members
This sample job uses the following COBOL source members to build the executable load member that accesses the stub program.
The Sample COBOL Program
This program (STSTUBC1.cbl) is the source member that is used as a COBOL stub or model program for creating a new program or callable sub-routine..
IDENTIFICATION DIVISION.
PROGRAM-ID. STSTUBC1.
*AUTHOR. SIMOTIME TECHNOLOGIES.
*****************************************************************
* Copyright (C) 1987-2018 SimoTime Technologies. *
* *
* All rights reserved. Unpublished, all rights reserved under *
* copyright law and international treaty. Use of a copyright *
* notice is precautionary only and does not imply publication *
* or disclosure. *
* *
* Permission to use, copy, modify and distribute this software *
* for any non-commercial purpose and without fee is hereby *
* granted, provided the SimoTime copyright notice appear on all *
* copies of the software. The SimoTime name or Logo may not be *
* used in any advertising or publicity pertaining to the use *
* of the software without the written permission of SimoTime *
* Technologies. *
* *
* Permission to use, copy, modify and distribute this software *
* for any commercial purpose requires a fee to be paid to *
* SimoTime Technologies. Once the fee is received by SimoTime *
* the latest version of the software will be delivered and a *
* license will be granted for use within an enterprise, *
* provided the SimoTime copyright notice appear on all copies *
* of the software. The SimoTime name or Logo may not be used *
* in any advertising or publicity pertaining to the use of the *
* software without the written permission of SimoTime *
* Technologies. *
* *
* SimoTime Technologies makes no warranty or representations *
* about the suitability of the software for any purpose. It is *
* provided "AS IS" without any expressed or implied warranty, *
* including the implied warranties of merchantability, fitness *
* for a particular purpose and non-infringement. SimoTime *
* Technologies shall not be liable for any direct, indirect, *
* special or consequential damages resulting from the loss of *
* use, data or projects, whether in an action of contract or *
* tort, arising out of or in connection with the use or *
* performance of this software *
* *
* SimoTime Technologies *
* 15 Carnoustie Drive *
* Novato, CA 94949-5849 *
* 415.883.6565 *
* *
* RESTRICTED RIGHTS LEGEND *
* Use, duplication, or disclosure by the Government is subject *
* to restrictions as set forth in subparagraph (c)(1)(ii) of *
* the Rights in Technical Data and Computer Software clause at *
* DFARS 52.227-7013 or subparagraphs (c)(1) and (2) of *
* Commercial Computer Software - Restricted Rights at 48 *
* CFR 52.227-19, as applicable. Contact SimoTime Technologies, *
* 15 Carnoustie Drive, Novato, CA 94949-5849. *
* *
*****************************************************************
* This program is provided by SimoTime Technologies *
* Our e-mail address is: helpdesk@simotime.com *
* Also, visit our Web Site at http://www.simotime.com *
*****************************************************************
*
*****************************************************************
* Source Member: STSTUBC1.CBL
* Copy Files: PASSDUMP.CPY
* Calls to: SIMODUMP
*****************************************************************
*
* STSTUBC1 - A COBOL Stub program.
*
* CALLING PROTOCOL
* ----------------
* Use standard procedure to RUN or ANIMATE.
*
* DESCRIPTION
* -----------
* This program is a stub or starter program when creating a new
* COBOL program or callable sub-routine. It can accept a
* parameter from the PARM= keyword of the EXEC statement in JCL.
* It will call the SIMODUMP program to do a HEX-Dump of a of a
* user-defined data string.
*
* ************
* * STSTUBJ1 *
* ********jcl*
* *
* *
* ************ ************
* * STSTUBC1 *-----* SYSOUT *
* ********cbl* ************
* *
* *
* ************ ************
* * SIMODUMP *-----* SYSOUT *
* ********cbl* ************
*
* This program calls SIMODUMP to write HEX Dump information
* to SYSOUT of a user-defined data string.
*
*****************************************************************
*
* MAINTENANCE
* -----------
* 1989/02/27 Simmons, Created program.
*
*****************************************************************
*
DATA DIVISION.
WORKING-STORAGE SECTION.
*****************************************************************
* Data-structure for Title and Copyright...
* ------------------------------------------------------------
01 SIM-TITLE.
05 T1 pic X(11) value '* STSTUBC1 '.
05 T2 pic X(34) value 'COBOL example of a STUB Program '.
05 T3 pic X(10) value ' v16.06.15'.
05 T4 pic X(24) value ' http://www.simotime.com'.
01 SIM-COPYRIGHT.
05 C1 pic X(11) value '* STSTUBC1 '.
05 C2 pic X(20) value 'Copyright 1987-2018 '.
05 C3 pic X(28) value ' SimoTime Technologies '.
05 C4 pic X(20) value ' All Rights Reserved'.
*****************************************************************
* Message Buffer used by the Z-POST-MESSAGE-TO-SYSOUT routine. *
*****************************************************************
01 MESSAGE-BUFFER.
05 MESSAGE-HEADER pic X(11) value '* STSTUBC1 '.
05 MESSAGE-TEXT pic X(256) value SPACES.
01 MSG-LSB pic 9(3) value 256.
01 DATA-GROUP.
05 FLD-000 pic X(20) value 'EYE-CATCHER-START...'.
05 FLD-001 pic 9(5) comp-3 value 123.
05 FLD-002 pic 9(5) comp value 127.
05 FLD-003 pic 9(5) value 256.
05 FLD-004 pic S9(5) value 256.
05 FLD-005 pic X(20) value 'RYRYRYRYRYRYRYRYRYRY'.
05 FLD-006 pic X(20) value 'IHIHIHIHIHIHIHIHIHIH'.
05 FLD-007 pic X(20) value 'XOXOXOXOXOXOXOXOXOXO'.
05 FLD-008 pic X(20) value 'ABCDEFGHIJKLMNOPQRST'.
05 FLD-009 pic X(20) value 'UVWXYZ0123456789!@#$'.
05 FLD-999 pic X(20) value '...EYE-CATCHER-ENDED'.
01 FMT-FOR-LOCATION.
05 FMT-ADDRESS pic X(16) value 'FORMAT=ADDRESS '.
05 FMT-POSITION pic X(16) value 'FORMAT=POSITION '.
05 FMT-OFFSET pic X(16) value 'FORMAT=OFFSET '.
05 FMT-LIMIT-SZ pic X(16) value 'LIMIT=00256 '.
COPY PASSDUMP.
COPY BFLAGSB1.
*****************************************************************
LINKAGE SECTION.
01 PARM-DATA.
04 PARM-LN PIC 9(3) USAGE BINARY.
04 PARM-ST PIC X(127).
*****************************************************************
PROCEDURE DIVISION USING PARM-DATA.
move 'NNNNNNNN/YYNNNNNN' to BF-GROUP
if BF-T1 = 'Y'
move 'Enter, PROCEDURE DIVISION' to MESSAGE-TEXT
perform Z-POST-MESSAGE-TO-SYSOUT
end-if
perform Z-POST-COPYRIGHT-TO-SYSOUT
if PARM-LN > 0 and < 128
display '* STSTUBC1 PARM=' PARM-ST(1:PARM-LN)
end-if
if BF-T2 = 'Y'
move 'Enter, TAG90, User Defined Trace' to MESSAGE-TEXT
perform Z-POST-MESSAGE-TO-SYSOUT
perform SIMODUMP-CONFIGURE
add length of DATA-GROUP to ZERO giving SIMODUMP-LENGTH
call 'SIMODUMP' using SIMODUMP-PASS-AREA
DATA-GROUP
move 'Leave, TAG90, User Defined Trace' to MESSAGE-TEXT
perform Z-POST-MESSAGE-TO-SYSOUT
end-if
if BF-T1 = 'Y'
move 'Leave, PROCEDURE DIVISION' to MESSAGE-TEXT
perform Z-POST-MESSAGE-TO-SYSOUT
end-if
GOBACK.
*****************************************************************
SIMODUMP-CONFIGURE.
move 'USER' to SIMODUMP-REQUEST
move 'STUBTEST' to SIMODUMP-DUMP-ID
move 'OUT1' to SIMODUMP-OUTPUT
move 'KEEP' to SIMODUMP-COPYRIGHT
call 'SIMODUMP' using SIMODUMP-PASS-AREA
FMT-ADDRESS
call 'SIMODUMP' using SIMODUMP-PASS-AREA
FMT-LIMIT-SZ
move 'DUMP' to SIMODUMP-REQUEST
exit.
*****************************************************************
Z-POST-COPYRIGHT-TO-SYSOUT.
move SIM-TITLE(12:68) to MESSAGE-TEXT
perform Z-POST-MESSAGE-TO-SYSOUT
move SIM-COPYRIGHT(12:68) to MESSAGE-TEXT
perform Z-POST-MESSAGE-TO-SYSOUT
exit.
*****************************************************************
Z-POST-MESSAGE-TO-SYSOUT.
perform Z-CALCULATE-MSG-LENGTH
display MESSAGE-BUFFER(1:MSG-LSB)
move all SPACES to MESSAGE-TEXT
exit.
*****************************************************************
Z-CALCULATE-MSG-LENGTH.
add 267 to ZERO giving MSG-LSB
if MESSAGE-BUFFER(122:146) = SPACES
subtract 146 from MSG-LSB
if MESSAGE-BUFFER(80:41) = SPACES
subtract 41 from MSG-LSB
end-if
end-if
exit.
Copy File for PASSDUMP
This source member (PASSDUMP.cpy) is the COBOL copy file that defines the data structure (or Pass Area) that is used when calling the SIMODUMP program.
*****************************************************************
* PASSDUMP is a COBOL Copy File *
* Data Structure or Pass Area used for calling SIMODUMP. *
* 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 *
*****************************************************************
* Values for SIMODUMP-REQUEST *
* DUMP Dump the Buffer in Hexadecimal format *
* NOTE Display or Write the text to the screen or log file *
* *
* Values for SIMODUMP-SYSOUT *
* OPR1 Display dump information on operator console *
* OPR2 Display to operator console and write to log file *
* OUT1 Display dump information to SYSOUT device *
* OUT2 Display to SYSOUT device and write to log file *
* LOG1 Write dump information to the log file (SYSLOG) *
* NONE Do not output to screen or file, put dump info in *
* pass area table and return to caller. *
* *
* Values for SIMODUMP-COPYRIGHT *
* HIDE Do not display the copyright information. Any other *
* entry will display the copyright information. *
*****************************************************************
01 SIMODUMP-PASS-AREA.
* Initial information is provided by the calling program,
* The SIMODUMP-REQUEST field will be modified to "DUMP" if it
* does not contain a valid entry.
* The SIMODUMP-RESULT field may also be modified by the
* SimoDUMP routine.
05 SIMODUMP-REQUEST PIC X(4).
05 SIMODUMP-RESULT PIC 9999.
* The following are not modified by the SimoDUMP routine...
05 SIMODUMP-DUMP-ID PIC X(8).
05 SIMODUMP-OUTPUT PIC X(4).
05 SIMODUMP-COPYRIGHT PIC X(4).
* The following are modified by the SimoDUMP routine...
05 SIMODUMP-IDX PIC 99.
05 SIMODUMP-LINES PIC X(80) OCCURS 8 TIMES.
* The following are not modified by the SimoDUMP routine...
05 SIMODUMP-LENGTH PIC 9(4).
01 SIMODUMP-BUFFER PIC X(128).
*
*** PASSDUMP - End-of-Copy File - - - - - - - - - - - PASSDUMP *
*****************************************************************
*
Copy File for BFLAGSB1
This source member (BFLAGSB1.cpy) is the COBOL copy file that defines the data structure for the Behavior and Trace flags.
*****************************************************************
* BFLAGSB1.cpy - a COBOL Copy Member *
* Program Behavior Flags used by the Demo programs. *
* Copyright (C) 1987-2019 SimoTime Technologies *
* All Rights Reserved *
* Provided by SimoTime Technologies *
* Our e-mail address is: helpdesk@simotime.com *
* Also, visit our Web Site at http://www.simotime.com *
*****************************************************************
*
01 BF-GROUP.
05 BF-FLAGS.
10 BF-01 PIC X.
10 BF-02 PIC X.
10 BF-03 PIC X.
10 BF-04 PIC X.
10 BF-05 PIC X.
10 BF-06 PIC X.
10 BF-07 PIC X.
10 BF-08 PIC X.
05 BF-SLASH PIC X.
05 BF-TRACE.
10 BF-T1 PIC X.
10 BF-T2 PIC X.
10 BF-T3 PIC X.
10 BF-T4 PIC X.
10 BF-T5 PIC X.
10 BF-T6 PIC X.
10 BF-T7 PIC X.
10 BF-T8 PIC X.
*
*** BFLAGSB1 - End-of-Copy File - - - - - - - - - - - BFLAGSB1 *
*****************************************************************
*
Summary
This program is a stub or starter program when creating a new COBOL program or callable sub-routine. This document may be used to assist as a tutorial for new assembler programmers or as a quick reference for experienced programmers. The samples focus on the coding techniques of the individual instructions. As always, it is the programmer's responsibility to thoroughly test all programs.
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.
Software Agreement and Disclaimer
Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Technologies. Once the fee is received by SimoTime the latest version of the software, documentation or training material will be delivered and a license will be granted for use within an enterprise, provided the SimoTime copyright notice appear on all copies of the software. The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Technologies.
SimoTime Technologies makes no warranty or representations about the suitability of the software, documentation or learning material for any purpose. It is provided "AS IS" without any expressed or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement. SimoTime Technologies shall not be liable for any direct, indirect, special or consequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software, documentation or training material.
Downloads and Links
This section includes links to documents with additional information that are beyond the scope and purpose of this document. The first group of documents may be available from a local system or via an internet connection, the second group of documents will require an internet connection.
Note: A SimoTime License is required for the items to be made available on a local system or server.
Current Server or Internet Access
The following links may be to the current server or to the Internet.
Explore the COBOL Connection for more examples of COBOL programming techniques and sample code.
Explore The ASCII and EBCDIC Translation Tables. These tables are provided for individuals that need to better understand the bit structures and differences of the encoding formats.
Explore The File Status Return Codes that are used to interpret the results of accessing VSAM data sets and/or QSAM files.
Internet Access Required
The following links will require an internet connect.
A good place to start is
The SimoTime Home Page
for access to white papers, program examples and product information. This link requires an Internet Connection
Explore
The Micro Focus Web Site
for more information about products (including Micro Focus COBOL) and services available from Micro Focus. This link requires an Internet Connection.
Glossary of Terms
Explore the Glossary of Terms for a list of terms and definitions used in this suite of documents and white papers.
Comments or Feedback
This document was created and is maintained by SimoTime Technologies. If you have any questions, suggestions, comments or feedback please use the following contact information.
|
1.
|
Send an e-mail to our helpdesk.
|
|
2.
|
Our telephone numbers are as follows.
|
|
2.1.
|
1 415 763-9430 office-helpdesk
|
|
2.2.
|
1 415 827-7045 mobile
|
We appreciate hearing from you.
Company Overview
SimoTime Technologies was founded in 1987 and is a privately owned company. We specialize in the creation and deployment of business applications using new or existing technologies and services. We have a team of individuals that understand the broad range of technologies being used in today's environments. Our customers include small businesses using Internet technologies to corporations using very large mainframe systems.
Quite often, to reach larger markets or provide a higher level of service to existing customers it requires the newer Internet technologies to work in a complementary manner with existing corporate mainframe systems. We specialize in preparing applications and the associated data that are currently residing on a single platform to be distributed across a variety of platforms.
Preparing the application programs will require the transfer of source members that will be compiled and deployed on the target platform. The data will need to be transferred between the systems and may need to be converted and validated at various stages within the process. SimoTime has the technology, services and experience to assist in the application and data management tasks involved with doing business in a multi-system environment.
Whether you want to use the Internet to expand into new market segments or as a delivery vehicle for existing business functions simply give us a call or check the web site at http://www.simotime.com
Copyright © 1987-2025 SimoTime Technologies and Services All Rights Reserved |
| When technology complements business |
| http://www.simotime.com |
|