Scripted Application Build
The Micro Focus Environment
  Table of Contents  v-24.01.01 - bdscript.htm 
  Introduction
  Quick Start
  Quick Start, System
  Quick Start, Batch
  Quick Start, Online
  BMS Generation
  Compile the COBOL Programs
  Generate the non-Executable Members
  Build Functions
  System Processes
  Compile Batch Programs
  COBOL without SQL
  COBOL with SQL
  Build Online Load Members
  Generate BMS Screens
  Compile Online Programs
  COBOL without SQL
  COBOL with SQL
  Generate non-Executable Load Members
  The Directory Structure
  Special Handling
  Compiler Directives
  Batch without SQL
  Batch with SQL
  Online without SQL
  Online with SQL
  Compile a Single COBOL Program
  Setting the Environment
  Display and Log Messages
  Possibilities and Considerations
  Frequently Asked Questions (FAQ's)
  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 document is an introduction or overview of the scripted application build process for an application that has been moved from a Mainframe System to a Windows system running a Micro Focus sub-system such as Enterprise Server, Application Server or Net Express.

A scripted build process may be a requirement in larger environments. A predefined and documented process for doing the build of a production system without operator intervention is a minimum requirement for the audit or validation process.

A scripted application build should be a repeatable process with an audit or validation trail. The process should be executable as an automated, unattended process. Requiring operator input during the application build process introduces an exposure point for error.

The sample process described in this document will display information to the console and write information to a log file based on the results of the execution of the compile and/or generate processes. The sample process will focus on building a production system for the ASCII-encoded environment.

This document addresses the requirement of doing a scripted build of the executable members from source members. It does not address the requirement of converting mainframe, EBCDIC-encoded data to non-mainframe, ASCII-encoded data. Information about data conversion is available in separate documents.


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 Quick Start

This section provides a minimal amount of information to get started with the scripted application build process.

Table of Contents Previous Section Next Section Quick Start, System

The following table shows a summary of the four (4) possible steps (or command files) involved in doing a build of a batch and online system.

Command Name Description
CBBATAE1 Compile the batch COBOL programs without SQL statements for the ASCII-encoded environment
BMGENAE1 Generate the BMS screens for online application (both MOD and CPY).
CBONLAE1 Compile the online COBOL programs without SQL statements for the ASCII-encoded environment.
ASMOGAE1 Generate the non-executable load members for the ASCII-encoded environment. This is an optional step base on the use of the EXEC CICS LOAD command that may be used to load no-executable members (i.e. data tables) into storage.
  Do the Compiles for the Batch and Online Programs

The preceding command files are discussed in more detail in the following sections of this document.

Table of Contents Previous Section Next Section Quick Start, Batch

The "CBBATAE1.CMD" command file will be used to compile the COBOL programs used by the batch applications. The command may be executed from Windows Explorer, called by another command file or from within a Windows Command prompt screen. The following shows the command line syntax.

C:\SimoSam1\Adm1> CBBATAE1

This job will first call Env1Base to set the environment variables used by the various application build functions. Next, the Windows "FOR" command is used to loop through the records in a file that contains a list of batch COBOL program names. For each record in the file a call to the command file "ZCBL2GNT.CMD" will be made to do the actual compile. Depending on the results of the compile a "normal end-of-job" or "abnormal termination" message will be displayed and posted to the log file.

The default directives are specified in the OS390AscBatch.DIR file located in the "DIRS" sub-directory. The directives in this file are used unless a directives file with the same name as the program is found in the "DIRS" subdirectory.

For this example the load members is placed in the HOLD\GNTA sub-directory.

Table of Contents Previous Section Next Section Quick Start, Online

Creating the load members for the online environment is a three (3) step process. The third step is optional depending on the use of non-executable tables and the EXEC CICS LOAD command.

1 Do the BMS generation to create the COBOL copy files and the BMS load member
2 Do the compilation of the online COBOL programs.
3 Do the generation of the non-executable load members (this step is optional)
  Do the BMS Generation, Compile the Programs and Build other Load Members

Note: the third step of the preceding list is optional depending on the use of the EXEC CICS LOAD command to load non-executable members (i.e. data tables).

Table of Contents Previous Section Next Section BMS Generation

This section will focus on the creation of the BMS load members and COBOL copy files for the BMS screens used by the online application. The command may be executed from Windows Explorer, called by another command file or from within a Windows Command prompt screen. The following shows the command line syntax.

C:\SIMOSAM1\DEVL\Adm1> BMGENAE1

The command will first call Env1Base to set the environment variables used by the various application build functions. Next, the Windows "FOR" command is used to loop through the records in a file that contains a list of source code for the BMS members. For each record in the file a call to the command file "BMGENAE1.CMD" will be made to do the actual BMS generation. Depending on the results of the generation a "normal end-of-job" or "abnormal termination" message will be displayed and posted to the log file.

For this example the load member is placed in the HOLD\BMSA sub-directory and the COBOL copy file is placed in the COBCPY6 sub-directory.

Table of Contents Previous Section Next Section Compile the COBOL Programs

The "CBONLAE1.CMD" command file will be used to compile the COBOL programs used by the online applications. The command may be executed from Windows Explorer, called by another command file or from within a Windows Command prompt screen. The following shows the command line syntax.

C:\SimoSam1\DEVL\Adm1> CBONLAE1

The program will first call Env1Base to set the environment variables used by the various application build functions. Next, the Windows "FOR" command is used to loop through the records in a file that contains a list of online COBOL program names. For each record in the file a call to the command file "ZCBL2GNT.CMD" will be made to do the actual compile. Depending on the results of the compile a "normal end-of-job" or "abnormal termination" message will be displayed and posted to the log file.

The default directives are specified in the OS390AscOnline.DIR file located in the "DIRS" sub-directory. The directives in this file are used unless a directives file with the same name as the program is found in the "DIRS" subdirectory.

For this example the load members are placed in the HOLD\GNTA sub-directory.

Table of Contents Previous Section Next Section Generate the non-Executable Members

The "ASMOGAE1.CMD" command file will be used to generate the non-executable load members used by the online applications. The command may be executed from Windows Explorer, called by another command file or from within a Windows Command prompt screen. The following shows the command line syntax.

C:\SimoSam1\DEVL\Adm1> ASMOGAE1

The script will first call Env1Base to set the environment variables used by the various application build functions. Next, the Windows "FOR" command is used to loop through the records in a file that contains a list of online Mainframe Assembler source members that use the DC statement to define non-executable tables. For each record in the file a call to the command file "ZASMOGEN.CMD" will be made to do the actual generation. Depending on the results of the generation a "normal end-of-job" or "abnormal termination" message will be displayed and posted to the log file.

For this example the load members are placed in the HOLD\MODA sub-directory.

Table of Contents Previous Section Next Section Build Functions

This section provides additional detail about the tasks included in the scripted application build process.

Table of Contents Previous Section Next Section System Processes

The application build may be done on a development server with the executable members being placed in a staging area to be picked up by (or forwarded to) the system test group. This approach works well for small to mid-range environments. However, as the application grows in size and complexity additional controls or processes are required to insure that the executables going to production are built from a known base of source code. This includes all the side files for compiler options, directives and other specifications that will affect the behavior of the executables going into production.

In order to accomplish this it becomes necessary for the development group to submit the source code and control files to the test group. The first phase of the application or system testing will be to do a scripted build of the application and validate the results of the build process. Once the executables are generated the normal testing cycle begins.

Table of Contents Previous Section Next Section Compile Batch Programs

The batch programs are divided into two (2) groups (or categories). The first group is batch programs without SQL syntax. The second groups is batch programs with SQL syntax.

Table of Contents Previous Section Next Section COBOL without SQL

The following is a listing of the command file (CBBATAE1.cmd) that does the multiple compilations of batch COBOL programs without SQL access. This script will read a file that contains a list of COBOL source members and call the "ZCBL2GNT.cmd" to do the actual generation for each source member in the list.

@echo OFF
     set CmdName=CBBATAE1
echo *********************************************************************
echo *              CBBATAE1.CMD - a Windows Command File                *
echo *        This program is provided by SimoTime Technologies          *
echo *           (C) Copyright 1987-2023 All Rights Reserved             *
echo *             Web Site URL:   http://www.simotime.com               *
echo *                   e-mail:   helpdesk@simotime.com                 *
echo *********************************************************************
rem  *
rem  * This command will read a file that contains a list of COBOL batch
rem  * programs without SQL and call ZCBL2GNT to compile each member.
rem  *
rem  * This procedure calls the following Windows Command Files.
rem  * 1. Env1Base.CMD - this provides a single point for setting commonly
rem  *                   used environment variables.
rem  * 2. SimoNOTE.CMD - this provides a consistent process for displaying
rem  *                   messages to the screen and writing to a journal
rem  *                   or log file.
rem  * 3. ZCBL2GNT.CMD - this will do the compile of the specified program
rem  *
rem  * Note: To specifiy the directory to be used for the IDY files use
rem  *       the COBIDY Compiler Directive and set the COBIDY environment
rem  *       variable.
rem  * *******************************************************************
     setlocal
     call ..\ENV1BASE %CmdName%
rem  *
     call SimoNOTE "*******************************************%CmdName%.CMD"
     call SimoNOTE "* Starting JobName %CmdName%.CMD"
rem  *
rem  * Set the environment variable to use the default directives file.
     set DirsLib1=%BaseLib1%\DIRS\ASC1
rem  set zDIRS=%DirsLib1%\OS390AscCBLBAT.DIR
     set zDIRS=%DirsLib1%\ENTCOBOLASCCBLBAT.dir
rem  * The following two statements will set the environment variables to
rem  * a "Y" for Yes or "N" for No. A "Y" will cause the function to be
rem  * performed by the called procedure. An "N" value will not perform the
rem  * function.
     set EraseAfter=N
     set TransferGNT=N
     set EXTFH=%BASESYS%\CONFIG\EXTFHTAB.CFG
rem  *
rem  * Read the ListSam1CobolBatchLessExt.TXT file and pass the contents of each record to the
rem  * command file that does the actual compile. Each record in the file
rem  * contains an eight character program name.
     set AOK_Count=0
     set NOK_Count=0
     set MemberList=%BaseLib1%\ADM1\CNTL\SIMOTIME.ADM1.CBLBATL1.LST
     for /F "eol=; tokens=1,2* delims=." %%i in (%MemberList%) do call zCBL2GNT %%i COBOL HOLD\GNTA
rem  *
     call SimoNOTE "* AOKcount Compile Count for AOK is %AOK_Count% "
     call SimoNOTE "* NOKcount Compile Count for NOK is %NOK_Count% "
     if %NOK_Count% == 0 goto EOJAOK
     goto EOJNOK
:EOJNOK
     call SimoNOTE "* ABENDING JobName %CmdName%.CMD"
     goto EOJEND
:EOJAOK
     call SimoNOTE "* Finished JobName %CmdName%.CMD"
:EOJEND
     if not "%SimoGENS%" == "BATCH" pause
     endlocal

Table of Contents Previous Section Next Section COBOL with SQL

The following is a listing of the command file (CBBSQAE1.cmd) that does the multiple compilations of batch COBOL programs with SQL access. This script will read a file that contains a list of COBOL source members and call the "ZCBL2GNT.cmd" to do the actual generation for each source member in the list.

@echo OFF
echo *********************************************************************
echo *              CBBSQAE1.cmd - a Windows Command File                *
echo *        This program is provided by SimoTime Technologies          *
echo *           (C) Copyright 1987-2016 All Rights Reserved             *
echo *             Web Site URL:   http://www.simotime.com               *
echo *                   e-mail:   helpdesk@simotime.com                 *
echo *********************************************************************
rem  *
rem  * This command will read a file that contains a list of COBOL batch
rem  * programs with SQL and call ZCBL2GNT to compile each member.
rem  *
rem  * ************************************************************************
rem  * This procedure calls the following Windows Command Files.
rem  * 1. ENV1BASE.cmd - this provides a single point for setting commonly
rem  *                   used environment variables.
rem  * 2. SIMONOTE.cmd - this provides a consistent process for displaying
rem  *                   messages to the screen and writing to a journal
rem  *                   or log file.
rem  * 3. ZCBL2GNT.cmd - this will do the compile of the specified program.
rem  *
rem  * Note: To specifiy the directory to be used for the IDY files use
rem  *       the COBIDY Compiler Directive and set the COBIDY environment
rem  *       variable.
rem  * ************************************************************************
     setlocal
     call ..\ENV1BASE
     set CmdName=CBBSQAE1
     set DirsLib1=%BaseLib1%\DIRS\ASC1
rem  *
     call SimoNOTE "****************************************%CmdName%.cmd"
     call SimoNOTE "Starting JobName %CmdName%.cmd"
rem  *
rem  * Set the environment variable to use the default directives file.
     set zDIRS=%DirsLib1%\OS390AscCBLBSQ.DIR
rem  * The following two statements will set the environment variables to
rem  * a "Y" for Yes or "N" for No. A "Y" will cause the function to be
rem  * performed by the called procedure. An "N" value will not perform the
rem  * function.
     set EraseAfter=N
     set TransferGNT=N
     set EXTFH=%BASESYS%\CONFIG\EXTFHTAB.cfg
rem  *
rem  * Read the List-of-Members file and pass the contents of each
rem  * record  to the command file that does the actual compile. Each record
rem  * in the file contains an eight character program name.
rem  * The following parameters are passed to the called command file.
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  *
     set AOK_Count=0
     set NOK_Count=0
     set MemberList=%BaseLib1%\ADM1\CNTL\SIMOTIME.ADM1.CBLBSQL1.LST
     for /F "eol=; tokens=1,2* delims=." %%i in (%MemberList%) do CALL ZCBL2GNT %%i COBOLsq1 HOLD\GNTA
rem  *
     call SimoNOTE "AOKcount Compile Count for AOK is %AOK_Count% "
     call SimoNOTE "NOKcount Compile Count for NOK is %NOK_Count% "
     call SimoNOTE "Finished JobName %CmdName%.cmd"
     if not "%SimoGENS%" == "BATCH" pause
     endlocal

Table of Contents Previous Section Next Section Build Online Load Members

The online load members are divided into three (3) groups (or categories). The first group contains the BMS (or screens) members, the second groups contains the COBOL programs with EXEC CICS syntax and the third group contains the possible non-executable load members.

Table of Contents Previous Section Next Section Generate BMS Screens

The following is a listing of the command file (BMGENAE1.cmd) that does the multiple generations of the BMS executable and COBOL copy file for the online environment. This script will read a file that contains a list of BMS source members and call the "ZBMSGENR.cmd" to do the actual BMS generation for each source member in the list.

@echo OFF
     set CmdName=BMGENAE1
echo *********************************************************************
echo *              BMGENAE1.cmd - a Windows Command File                *
echo *        This program is provided by SimoTime Technologies          *
echo *           (C) Copyright 1987-2016 All Rights Reserved             *
echo *             Web Site URL:   http://www.simotime.com               *
echo *                   e-mail:   helpdesk@simotime.com                 *
echo *********************************************************************
rem  * This procedure calls the following Windows Command Files.
rem  * 1. Env1Base.CMD - this provides a single point for setting the
rem  *                   commonly used environment variables.
rem  * 2. SimoNOTE.CMD - this provides a consistent process for
rem  *                   displaying messages to the screen and writing to
rem  *                   a journal or log file.
rem  * 3. ZBMSGENR.CMD - this will do a generation of a specified member.
rem  * *******************************************************************
     setlocal
     call ..\Env1Base
rem  *
     call SimoNOTE "**********************************************%CmdName%.CMD"
     call SimoNOTE "Starting JobName %CmdName%.CMD"
rem  *
rem  * Read the file containing BMS Member names and pass the contents of each
rem  * record to the command file that does the actual generation. Each record
rem  * in the file contains an eight character member name. The following
rem  * parameters are passed to the called command file.
rem  * Parameter  Description
rem  * ---------  ------------------------------------------------------------
rem  *    1       Name of BMS source member
rem  *    2       Name of BMS source directory relative to BaseLib1
rem  *    3       Name of directory for BMS load member relative to BaseLib1
rem  *
     set AOK_Count=0
     set NOK_Count=0
     set MemberList=%BASELIB1%\ADM1\CNTL\SIMOTIME.ADM1.BMSLIST.lst
     dir /on /b /a-d %BaseLib1%\BMS\*.bms>%MemberList%
     for /F "eol=; tokens=1,2* delims=." %%i in (%MemberList%) do CALL ZBMSGENR %%i BMS HOLD\BMSA
rem  *
     call SimoNOTE "AOKcount Generate Count for AOK is %AOK_Count% "
     call SimoNOTE "NOKcount Generate Count for NOK is %NOK_Count% "
     if %NOK_Count% == 0 goto EOJAOK
     goto EOJNOK
:EOJNOK
     call SimoNOTE "ABENDING JobName %CmdName%.CMD"
     goto EOJEND
:EOJAOK
     call SimoNOTE "Finished JobName %CmdName%.CMD"
:EOJEND
     if not "%SimoGENS%" == "BATCH" pause
     endlocal

The following is the command file (ZBMSGENR.cmd) that does a single BMS generation from a single BMS source member. This command file is usually called from the "BMGENAE1.cmd" command file.

@echo OFF
    set BMSgenerateStatus=0000
rem * ************************************************************************
rem * It is the caller's responsibility to set BaseLib1 environment variable
rem * to the base directory. This procedure uses various sub-directories
rem * under the base directory.
rem *
rem * ************************************************************************
rem * BMS command line compilation utility. Version NX_6-0-98
rem * Usage: mfbmscl <file_name> option[s]
rem * Options:
rem * [/ALIGN]                        - generate aligned BINARY/DSECT
rem * [/ASM=<output-path>]            - output path for copybook
rem * [/BINARY=<output-path>]         - output path for load module
rem * [/BMSGT=<array-prefix>]         - enable BMS GT features
rem * [/COBOL=<output-path>]          - output path for copybook
rem * [/CS=<currency-symbol>]         - set currency symbol for PICOUT
rem * [/DASH]                         - enable hyphenated suffices for fields
rem * [/DEPONLY]                      - check source for dependancies
rem * [/DP=,|.]                       - select comma or decimal point symbol for PICOUT
rem * [/DSECT=<copybook-name>|*member*]       - name of generated copybook
rem * [/DSIZE]                        - generate map length in DSECT for SDF mapsets
rem * [/HLL]                          - enable high level assembler features
rem * [/IE]                           - ignore errors
rem * [/IGNORE | /SDF}]               - comment format
rem * [/LEVEL=<1st>,<2nd>,<3rd>]      - copybook start level and increment
rem * [/MAP=<binary-name>|*member*]   - name of generated load module
rem * [/NAMES=<NLS-chars>]            - NLS characters allowable in macro labels
rem * [/PLI=<output-path>]            - output path for copybook
rem * [/PCOMP=<pre-compiler>]         - Invoke pre-compiler
rem * [/PREFIX=<prefix-text>]         - variable name prefix for copybook
rem * [/PREPASM[=KEEP]]               - Use ASM preprocess statement
rem * [/REDEFINPUT                    - make DSECT attribute byte redefine flag byte in input map
rem * [/STRNAME=<DFHMDI-name>(name)]  - name of data structure in copybook
rem * [/SYSLIB=<syslib>               - ASM preprocess macro SYSLIB
rem * [/SYSPARM=MAP]                  - request generation of BINARY
rem * [/SYSPARM=DSECT]                - request generation of DSECT
rem * [/MSGFORMAT=STUDIO]             - set error and warning output to Visual Studio format
rem * [/VERBOSE]                      - verbose output
rem *
rem * ************************************************************************
rem * The following parameters are received from the calling command file.
rem * Parameter  Description
rem * ---------  ------------------------------------------------------------
rem *    1       Name of BMS source member
rem *    2       Name of BMS source directory relative to BaseLib1
rem *    3       Name of directory for BMS load member relative to BaseLib1
rem *    Note    The COBOL copy file will be written to the CobCpy6
rem *            sub-directory under the BaseLib1 directory.
rem *
    call SimoNOTE "* -------------------------------------------------------*ZBMSGENR.CMD"
    call SimoNOTE "Starting JobStep ZBMSGENR, Status is %BMSgenerateStatus%, BMS Member is %1"
rem *
rem * ************************************************************************
rem * Do the BMS generation to create the .MOD Screen load member and the
rem * copy file to be used by a COBOL program.
rem * The copy file will be written to the CobCpy6 sub-directory under the
rem * base directory.
rem *
    set CICSCPY=%BaseLib1%\CobCpy6\
    mfbmscl %BaseLib1%\%2\%1.BMS /MAP=%1 /SYSPARM=MAP /SYSPARM=DSECT /COBOL=%CICSCPY% /BINARY=%BaseLib1%\%3\
    if not "%ERRORLEVEL%" == "0" set BMSgenerateStatus=0010
    if not "%BMSgenerateStatus%" == "0000" goto :Compile2GNTNOK
rem *
    echo %BaseLib1%\%3\%1.MOD
    if exist %BaseLib1%\%3\%1.MOD goto :Compile2GNTAOK
    set BMSgenerateStatus=0020
    goto :Compile2GNTNOK
rem *
rem * ************************************************************************
:Compile2GNTAOK
    set /A AOK_Count=%AOK_Count% + 1
    call SimoNOTE "BMS LOAD, %BaseLib1%\%3\%1.MOD"
    call SimoNOTE "BMS COPY, %BaseLib1%\CobCpy6\\%1.CPY"
    call SimoNOTE "InfoNOTE JobStep ZBMSGENR, AOK=%AOK_Count% NOK=%NOK_Count%"
    call SimoNOTE "Complete JobStep ZBMSGENR, Status is %BMSgenerateStatus%, BMS Member is %1"
    goto :End
rem *
rem * ************************************************************************
:Compile2GNTNOK
    set JobStatus=%BMSgenerateStatus%
    set /A NOK_Count=%NOK_Count% + 1
    call SimoNOTE "InfoNOTE JobStep ZBMSGENR, AOK=%AOK_Count% NOK=%NOK_Count%"
    call SimoNOTE "ABENDING JobStep ZBMSGENR, Status is %BMSgenerateStatus%, BMS Member is %1"
    echo %1>%BaseLib1%\LOGS\%1.ERR
    goto :End
rem *
rem * ************************************************************************
:End

Table of Contents Previous Section Next Section Compile Online Programs

The online programs are divided into two (2) groups (or categories). The first group is online programs are source members with EXEC CICS and without SQL syntax. The second groups is online programs are source members with EXEC CICS and with SQL syntax.

Table of Contents Previous Section Next Section COBOL without SQL

The following is a listing of the command file (CBONLAE1.cmd) that does the multiple compilations of the COBOL programs for the online environment. This script will read a file that contains a list of COBOL source members with EXEC CICS and without SQL statements. The command then calls a second command (ZCBL2GNT.cmd) to do the actual compile for each source member in the list.

@echo OFF
echo *********************************************************************
echo *              CBONLAE1.cmd - a Windows Command File                *
echo *        This program is provided by SimoTime Technologies          *
echo *           (C) Copyright 1987-2016 All Rights Reserved             *
echo *             Web Site URL:   http://www.simotime.com               *
echo *                   e-mail:   helpdesk@simotime.com                 *
echo *********************************************************************
rem  *
rem  * This command will read a file that contains a list of COBOL online
rem  * programs without SQL and call ZCBL2GNT to compile each member.
rem  *
rem  * This procedure calls the following Windows Command Files.
rem  * 1. ENV1BASE.cmd - this provides a single point for setting commonly
rem  *                   used environment variables.
rem  * 2. SIMONOTE.cmd - this provides a consistent process for displaying
rem  *                   messages to the screen and writing to a journal
rem  *                   or log file.
rem  * 3. ZCBL2GNT.cmd - this will do the compile of the specified program
rem  *
rem  * Note: To specifiy the directory to be used for the IDY files use
rem  *       the COBIDY Compiler Directive and set the COBIDY environment
rem  *       variable.
rem  * *******************************************************************
     setlocal
     call ..\ENV1BASE
     set CmdName=CBONLAE1
rem  *
     call SimoNOTE "*******************************************%CmdName%.cmd"
     call SimoNOTE "Starting JobName %CmdName%.cmd"
rem  *
rem  * Set the environment variable to use the default directives file.
     set DirsLib1=%BaseLib1%\DIRS\ASC1
     set zDIRS=%DirsLib1%\ENTCOBOLAscCBLONL.DIR
rem  * The following two statements will set the environment variables to
rem  * a "Y" for Yes or "N" for No. A "Y" will cause the function to be
rem  * performed by the called procedure. An "N" value will not perform the
rem  * function.
     set EraseAfter=N
     set TransferGNT=N
     set EXTFH=%BASESYS%\CONFIG\EXTFHTAB.cfg
rem  *
rem  * Read the ListSam1CobolBatchLessExt.TXT file and pass the contents of each record to the
rem  * command file that does the actual compile. Each record in the file
rem  * contains an eight character program name.
     set AOK_Count=0
     set NOK_Count=0
     set MemberList=%BaseLib1%\ADM1\CNTL\SIMOTIME.ADM1.CBLONLL1.LST
     for /F "eol=; tokens=1,2* delims=." %%i in (%MemberList%) do call ZCBL2GNT %%i COBOLCS1 HOLD\CS1A
rem  *
     call SimoNOTE "Conclude MIFOSYS1..... %MIFOSYS1% "
     call SimoNOTE "Conclude COBCPY....... %COBCPY% "
rem  *
     call SimoNOTE "AOKcount Compile Count for AOK is %AOK_Count% "
     call SimoNOTE "NOKcount Compile Count for NOK is %NOK_Count% "
     call SimoNOTE "Finished JobName %CmdName%.cmd "
     if not "%SimoGENS%" == "BATCH" pause
     endlocal

Table of Contents Previous Section Next Section COBOL with SQL

The following is a listing of the command file (CBOSQAE1.cmd) that does the multiple compilations of the COBOL programs for the online environment. This script will read a file that contains a list of COBOL source members with EXEC CICS and with SQL statements. The command then calls a second command (ZCBL2GNT.cmd) to do the actual compile for each source member in the list.

@echo OFF
echo *********************************************************************
echo *              CBOSQAE1.CMD - a Windows Command File                *
echo *        This program is provided by SimoTime Technologies          *
echo *           (C) Copyright 1987-2016 All Rights Reserved             *
echo *             Web Site URL:   http://www.simotime.com               *
echo *                   e-mail:   helpdesk@simotime.com                 *
echo *********************************************************************
rem  *
rem  * This command will read a file that contains a list of COBOL online
rem  * programs with SQL and call ZCBL2GNT to compile each member.
rem  *
rem  * This procedure calls the following Windows Command Files.
rem  * 1. Env1Base.CMD - this provides a single point for setting commonly
rem  *                   used environment variables.
rem  * 2. SimoNOTE.CMD - this provides a consistent process for displaying
rem  *                   messages to the screen and writing to a journal
rem  *                   or log file.
rem  * 3. ZCBL2GNT.CMD - this will do the compile of the specified program
rem  *
rem  * Note: To specifiy the directory to be used for the IDY files use
rem  *       the COBIDY Compiler Directive and set the COBIDY environment
rem  *       variable.
rem  * *******************************************************************
     setlocal
     call ..\Env1Base
     set CmdName=CBOSQAE1
rem  *
     call SimoNOTE "*******************************************%CmdName%.CMD"
     call SimoNOTE "Starting JobName %CmdName%.CMD"
rem  *
rem  * Set the environment variable to use the default directives file.
     set DirsLib1=%BaseLib1%\DIRS\ASC1
     set zDIRS=%DirsLib1%\OS390AscCBLOSQ.DIR
rem  * The following two statements will set the environment variables to
rem  * a "Y" for Yes or "N" for No. A "Y" will cause the function to be
rem  * performed by the called procedure. An "N" value will not perform the
rem  * function.
     set EraseAfter=N
     set TransferGNT=N
     set EXTFH=%BASESYS%\CONFIG\EXTFHTAB.CFG
rem  *
rem  * Read the ListSam1CobolBatchLessExt.TXT file and pass the contents of each record to the
rem  * command file that does the actual compile. Each record in the file
rem  * contains an eight character program name.
     set AOK_Count=0
     set NOK_Count=0
     set MemberList=%BaseLib1%\Adm1\DATA\UTIL\SIMOTIME.UTIL.CBLOSQL1.LST
     for /F "eol=; tokens=1,2* delims=." %%i in (%MemberList%) do call zCBL2GNT %%i COBOLCS1 HOLD\CS1A
rem  *
     call SimoNOTE "AOKcount Compile Count for AOK is %AOK_Count% "
     call SimoNOTE "NOKcount Compile Count for NOK is %NOK_Count% "
     call SimoNOTE "Finished JobName %CmdName%.CMD "
     if not "%SimoGENS%" == "BATCH" pause
     endlocal

Table of Contents Previous Section Next Section Generate non-Executable Load Members

Many online applications use data tables. These tables are usually defined in a COBOL copy file that is part of Working Storage. If the table changed the copy file was changed and all programs that used the copy file were re-compiled. If a table required frequent changes and was used by a number of different programs the use of the copy file became problematic. To solve this problem tables were coded as separate members and loaded at execution time using the EXEC CICS LOAD command. In order to create a non-executable load member the tables were coded in Mainframe Assembler using the DC (or Define Constant) statement.

This approach works quite well in the mainframe, EBCDIC-encoded environment were the Assembler Compiler is readily available. Also, this works quite well when moving the application to a Windows platform using Micro Focus Mainframe Express that provides support for EBCDIC encoding and a mainframe assembler capability.

The problem arises when the application is moved to a Windows or UNIX platform with Micro Focus Enterprise Server configured for an ASCII-encoded environment. To do this requires a special program that is capable of reading and parsing the DC statements in a mainframe assembler source member and creating an ASCII-encoding, non-executable load members. This program is available and described in a separate document.

The following is a list of the command file (ASMOGAE1.cmd) that does the multiple generations of non-executable load members for the online environment. This script will read a file that contains a list of assembler source members and call the "ZASMOGEN.cmd" to do the actual generation for each source member in the list.

@echo OFF
echo * *******************************************************************
echo *               ASMOGAE1.cmd - a Windows Command File               *
echo *         This program is provided by SimoTime Technologies         *
echo *           (C) Copyright 1987-2016 All Rights Reserved             *
echo *             Web Site URL:   http://www.simotime.com               *
echo *                   e-mail:   helpdesk@simotime.com                 *
echo * *******************************************************************
rem  * This procedure calls the following Windows Command Files.
rem  * 1. ENV1BASE.cmd - this provides a single point for setting commonly
rem  *    used environment variables.
rem  * 2. SimoNOTE.cmd - this provides a consistent process for displaying
rem  *    messages to the screen and writing to a journal or log file.
rem  * 3. zModGeneration01.cmd - this will do the actual generation of the
rem  *    specified member.
rem  * *******************************************************************
     setlocal
     call ..\ENV1BASE
     set CmdName=ASMOGAE1
rem  *
     call SimoNOTE "****************************************%CmdName%.cmd"
     call SimoNOTE "Starting JobName %CmdName%.cmd"
     set ASMOFORM=ASC
rem  *
rem  * Read the ListSam1AsModsLessExt.TXT file and pass the contents of each
rem  * record to the command file that does the actual generation. Each
rem  * record in the file contains an eight character member name.
     set ASMOCOPY=Y
     for /F %%i in (ListSam1AsModsLessExt.TXT) do CALL ZASMOGEN %%i ASM HOLD\MODA LIST
rem  *
     call SimoNOTE "Finished JobName %CmdName%.cmd"
     if not "%SimoGENS%" == "BATCH" pause
     endlocal

The following is the command file (ZASMOGEN.cmd) that does a single MOD generation from a single Assembler source member. This command file is usually called from the "ASMOGAE1.cmd" command file.

@echo OFF
     echo Parameter 1 is %1
     echo CobCpy is %CobCpy%
     set CreateMODStatus=0000
rem  *
rem  * It is the callers reponsibility to set BaseLib1 to the base
rem  * directory. This procedure uses various sub-directories under the
rem  * base directory.
rem  *
rem  * The following parameters are received from the calling command file.
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  *    4       Name of directory for list member relative to BaseLib1
rem  *
rem  * ************************************************************************
     call SimoNOTE "Starting JobStep ZASMOGEN, Status is %CreateMODStatus%, Program is %1"
rem  *
rem  * ************************************************************************
rem  * Do the build to create the .MOD non-executable using a COBOL program
     set ASMOTAKE=%BaseLib1%\%2\%1.MLC
     set ASMOMAKE=%BaseLib1%\%3\%1.MOD
     set ASMOLIST=%BaseLib1%\%4\%1.LST
     if "%ASMOCOPY%" == "Y" set COBOLPUT=%BaseLib1%\DATA\WRK1\COBOLPUT_%1.cpy
     run ASMOGENR
     echo ErrorLevel is %ERRORLEVEL%
     if not "%ERRORLEVEL%" == "0" set CreateMODStatus=0010
     if not "%CreateMODStatus%" == "0000" goto :CreateMODNOK
rem  *
     echo %ASMOMAKE%
     if exist %ASMOMAKE% goto :CreateMODAOK
     set CreateMODStatus=0020
     goto :CreateMODNOK
rem  *
rem  * ************************************************************************
:CreateMODAOK
     call SimoNOTE "StepInfo Create Hex Dump File of .MOD file"
     set SYSLOG=%BaseLib1%\DATA\Wrk1\%1.DMP
     if exist %SYSLOG% del %SYSLOG%
     run SimoZAPS Hexcess %ASMOMAKE% start=1 stop=9999999
     call SimoNOTE "Complete JobStep ZASMOGEN, Status is %CreateMODStatus%, Program is %1"
     goto :End
rem  *
rem  * ************************************************************************
:CreateMODNOK
     set JobStatus=%Compile2GNTStatus%
     call SimoNOTE "ABENDING JobStep ZASMOGEN, Status is %CreateMODStatus%, Program is %1"
     echo %1>%BaseLib1%\LOGS\%1.ERR
     goto :End
rem  *
rem  * ************************************************************************
:End
     exit /B %CreateMODStatus%

Table of Contents Previous Section Next Section The Directory Structure

For the SimoTime suite of sample programs the "C:\SimoSam1" directory is the primary (or base) directory with three (3) sub-directories DEVL, PROD and TEST. The following shows the next level of sub-directories under the DEVL directory (the PROD and TEST or similar).

               
SIMOSAM1
See Note-1
   
   
 
 
DEVL
See Note-2
   
   
 
 
ADM1
 
 
and MORE
Administrative and Support functions
   
   
 
 
ASM
 
 
and MORE
Mainframe Assembler Source and Sub-Directories
   
   
 
 
BMS
Contains Basic Mapping Support Member
   
   
 
 
COBCPY1
Contains COBOL Copy Members
   
   
 
 
COBCPY6
Contains COBOL Copy Members from a BMS GEN
   
   
 
 
COBOL
Contains COBOL Source Members
   
   
 
 
COBOLUT1
Contains COBOL Source Members, see Note-3
   
   
 
 
COBOLUT2
Contains COBOL Source Members, see Note-4
   
   
 
 
COBOLUT3
Contains COBOL Source Members, see Note-5
   
   
 
 
DATA
Contains the catalog and data files
   
   
   
   
 
 
APPL
Contains non-Relational data files for Application
   
   
   
   
 
 
SPOOL
Contains the JES and SYSOUT files
   
   
   
   
 
 
and MORE
Link to additional sub-Directories
   
   
 
 
DIRS
Contains compiler directives files
   
   
 
 
DOCS
Contains user or application documentation
   
   
 
 
HOLD
 
 
and MORE
Contains new load members from Scripted Builds
   
   
 
 
IMSLIB
Contains the IMS Members for execution-time
   
   
   
   
 
 
DBD
Source Members for the IMS DBD
   
   
   
   
 
 
PSB
Source Members for the IMS PSB
   
   
 
 
JAVA
Contains JAVA Source Members
   
   
 
 
JCL
Contains the JCL Source Members
   
   
 
 
JCLINC
Contains the Include Members for JCL
   
   
 
 
LOADLIB
Contains the executable members
   
   
   
   
 
 
GNTS
Contains COBOL Load Members
   
   
   
   
 
 
simpacks
Contains Java Class Members
   
   
 
 
LOGS
Contains the log files for the application
   
   
 
 
PARMLIB
Contains the parameter or control files
   
   
 
 
PROCLIB
Contains the Procedures (or PROC's) for JCL
   
   
 
 
REXXLIB
Contains the REXX Program Members
   
   
 
 
SIMOGENS
 
 
and MORE
Contains the Program Generation Members
   
   
 
 
SYS1
Systems directory, not exposed to users
   
   
 
 
CONFIG
System configuration specifications
   
   
 
 
and MORE
Link to additional sub-Directories?
 
Note-1: This is the primary directory for the SimoTime Driver Programs and Test Cases
Note-2: This is the Development, Production or Test directory, for this example it is set to DEVL.
Note-3: Utility programs using a mainframe dialect, not part of application business functions
Note-4: Utility programs using a Micro Focus dialect, not part of application business functions
Note-5: Utility programs with specialized or unique requirements
The Directory Structure used in the in the SimoTime Development Environment

The preceding is provided for reference purposes and may be modified to meet specific requirements or naming conventions. Additional sub-directories that address requirements beyond the scope of the scripted build process may be in the base directory. The use of additional sub-directories is described in documents that address additional requirements and functionality.

Table of Contents Previous Section Next Section Special Handling

This section provides additional detail about the application build process.

Table of Contents Previous Section Next Section Compiler Directives

Compiler directives may be individually specified in the source code of a COBOL program, as part of a Net Express project or grouped together in a directives file that may be referenced by the project or command that is doing the compile. For most of the compiles this suite of examples uses directives files, two for the batch environment and two for the online environment. The following sections describe each in more detail.

When the NOFORM directive is used the listing will be created without print carriage control and page headers. This makes for easier viewing from the screen and produces a listing file with the included copy files. This listing file could be renamed with a .CBL extension and compiled.

Note: the NOFORM directive must follow the LIST() directive. The LIST directive will set FORM"60".

Note: Micro Focus supports a number of COBOL dialects including mainframe dialects from OSVS through Enterprise COBOL.

Link to Internet   Link to Server   Explore the Compiler Directives available for the Micro Focus COBOL technologies.

The following sub-sections are included in this document as a convenience.

Table of Contents Previous Section Next Section Batch without SQL

The following (OS390AscCBLBAT.dir) is a listing of the DIR file used when compiling COBOL batch programs for an ASCII-encoded environment. These are programs without "EXEC CICS" and without "EXEC SQL" syntax.

DIALECT"OS390"
CHARSET"ASCII"
ASSIGN"EXTERNAL"
IDXFORMAT"8"
IBMCOMP
NOTRUNC
HOSTNUMMOVE
HOSTNUMCOMPARE
NOSIGN-FIXUP
HOSTARITHMETIC
CHECKNUM
NOOPTIONAL-FILE
NOHOSTFD
NOQUERY
SSRANGE
COBIDY
ANIM
outdd"SYSOUT 121 L"
SHARE-OUTDD
DATE
TIME
DATAMAP
settings
list()
noform

Table of Contents Previous Section Next Section Batch with SQL

The following (OS390AscCBLBSQ.dir) is a listing of the DIR file used when compiling COBOL batch programs for an ASCII-encoded environment. These are programs without "EXEC CICS" and with "EXEC SQL" syntax.

DIALECT"OS390"
CHARSET"ASCII"
SQL(DBMAN=ODBC, autocommit)
SQL(ALLOWNULLCHAR)
SQL(PASS)
SQL(INIT=PROT)
SQL(THREAD=ISOLATE)
SQL(BEHAVIOR=MAINFRAME)
WARNING"1"
IBMCOMP
NOTRUNC
HOSTNUMMOVE
HOSTNUMCOMPARE
NOSIGN-FIXUP
HOSTARITHMETIC
CHECKNUM
NOOPTIONAL-FILE
NOHOSTFD
NOQUERY
COBIDY
ANIM
outdd"SYSOUT 121 L"
SHARE-OUTDD
DATAMAP
SETTING"COL3"
list()
noform

Table of Contents Previous Section Next Section Online without SQL

The following (OS390AscCBLONL.dir) is a listing of the DIR file used when compiling COBOL online programs for an ASCII-encoded environment. These are programs with "EXEC CICS" and without "EXEC SQL" syntax.

DIALECT"OS390"
CHARSET"ASCII"
CICSECM()
IBMCOMP
NOTRUNC
HOSTNUMMOVE
HOSTNUMCOMPARE
NOSIGN-FIXUP
HOSTARITHMETIC
CHECKNUM
NOQUERY
COBIDY
ANIM
outdd"SYSOUT 121 L"
SHARE-OUTDD
DATAMAP
settings
list()
noform

Table of Contents Previous Section Next Section Online with SQL

The following (OS390AscCBLOSQ.dir) is a listing of the DIR file used when compiling COBOL online programs for an ASCII-encoded environment. These are programs with "EXEC CICS" and with "EXEC SQL" syntax.

DIALECT"OS390"
CHARSET"ASCII"
SQL(DBMAN=ODBC, AUTOCOMMIT)
SQL(THREAD=ISOLATE)
SQL(INIT=PROT)
SQL(BEHAVIOR=MAINFRAME)
WARNING"1"
CICSECM()
IBMCOMP
NOTRUNC
HOSTNUMMOVE
HOSTNUMCOMPARE
NOSIGN-FIXUP
HOSTARITHMETIC
CHECKNUM
NOQUERY
COBIDY
ANIM
outdd"SYSOUT 121 L"
SHARE-OUTDD
DATAMAP
settings(COL3)
list()
noform

Table of Contents Previous Section Next Section Compile a Single COBOL Program

The following is the command file (ZCBL2GNT.cmd) that does a single compile from a single COBOL source member. This command file is usually called from another command file such as the "CBBATAE1.cmd" command file for batch programs and the "CBONLAE1.CMD" command file for online programs.

rem  * *******************************************************************
rem  *               ZCBL2GNT.CMD - a Windows Command File               *
rem  *         This program is provided by SimoTime Technologies         *
rem  *           (C) Copyright 1987-2023 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 "+ Starting ZCBL2GNT, RC=%Compile2GNTStatus%, PGM=%1"
     echo Compile Options = %CompileOptions%
     call SimoNOTE "+ DIR-File %CompileOptions%"
rem  *
rem  * *******************************************************************
rem  * Do the compile to create the .GNT executable using Micro Focus compiler.
     cobol %BaseLib1%\%2\%1 OMF(GNT),%BaseLib1%\%3\ USE(%CompileOptions%) LISTPATH(%BaseLib1%\LIST);
     if not "%ERRORLEVEL%" == "0" set Compile2GNTStatus=0010
     if not "%Compile2GNTStatus%" == "0000" goto :Compile2GNTNOK
rem  *
     echo %BaseLib1%\%3\%1.GNT
     if "%SimoMSG%" == "1" call SimoNOTE "CBL-Copy %cobcpy%"
     if exist %BaseLib1%\%3\%1.GNT goto :Compile2GNTAOK
     set Compile2GNTStatus=0020
     goto :Compile2GNTNOK
rem  *
rem  * *******************************************************************
:Compile2GNTAOK
     if "%TransferGnt%"=="Y"  (echo Transfer GNT is ENABLED
                               COPY /Y %BaseLib1%\%3\%1.GNT %BaseLib1%\LOADLIB\%1.GNT)
     if "%EraseAfter%"=="Y"   (echo Erase After is ENABLED
                               ERASE %BaseLib1%\%3\%1.GNT)
     set /A AOK_Count=%AOK_Count% + 1
     call SimoNOTE "+ Complete ZCBL2GNT, AOK_COUNT=%AOK_Count%, NOK_COUNT=%NOK_Count%, PGM=%1"
     goto :End
rem  *
rem  * *******************************************************************
:Compile2GNTNOK
     set JobStatus=%Compile2GNTStatus%
     set /A NOK_Count=%NOK_Count% + 1
     call SimoNOTE "+ ABENDING ZCBL2GNT, AOK_COUNT=%AOK_Count%, NOK_COUNT=%NOK_Count%, PGM=%1, !!!ABENDING!!!"
     echo %1 - Error during Compile, refer to %BaseLib1%\LIST\%1.LST>%BaseLib1%\LOGS\%1.ERR
     goto :End
rem  *
rem  * *******************************************************************
:End

Table of Contents Previous Section Next Section Setting the Environment

A command file (ENV1BASE.cmd) is called from other command files to set commonly used environment variables. This provides a single point of definition. The following is a listing of the contents of the command file.

@echo OFF
rem  * *******************************************************************
rem  *               ENV1BASE.cmd - a Windows Command File               *
rem  *        This program is provided by SimoTime Technologies          *
rem  *           (C) Copyright 1987-2021 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  *
rem  * Text   - Provide a single point to set common environment variables.
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * Set the commonly used environment variables. This is used to provide
rem  * a single point for managing the commonly used environment variables.
rem  *
     set SimoLIBR=c:\SimoLIBR
     set BASELIB1=c:\SIMOSAM1\DEVL
     set BASELIB8=c:\SimoSAM8
     set BaseWIP1=c:\SimoSAM1\WIP1
     set DATAZERO=c:\SIMODATA\DEVL\DATA\ZERO
     set BASEAPP=%BaseLib1%
     set BASESYS=%BaseLib1%\SYS1
     set BASECAT=%BaseLib1%\DATA
     set UMAPALIB=%BASECAT%\ASC1
     set UMAPELIB=%BASECAT%\EBC1
     set SYSLOG=%BASESYS%\LOGS\SYSLOG_USER.DAT
     set SYSOUT=%BASEAPP%\LOGS\SYSOUT_SIMSAM01.txt
     set SLZMSG=%BASEAPP%\LOGS\SLZMSG_USER.TXT
     set PostNOTE=%BASEAPP%\LOGS\JOBLOG_SIMONOTE.TXT
     set SIMONOTE=%BASEAPP%\LOGS\JOBLOG_SIMONOTE.txt
     set USERPOST=%BASEAPP%\LOGS\ASSIGNED_USER_POST_FILE.txt
     if [%1]==[] goto NO_POST
     set SYSOUT=%BaseLib1%\LOGS\SYSOUT_%1.txt
     call SIMONOTE "+ ENV1BASE *"
     call SIMONOTE "+ ENV1BASE ********************************************************************%1"
     call SIMONOTE "+ ENV1BASE is preparing the System Environment..."
     call SIMONOTE "+ SIMOLIBR is %SIMOLIBR%"
     call SIMONOTE "+ MIFOSYS1 is %MIFOSYS1%"
     call SIMONOTE "+ BASELIB1 is %BASELIB1%"
:NO_POST
     call SIMONOTE "+ SIMONOTE Job Log File is %SIMONOTE% "
rem  *
     set MQBASE=C:\Program Files\IBM\WebSphere MQ
rem  *
rem  * Set the location for the Apache-Tomcat Server...
     set CATALINA_HOME=C:\APACHETC\apache-tomcat-7.0.52
rem     set CATALINA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_112
rem  *
rem  * Set the Environment for the Java Environment...
rem     set JAVABASE=C:\APACHETC\apache-tomcat-7.0.52
     set JAVABASE=C:\Program Files (x86)\Java\jdk1.8.0_112
     set JAVASDK="%JAVABASE%\bin"
     set JAVA_HOME=%JAVABASE%
     set JRE_HOME=%JAVABASE%
     set SIMOTCAT=%CATALINA_HOME%\webapps\simotcat
     set SIMPACKS=%CATALINA_HOME%\webapps\simotcat\WEB-INF\classes\simpacks
rem  *
rem  * Set the environment for the Micro Focus technology...
     set MIFOEDEV=C:\Program Files (x86)\Micro Focus\Enterprise Developer
     set MIFOVCBL=C:\Program Files (x86)\Micro Focus\Visual COBOL Build Tools
     set MIFOESTU=C:\Program Files (x86)\Micro Focus\Studio Enterprise Edition 6.0
     set MIFOEMFE="C:\Program Files (x86)\Micro Focus\Mainframe Express"
rem  *
rem  * Large file support, performance tuning and record locking of the File Handler
     set EXTFH=%BASESYS%\CONFIG\EXTFHBIG.CFG
rem  *
rem  * For IMS Support
     set ES_IMSLIB=%BASEAPP%\IMSLIB
     set ES_ACBLIB=%BASEAPP%\IMSLIB
rem  *
rem  * EZASOKETS Check EZASOKETS Enabled box or set ES_EZASOKET_SUPPORT=YES
     set EZACONFG=BASESYS1\CONFIG\EZACONFG.dat
rem  *
rem  * Resource Allocation and Performance for SORT and non-Relational Data
rem  set MFJSENGINE=SYNCSORT
     set SORTSCHEME=1
     set SORTSPACE=750000000
     set TMP=C:\SORTWORK
rem  *
     set ES_ALLOC_OVERRIDE=%BASESYS%\CONFIG\CATMAPA1.cfg
rem  * For CORE_ON_ERROR function, ABEND Dump
rem  *     set COBCONFIG_=%BASESYS%\CONFIG\diagnose.cfg
rem  *
rem  * Consolidated Trace Facility (CTF)
rem  *     set MFTRACE_CONFIG=%BASESYS%\CONFIG\ctf.cfg
rem  *     set MFTRACE_LOGS=c:\ctflogs
rem  *
rem  * For Job Restart, ABEND Recovery
     set MF_UCC11=Y
     set ES_JES_RESTART=Y
rem  *
rem  * Set environment for MFBSI (Micro Focus Batch Scheduling Interface)
     set ES_EMP_EXIT_1=mfbsiemx
     set MFBSI_DIR=%BASESYS%\LOGS\%JESSERVERNAME%
     set MFBSIEOP_CMD=ENABLE
     set MFBSIEOP_CSV=ENABLE
     set MFBSIEOP_HTM=ENABLE
     set MFBSIEOP_XML=ENABLE
rem  *
rem  * Set Behavior and Trace Flags for GETJOBDD
rem  *   Position=12345678/12345678
     set JDDFLAGS=nnnWnnnn/YYnnnnnn
rem  *
rem  * If not already set then set the PATH for Micro Focus Directories
     if "%SIMOPATH%" == "Y" goto JUMPPATH
     if "%MIFOSYS1%" == "EDEV" goto JUMPEDEV
     if "%MIFOSYS1%" == "VCBL" goto JUMPVCBL
     if "%MIFOSYS1%" == "ESTU" goto JUMPESTU
     if "%MIFOSYS1%" == "EMFE" goto JUMPEMFE
:JUMPEDEV
     set path=%BASESYS%\LOADLIB;%MIFOEDEV%\bin;%JAVASDK%;%BASEAPP%\JAVA;%PATH%;
     set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOEDEV%\CPYLIB
     set MIFOBASE=%MIFOEDEV%
     goto JUMPPATH
:JUMPVCBL
     set path=%MIFOVCBL%\bin;%MIFOVCBL%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%;
     set MIFOBASE=%MIFOVCBL%
     goto JUMPPATH
:JUMPESTU
     set MIFOBASE=%MIFOESTU%\Base
     set MIFOBIN=%MIFOBASE%\bin
     set path=%BASESYS%\LOADLIB;%MIFOBASE%;%MIFOBIN%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%;
     set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOBASE%\SOURCE
     goto JUMPPATH
:JUMPEMFE
     set MIFOBASE=%MIFOEMFE%\Base
     set MIFOBIN=%MIFOBASE%\bin
     set path=%BASESYS%\LOADLIB;%MIFOBASE%;%MIFOBIN%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%;
     set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOBASE%\SOURCE
     goto JUMPPATH
rem  *
:JUMPPATH
     set SIMOPATH=Y
rem  *
     set MAINFRAME_FLOATING_POINT=true
     set COBIDY=%BASEAPP%\COBIDY
     set COBPATH=.;%BASEAPP%\LOADLIB;%BASEAPP%\LOADLIB\GNTS;%BASESYS%\LOADLIB;%SimoLIBR%
     set LIBPATH=.;%BASEAPP%\LOADLIB;%BASEAPP%\LOADLIB\GNTS;%BASESYS%\LOADLIB;%SimoLIBR%
     set TXDIR=%BASESYS%\LOADLIB;%MIFOBASE%
     set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%
rem  *
     set USERCLASS=%BASELIB1%\LOADLIB
     set CLASSPATH=.
     set CLASSPATH=%CLASSPATH%;%JAVABASE%
     set CLASSPATH=%CLASSPATH%;%JAVABASE%\lib
     set CLASSPATH=%CLASSPATH%;\%USERCLASS%\simpacks
     set CLASSPATH=%CLASSPATH%;C:\APACHETC\apache-tomcat-7.0.52\webapps\simotcat\WEB-INF\classes
     set CLASSPATH=%CLASSPATH%;C:\APACHETC\apache-tomcat-7.0.52\webapps\simotcat\WEB-INF\classes\simpacks
rem  *
     if "%MIFOSYS1%" == "ESTU" set CLASSPATH=%CLASSPATH%;%MIFOBIN%
     if "%MIFOSYS1%" == "EDEV" set CLASSPATH=%CLASSPATH%;%MIFOEDEV%
     if "%MIFOSYS1%" == "VCBL" set CLASSPATH=%CLASSPATH%;%MIFOVCBL%
     if "%MIFOSYS1%" == "VCBL" set CLASSPATH=%CLASSPATH%;%MIFOVCBL%\bin\mfcobol.jar
rem  *
     set JobStatus=0000
     call SIMONOTE "+ ENV1BASE is returning to caller"


Note: For the SimoTime suite of sample programs this command is located in the base directory named SimoSam1

Table of Contents Previous Section Next Section Display and Log Messages

The following is a listing of the contents of the (SIMONOTE.cmd) command file.

@echo OFF
rem  * *******************************************************************
rem  *               SIMONOTE.cmd - a Windows Command File               *
rem  *         This program 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    - Display message on screen and write to a log file.
rem  * Author  - SimoTime Technologies
rem  *
rem  * This script may be called from other scripts and expects a single
rem  * parameter enclosed in double quotes. The double quotes will be
rem  * removed. Before writing to the log file a date and time stamp
rem  * will be inserted in front of the message text.
rem  *
rem  * Note: The tilde (~) removes leading/trailing double-quotes.
rem  *
if "%SimoNOTE%" == "" set SimoNOTE=c:\SimoLIBR\LOGS\SimoTime.LOG
echo %date% %time% %~1>> %SimoNOTE%
echo %~1

Table of Contents Previous Section Next Section Possibilities and Considerations

This section provides information that addresses specific items pertaining to the function and capabilities and their potential use within or beyond the author's original design objectives.

Table of Contents Previous Section Next Section Frequently Asked Questions (FAQ's)

This section is a list of frequently asked questions preceded by a date stamp.

Date Question and Answer
2007-03-17 Is it possible to use the same directives file used by the scripted build with a Net Express project?
Yes, the "USE" directives provides for specifying a directives file. From within a Net Express Project choose the "Project" from the tool bar and then select "Properties" from the drop down box. In the small window called "Project Directives" add the following at the information before the semicolon.
USE"c:\SimoSam1\DIRS\OS390\OS390AscBatch.DIR"
2007-05-17 Will a Net Express Project create the same executable as the scripted build?
Yes, if the script and project use the same directives and the project is configured to create a .GNT member.
  Frequently Asked Questions

Table of Contents Previous Section Next Section Summary

The purpose of this program is to provide a model suite of Windows Command Files to do a scripted build of an application that has been migrated from a Mainframe System to a Windows System using Micro Focus Enterprise Server or Mainframe Express..

Also, this document may be used 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 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.

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

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
Scripted Application Build for the Micro Focus Environment
Copyright © 1987-2025
SimoTime Technologies and Services
All Rights Reserved
When technology complements business
http://www.simotime.com