Generate, Transfer & Compile Regression Test, Hex-Dump Function |
The SimoTime Home Page |
This Job Script wil generate, transfer and compile the COBOL source code for a suite of programs that will show the content of records within a file in a Hex-Dump format.
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 display records in a Hex-Dump format.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Objective: The technical objective for this Job Script is to generate the COBOL source code for a suite of Hex-Dump programs. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Job Step 01: Job Step 01 will execute a job script that will generate the programs. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Job Step 02: Job Step 02 will execute a job script that will copy the generated programs to the COBOLUT1 library. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Job Step 03: Job Step 03 will execute a job script that will compile the generated programs. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Job Step 04: Job Step 04 does End-of-Job processsing. |
Generate, Transfer and Compile the Hex-Dump Programs |
The following describes the Job Scripts and Programs that are used to generate, transfer and compile a suite of programs that will display records in a Hex-Dump format.
1. | Execute the Primary Job Script, RTW004W8 |
1.1. | Prepare the System Environment |
1.2. | Prepare the Job Environment for the Hex-Dump Processing Functions |
2. | Job Step 01, Program Generation process |
2.1. | Call RTGENHEX, a secondary Job Script |
2.1.1. | Run the UTCOMPPE Utility program |
3. | Job Step 02, Transfer (or promote) the programs to the COBOLUT1 Library. |
3.1. | Call RTCBLUT1, a secondary Job Script |
3.1.1. | Run the Windows COPY Command |
4. | Job Step 03, Compile the generated programs |
4.1. | Call RTCBLGNT, a secondary Job Script |
4.1.1. | Run the Micro Focus COBOL Compiler |
5. | Job Step 04, End of Job Processing |
WIP
,The following (RTW004W8.cmd) is the primary Job Script that is used for regression testing.
@echo OFF set RtwName=RTW004W8 rem * ******************************************************************* rem * RTW004W8.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 Hex-Dump programs. rem * Author - SimoTime Technologies rem * Date - January 24, 1996 rem * rem * rem * ************ rem * * RTW004W8 * 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 *----------* * Job Step 01 rem * ************ * rem * * ************ rem * * * RTGENHEX * * Generate the Hex-Dump Programs rem * * ********cmd* rem * * * rem * * ************ rem * * * UTCOMPPE * * SimoTime Utility program rem * * ********utl* rem * * rem * ************ rem * * FOR_LOOP *----------* * Job Step 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 *----------* * Job Step 03 rem * ************ * rem * * ************ rem * * * RTCBLGNT * * Compile the programs rem * * ********cmd* rem * * * rem * * ************ rem * * * COBOL * * Micro Focus COBOL Compiler rem * * ********utl* rem * * rem * ************ rem * * EOJ * * Job Step 04 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 do the Hex-Dump functions. rem * rem * 1. Job Step 01 will execute a job script that will generate rem * the programs. rem * 2. Job Step 02 will execute a job script that will copy the rem * generated programs to the COBOLUT1 library. rem * 3. Job Step 03 will execute a job script that will compile rem * the generated programs. rem * 4. Job Step 04 will perform End of Job processing. rem * rem * ******************************************************************* rem * rem * Prepare the System Environment. call ..\ENV1BASE %RtwName% set SYSOUT_RESTORE=%SYSOUT% set JobStatus=0000 set NOJS=04 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 actual Hex-Dump functions." rem * call SIMONOTE "* ----------------------------------------------------------------- *" call SIMONOTE "* Job_Step 01 of %NOJS%, Generate the Hexadecimal Dump programs ------- *GENERATE" rem * Prepare the Job Step Environment. call %BASELIB1%\SIMOGENS\COGITATE\USERCOGI set PGMFLAGS=NNNNNNNN/NNNNNNNN set AOK_GEN_Count=0 set NOK_GEN_Count=0 set SIMODROP=Y set GENILIBR=%BASELIB1%\SIMOGENS\COGITATE\INCLUDES call SIMONOTE "* GENILIBR is %GENILIBR%" for /F "eol=; tokens=1,2* delims=." %%i in (%BASELIB1%\SIMOGENS\COGITATE\SIMOTIME.LISTALL.PCF4HEXD.lst) do CALL RTGENHEX %%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 "* Job_Step 02 of %NOJS%, Transfer Generated Code to COBOLUT1 --------- *XFER2UT1" set AOK_XFR_Count=0 set NOK_XFR_Count=0 set SourceLib=%BASELIB1%\SIMOGENS\COGITATE\GENS set TargetLib=%BASELIB1%\COBOLUT1 set MemberExt=cbl set PROMLIST=%BASELIB1%\SIMOGENS\COGITATE\SIMOTIME.LISTALL.CBL4HEXD.lst rem * dir /on /b /a-d %SourceLib%\*.cbl>%PROMLIST% for /F "eol=; tokens=1,2* delims=." %%i in (%PROMLIST%) do call RTCBLUT1 %%i.cbl %SourceLib% %TargetLib% 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 "* Job_Step 03 of %NOJS%, 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 set SLIB1=%BASELIB1%\COBOLUT1 set TLIB1=%BASELIB1%\HOLD\UT1A set MemberList=%BASELIB1%\SIMOGENS\COGITATE\SIMOTIME.LISTALL.CBL4HEXD.lst rem * dir /on /b /a-d %SLIB1%\*.cbl>%MemberList% 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 "* Job_Step 04 of %NOJS%, 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 (RTGENHEX.cmd) is a secondary Job Script that is used to generate the COBOL Source Code.
@echo OFF set TaskName=RTGENHEX rem * ******************************************************************* rem * RTGENHEX.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 a COBOL program that will read rem * records from a user-defined file and produce a hexadecimal dump rem * as output. rem * ******************************************************************* rem * call SimoNOTE "******************************************************%TaskName%" call SimoNOTE "* Starting %TaskName% Preparation... Task=Set the Environment" 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% 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!!!" echo %1 - Error during Processing, refer to %BaseLib1%\LOGS\%SYSOUT&>%BaseLib1%\LOGS\%1.ERR 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 Hex-Dump Programs |
Copyright © 1987-2025 SimoTime Technologies and Services All Rights Reserved |
When technology complements business |
http://www.simotime.com |