Generate, Transfer & Compile Regression Test, Summary Totals |
The SimoTime Home Page |
This Job Script will generate, transfer and compile the COBOL source code for a suite of programs that will accumulate summary totals with a record count. The generated programs will access non-relational data structures that include Traditional Files or VSAM Data Sets.
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
The following shows the sequencing of events and processing tasks that are used to generate, transfer and compile a suite of programs that will accumulate summary totals with a record count.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Objective: This Job Script will generate the COBOL source code for a suite of programs that Accumulate Summary Totals. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Job Step 01: Function 01 will execute a job script that will generate the programs. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Job Step 02: Function 02 will execute a job script that will copy the generated programs to the COBOLUT1 library. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Job Step 03: Function 03 will execute a job script that will compile the generated programs. |
Generate, Transfer and Compile the Summary Totals Programs |
The following describes the Job Scripts and Programs that are used to generate, transfer and compile a suite of programs that will accumulate summary totals with a record count.
1. | Execute the Primary Job Script, RTW005W8 |
1.1. | Prepare the System Environment |
1.2. | Prepare the Job Environment for the Generation and Compile of the Summary Totals Programs |
2. | Function 01, Program Generation process |
2.1. | Call RTGENTOT, a secondary Job Script |
2.1.1. | Run the UTCOMPPE Utility program |
3. | Function 02, Transfer (or promote) the programs to the COBOLUT1 Library. |
3.1. | Define the physical location (or library path) of the Source and Target Members. |
3.1.1. | set SLIB1=%BASELIB1%\SIMOGENS\COGITATE\GENS |
3.1.2. | set TLIB1=%BASELIB1%\COBOLUT1 |
3.2. | Call RTCBLUT1, a secondary Job Script |
3.2.1. | Run the Windows COPY Command |
4. | Function 03, Compile the generated programs |
4.1. | Define the physical location (or library path) of the Source and Target Members. |
4.1.1. | set SLIB1=%BASELIB1%\COBOLUT1 |
4.1.2. | set TLIB1=%BASELIB1%\HOLD\UT1A |
4.2. | Call RTCBLGNT, a secondary Job Script |
4.2.1. | Run the Micro Focus COBOL Compiler |
5. | End of Job Processing |
The following provides an in-depth look at the Job Scripts used to generate, transfer and compile the programs that are used to accumulate summary totals.
,The following (RTW005W8.cmd) is the primary Job Script that is used for regression testing.
@echo OFF set RtwName=RTW005W8 rem * ******************************************************************* rem * RTW005W8.cmd - a Windows Command File * rem * This Job Script 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 - Generate, Compile and Deploy the Summary Totals programs. rem * Author - SimoTime Technologies rem * Date - January 24, 1996 rem * rem * ************ rem * * RTW005W8 * rem * ********cmd* rem * * rem * ************ ************ rem * * call *-----* ENV1BASE * * Prepare the System Environment rem * ************ ********cmd* rem * * rem * ************ ************ rem * * call *-----* USERCOGI * * Prepare the Job Step Environment rem * ************ ********cmd* rem * * rem * ************ rem * * FOR_LOOP *----------* * Function 01 rem * ************ * rem * * ************ rem * * * RTGENTOT * * Generate the Totals Programs rem * * ********cmd* rem * * * rem * * ************ rem * * * UTCOMPPE * * SimoTime Utility program rem * * ********utl* rem * * rem * ************ rem * * FOR_LOOP *----------* * Function 02 rem * ************ * rem * * ************ rem * * * RTCBLUT1 * * Copy Programs to COBOLUT1 library rem * * ********cmd* rem * * * rem * * ************ rem * * * COPY * * Windows COPY Command rem * * ********utl* rem * * rem * ************ rem * * FOR_LOOP *----------* * Function 03 rem * ************ * rem * * ************ rem * * * RTCBLGNT * * Compile the programs rem * * ********cmd* rem * * * rem * * ************ rem * * * COBOL * * Micro Focus COBOL Compiler rem * * ********utl* rem * * rem * ************ rem * * EOJ * * End of Job Processing rem * ************ rem * rem * rem * The technical objective for this Job Script is to generate, rem * transfer and compile the COBOL source code for a suite of programs rem * that will be used to accumulate summary totals. rem * rem * 1. Function 01 will execute a job script that will generate rem * the programs. rem * 2. Function 02 will execute a job script that will copy the rem * generated programs to the COBOLUT1 library. rem * 3. Function 03 will execute a job script that will compile rem * the generated programs. rem * rem * ******************************************************************* rem * rem * Prepare the System Environment. call ..\ENV1BASE %RtwName% set SYSOUT_RESTORE=%SYSOUT% set JobStatus=0000 if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG set SIMOMODE=BATCH set SIMOGENS=BATCH set AOK_Count=0 set NOK_Count=0 rem * call SIMONOTE "*********************************************************************%RtwName%" call SIMONOTE "* This Job Script will generate, compile and deploy the COBOL" call SIMONOTE "* programs that will do the Accumulation of Summary Totals." rem * call SIMONOTE "* ----------------------------------------------------------------- *" call SIMONOTE "* Function 01 , Generate the Summary Totals programs -------------- *GENERATE" rem * Prepare the Job Step Environment. set STEPLIB1=%BASELIB1%\SIMOGENS\COGITATE call %STEPLIB1%\USERCOGI set PGMFLAGS=NNNNNNNN/NNNNNNNN set AOK_GEN_Count=0 set NOK_GEN_Count=0 set SIMODROP=Y set GENILIBR=%STEPLIB1%\INCLUDES call SIMONOTE "* GENILIBR is %GENILIBR%" for /F "eol=; tokens=1,2* delims=." %%i in (%STEPLIB1%\SIMOTIME.LISTALL.PCF4TOTS.lst) do CALL RTGENTOT %%i call SIMONOTE "* AOK_GEN_Count is %AOK_GEN_Count% " call SIMONOTE "* NOK_GEN_Count is %NOK_GEN_Count% " if "%AOK_GEN_Count%" == "0" set /A NOK_Count=%NOK_Count% + 1 if "%AOK_GEN_Count%" == "0" goto Eoj if %NOK_GEN_Count% GTR 0 set /A NOK_Count=%NOK_Count% + 1 if %NOK_GEN_Count% GTR 0 goto Eoj set /A AOK_Count=%AOK_Count% + 1 call SIMONOTE "* AOK Job Count for AOK is %AOK_Count% " call SIMONOTE "* NOK Job Count for NOK is %NOK_Count% " rem * call SIMONOTE "* ----------------------------------------------------------------- *" call SIMONOTE "* Function 02, Transfer Generated Code to COBOLUT1 ---------------- *XFER2UT1" set AOK_XFR_Count=0 set NOK_XFR_Count=0 rem * rem * The following set statements will map the Library (or Folder) names used rem * to define the location of the Source and Target members. set SLIB1=%BASELIB1%\SIMOGENS\COGITATE\GENS set TLIB1=%BASELIB1%\COBOLUT1 rem * set MemberExt=cbl set PROMLIST=%BASELIB1%\SIMOGENS\COGITATE\SIMOTIME.LISTALL.CBL4TOTS.lst rem * dir /on /b /a-d %SLIB1%\*.cbl>%PROMLIST% for /F "eol=; tokens=1,2* delims=." %%i in (%PROMLIST%) do call RTCBLUT1 %%i.cbl %SLIB1% %TLIB1% call SIMONOTE "* AOK_XFR_Count is %AOK_XFR_Count% " call SIMONOTE "* NOK_XFR_Count is %NOK_XFR_Count% " if "%AOK_XFR_Count%" == "0" set /A NOK_Count=%NOK_Count% + 1 if "%AOK_XFR_Count%" == "0" goto Eoj if %NOK_XFR_Count% GTR 0 set /A NOK_Count=%NOK_Count% + 1 if %NOK_XFR_Count% GTR 0 goto Eoj set /A AOK_Count=%AOK_Count% + 1 call SIMONOTE "* AOK Job Count is %AOK_Count% " call SIMONOTE "* NOK Job Count is %NOK_Count% " rem * call SIMONOTE "* ----------------------------------------------------------------- *" call SIMONOTE "* Function 03, Compile the Data File Convert programs ------------- *COMPILE" set DIRSLIB1=%BaseLib1%\DIRS\ASC1 set zDIRS=%BaseLib1%\DIRS\ASC1\ENTCOBOLAscCBLBAT.DIR set EraseAfter=N set TransferGNT=N set AOK_CPL_Count=0 set NOK_CPL_Count=0 rem * rem * The following set statements will map the Library (or Folder) names used rem * to define the location of the Source and Target members. set SLIB1=%BASELIB1%\COBOLUT1 set TLIB1=%BASELIB1%\HOLD\UT1A set MemberList=%BASELIB1%\SIMOGENS\COGITATE\SIMOTIME.LISTALL.CBL4TOTS.lst rem * for /F "eol=; tokens=1,2* delims=." %%i in (%MemberList%) do CALL RTCBLGNT %%i %SLIB1% %TLIB1% call SIMONOTE "* AOK_CPL_Count is %AOK_CPL_Count% " call SIMONOTE "* NOK_CPL_Count is %NOK_CPL_Count% " if "%AOK_CPL_Count%" == "0" set /A NOK_Count=%NOK_Count% + 1 if "%AOK_CPL_Count%" == "0" goto Eoj if %NOK_CPL_Count% GTR 0 set /A NOK_Count=%NOK_Count% + 1 if %NOK_CPL_Count% GTR 0 goto Eoj set /A AOK_Count=%AOK_Count% + 1 call SIMONOTE "* Primary Job Count ..... AOK=%AOK_Count%, NOK=%NOK_Count% " rem * :Eoj call SIMONOTE "* ----------------------------------------------------------------- *" call SIMONOTE "* End of Job Processing " if "%NOK_Count%" == "0" goto EojAok goto EojNok :EojAok call SIMONOTE "* Finished %RtwName%, Exit Status is 0 " goto :End :EojNok call SIMONOTE "* ABENDING %RtwName%, Exit Status is 16 " :End pause
The following (RTGENTOT.cmd) is a secondary Job Script that is used to generate the COBOL Source Code.
@echo OFF set TaskName=RTGENTOT rem * ******************************************************************* rem * RTGENTOT.cmd - a Windows Command File * rem * This Job Script 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 * This Job Script will generate COBOL programs that may be used to rem * accumulate Summary Totals. The individual totals are selected and rem * processed based on a user selection of numerics fields that are rem * defined in a COBOL Copy File. rem * ******************************************************************* rem * rem * Set the environment variable to use the default directives file. call SimoNOTE "* -------------------------------------------------------- *%TaskName%" call SimoNOTE "* Starting %TaskName% Prepare, PGM=%1" set ConvertStatus=0000 set UTCOMPD1=%UTGENGET%\%1.pcf set UTCOMPD2=%UTGENGET%\%1_genr.cmd set UTCOMPD3=%UTGENGET%\%1_spec.txt if exist %UTCOMPD2% erase %UTCOMPD2% if exist %UTCOMPD3% erase %UTCOMPD3% set REC1SEQ1=%UTGENGET%\WORK\%1_FIELDS_RSEQ.dat set REC1WRK1=%UTGENGET%\WORK\%1_FIELDS_LSEQ.txt run UTCOMPPE if not "%ERRORLEVEL%" == "0" set ConvertStatus=0010 if not "%ConvertStatus%" == "0000" goto :ConvertEojNOK rem * rem * ******************************************************************* :ConvertEojAOK if "%SIMODROP%" == "Y" erase %UTCOMPD2% if "%SIMODROP%" == "Y" erase %UTCOMPD3% set /A AOK_GEN_Count=%AOK_GEN_Count% + 1 call SimoNOTE "* Complete %TaskName% RC=%ConvertStatus%, PGM=%1" goto :End rem * rem * ******************************************************************* :ConvertEojNOK set JobStatus=%ConvertStatus% set /A NOK_GEN_Count=%NOK_GEN_Count% + 1 call SimoNOTE "* ABENDING %TaskName% RC=%ConvertStatus%, PGM=%1, !!!ABENDING!!!" goto :End rem * rem * ******************************************************************* :End
The following (RTCBLUT1.cmd) is a secondary Job Script that is used to transfer (or promote) the COBOL Source Code to the COBOLUT1 Library.
rem * ************************************************************************ rem * It is the callers reponsibility to set the following environment rem * variables prior to calling the command. rem * 1. SLIB1 - point to the source directory. rem * 2. TLIB1 - point to the target directory rem * The following parameters are received from the calling command file. rem * Parameter Description rem * --------- ------------------------------------------------------------ rem * 1. Name of document rem * 2. Name of source directory relative to BaseLib1 rem * 3. Name of directory for load member relative to BaseLib1 rem * --------- ------------------------------------------------------------ rem * 4. Expected parameters are as follows. rem * Parm-1 - Member name without extension rem * ************************************************************************ rem * set CmdName=RTCBLUT1 set CopyFileStatus=0000 call SimoNOTE "Starting %CmdName%, RC=%CopyFileStatus%, PGM=%1" rem * call SimoNOTE "DataTAKE is %SLIB1%\%1 call SimoNOTE "DataMAKE is %TLIB1%\%1 rem * rem * ************************************************************************ rem * Do the copy file from source directory to target directory. copy %SLIB1%\%1 %TLIB1%\%1 if not "%ERRORLEVEL%" == "0" set CopyFileStatus=0010 if not "%CopyFileStatus%" == "0000" goto :CopyFileNOK rem * if exist %TLIB1%\%1 goto :CopyFileAOK set CopyFileStatus=0020 goto :CopyFileNOK rem * rem * ************************************************************************ :CopyFileAOK set /A AOK_XFR_Count=%AOK_XFR_Count% + 1 call SimoNOTE "Complete %CmdName%, RC=%CopyFileStatus%, PGM=%1" goto :End rem * rem * ************************************************************************ :CopyFileNOK set JobStatus=%CopyFileStatus% set /A NOK_XFR_Count=%NOK_XFR_Count% + 1 call SimoNOTE "ABENDING %CmdName%, RC=%CopyFileStatus%, PGM=%1, !!!ABENDING!!!" echo %1 - Error during Transfer, refer to %BASEAPP%\LIST\%1.LST>%BASEAPP%\LOGS\%1.ERR goto :End rem * rem * ************************************************************************ :End
The following (RTCBLGNT.cmd) is a secondary Job Script that is used to compile the generated COBOL Source Code.
set TaskName=RTCBLGNT rem * ******************************************************************* rem * RTCBLGNT.cmd - a Windows Command File * rem * This Job Script 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 * It is the callers reponsibility to set the following environment rem * variable prior to calling the command. rem * 1. BaseLib1 - point to the base directory. This procedure uses rem * various sub-directories under the base directory. rem * 2. DirsLib1 - point to the directory that contains the DIR files. rem * 3. zDIRS - point to the fully qualified name of the default rem * directives file. rem * rem * The following parameters are received from the calling command. rem * Parameter Description rem * --------- -------------------------------------------------------- rem * 1. Name of source member rem * 2. Name of source directory relative to BaseLib1 rem * 3. Name of directory for load member relative to BaseLib1 rem * --------- -------------------------------------------------------- rem * Expected parameters are as follows. rem * Parm-1 - Member name without extension rem * Parm-2 - Name of source directory relative to BaseLib1 rem * Parm-3 - Name of output directory relative to BaseLib1 rem * ******************************************************************* rem * The following two statements will first set the compile options to rem * use the directives file specified in the zDIRS environment variable. rem * The second statement will then check for a .DIR file with the same rem * name as the program. rem * If this exists then it will override zDIRS value. rem * set Compile2GNTStatus=0000 set CompileOptions=%zDIRS% if exist %DirsLib1%\%~n1.DIR set CompileOptions=%DirsLib1%\%~n1.DIR call SIMONOTE "* -------------------------------------------------------- *%TaskName%" call SIMONOTE "* Starting %TaskName%, Compile PGM=%1" echo Compile Options = %CompileOptions% call SIMONOTE "DIR-File %CompileOptions%" call SIMONOTE "CBL-File %2\%1" call SIMONOTE "GNT-File %3\%1" rem * rem * ******************************************************************* rem * Do the compile to create the .GNT executable using Micro Focus compiler. cobol %2\%1 OMF(GNT),%3\%1 USE(%CompileOptions%) LISTPATH(%BaseLib1%\LIST); if not "%ERRORLEVEL%" == "0" set Compile2GNTStatus=0010 if not "%Compile2GNTStatus%" == "0000" goto :Compile2GNTNOK rem * if "%SimoMSG%" == "1" call SIMONOTE "CBL-Copy %cobcpy%" if exist %3\%1.GNT goto :Compile2GNTAOK set Compile2GNTStatus=0020 goto :Compile2GNTNOK rem * rem * ******************************************************************* :Compile2GNTAOK if "%TransferGnt%"=="Y" (echo Transfer GNT is ENABLED COPY /Y %3\%1.GNT %BaseLib1%\LOADLIB\%1.GNT) if "%EraseAfter%"=="Y" (echo Erase After is ENABLED ERASE %3\%1.GNT) set /A AOK_CPL_Count=%AOK_CPL_Count% + 1 call SIMONOTE "* Complete %TaskName%, Compile PGM=%1, AOK_CPL=%AOK_CPL_Count%, NOK_CPL=%NOK_CPL_Count%, RC=%Compile2GNTStatus%" goto :End rem * rem * ******************************************************************* :Compile2GNTNOK set JobStatus=%Compile2GNTStatus% set /A NOK_CPL_Count=%NOK_CPL_Count% + 1 call SIMONOTE "* ABENDING %TaskName%, Compile PGM=%1, AOK_CPL=%AOK_CPL_Count%, NOK_CPL=%NOK_CPL_Count%, RC=%Compile2GNTStatus%, !!!ABENDING!!!" echo %1 - Error during Compile, refer to %BaseLib1%\LIST\%1.LST>%BaseLib1%\LOGS\%1.ERR goto :End rem * rem * ******************************************************************* :End
The purpose of this document is 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 document and the links to other documents are intended to provide a choice of alternatives.
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.
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.
Explore the COBOL Connection for more examples of COBOL programming techniques and sample code.
Explore an Extended List of Software Technologies that are available for review and evaluation. The software technologies (or Z-Packs) provide individual programming examples, documentation and test data files in a single package. The Z-Packs are usually in zip format to reduce the amount of time to download.
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 connection.
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 |
Prepare Totals Programs |
Copyright © 1987-2025 SimoTime Technologies and Services All Rights Reserved |
When technology complements business |
http://www.simotime.com |