Repository of Application Properties
 Management Information & Development Support
When technology complements business    Copyright © 1987-2012  SimoTime Enterprises  All Rights Reserved
  Table of Contents Version 11.03.22 
  Introduction
  Objectives and Prerequisites
  Prepare the Repository of Application Properties
  Using the Repository of Application Properties
  Using, Source Member Inventory with Line-Of-Code Counts
  Using, Source Member Inventory, List File in ASCII/Text Format
  Using, Source Member Inventory, List File in HTML Format
  Using, Source Member Inventory, List File in HTML Format with Hyperlinks
  Using, Scripted Batch Compiles
  Using, Creating Source Member Lists by Category
  Using, Batch Compiles using the Member Lists by Category
  Using, Cross Reference List
  Technical Details
  Technical Details, Record Structure for the Repository
  Technical Details, Command Files
  Technical Details, Command File, Source Member Properties, HTML Format
  Technical Details, Command File, Prepare and Execute a BMS Generation
  Technical Details, Command File, Create a List of BMS Members
  Technical Details, Command File, Scripted BMS Generation
  Technical Details, Command File, Prepare and Compile COBOL Programs
  Technical Details, Command File, Create Four Lists of COBOL Members by Category
  Technical Details, Command File, COBOL Compile for Batch without SQL
  Technical Details, Command File, COBOL Compile for Batch with SQL
  Technical Details, Command File, COBOL Compile for Online without SQL
  Technical Details, Command File, COBOL Compile for Online with SQL
  Technical Details, Command File, COBOL Compile to GNT Load Member
  Ancillary Functions
  Ancillary Function, Setting the Environment
  Ancillary Function, Displaying and Logging Messages
  Summary
  Software Agreement and Disclaimer
  Downloads and Links to Similar Pages
  Downloads and Links, Internet Access Required
  Downloads and Links, Local Access
  Glossary of Terms
  Comments, Suggestions or Feedback
  Company Overview
The SimoTime Home Page

Introduction
(Next) (Previous) (Table-of-Contents)

The suite of programs provides the capability of creating and managing a repository of information or "Repository for Application Properties" for the source code used by a mainframe application or group of applications. This information can be quite useful when supporting applications or migrating applications and data between a Mainframe System and a Linux, UNIX or Windows (LUW) System using Micro Focus technologies. This suite of programs (referred to as APMAST01) runs on a personal computer with Microsoft Windows (Windows/XP or later) and Micro Focus (Net Express 5.1 or later).

The information obtained from the source code scanning functionality provided by the SimoLYZE Utility Program (a separate package) will be used to initially create and/or update a repository (a Micro Focus Key-Sequenced-Data-Set or Indexed File) that contains application properties and management information. This data base will be referred to as the "Application Properties Repository" (or APMASTER) . This suite of programs is provided as an add-on or plug-in for the SimoLYZE Utility Program. The suite includes programs that will read the APMASTER and create various reports, listings, scripts and other information as described in the following sections of this document.

The source code, data sets and documentation are provided in a single zipped file called APMAST01.ZIP. This zipped file may be downloaded from the SimoTime Web site. This example illustrates the following functions.

Item Description
1 Download the source code from the Mainframe to a directory on a Windows System.
2 Scan the Source Members (using the SimoLYZE utility program) and create or update the Application Properties Repository (APMASTER.DAT).
3 Read the APMASTER and create a listing (an ASCII/Text File) of detailed information for each source member. Include a summary page by source member type.
4 Read the APMASTER and create an HTML document of detailed information by source member. Include a summary page by source member type. As an option provide hyperlinks from the HTML document to the source members.
  Functionality Provided by the Application Repository Management Programs

Objectives and Prerequisites
(Next) (Previous) (Table-of-Contents)

The purpose of this suite of programs is to assist in the defining of the scope of effort for migrating and/or maintaining a business application by providing information about the size and properties of the source members that are used in the building of a production application. When performing a task that requires an application change and/or redeployment a certain minimum level of information is required to determine the size and effort required. The following table list some of the items that provide this information.

Item Objective
1 Provide sizing information in the form of the number of programs, the type of programs and the line of code counts with a breakdown by code, comments and blank lines.
2 Provide sample scripts and source member lists by category for doing an automated application build (i.e. BMS Generations and COBOL Compilations).
3 Provide application documentation in various formats (ASCII/Text, HTML, Excel, etc.).
  Objectives for the Application Repository Management Programs

The suite of utility programs uses Micro Focus COBOL and Windows Command files. The programs are unit tested with Micro Focus Net Express, version 5.1. The full program or system testing is done on a Windows/7 system using Micro Focus Studio, Enterprise Edition. The programs are deployed on various versions of Windows (Window/XP and Windows Server 2008) using Micro Focus Server, Enterprise Edition.

Item Requirement
1 Hardware, a personal computer with a minimum of 2 gigabyte of memory and 30 gigabytes of disk
2 Operating System, Windows/7, Windows/XP or Windows Server 2008.
3 Net Exress 5.1 or later, this is required to compile and execute the COBOL programs and is available from Micro Focus
4 SimoLYZE, this is the minimum required to do the source member scanning and member typing and is available from SimoTime Enterprises. For large applications and Mainframe Migrations the Enterprise License for Application and Data Migration Technologies is recommended.
  Hardware and Software Prerequisites for the Application Repository Management Programs

Prepare the Repository of Application Properties
(Next) (Previous) (Table-of-Contents)

The Repository of Application Properties contains information about the application assets (or source members) used by an application designed to run in a mainframe-oriented environment. The repository and utility programs provide support for Mainframe Assembler Source Members, BMS Source Members, COBOL Source Members, IMS Source Members and JCL Source Members (including PROC's and INCLUDES). The utility programs will produce detailed documentation (HTML ot TEXT Format) about each source member and a summary of source members by member type.

To create a new Repository of Application Properties execute the (S1LOADE1.CMD) that will call other command files to build and populate the repository and then produce an HTML document. This link provides additional detail about  How to Create and Populate a Repository  of Application Properties.

C:\SIMOSAM1\ADM1> S1LOADE1 

An alternate is to simply click on the command member name from a Windows Explorer display. The following shows the content of the S1LOADE1.CMD file.

@echo OFF
echo * *******************************************************************
echo *               S1LOADE1.CMD - a Windows Command File               *
echo *         This program is provided by SimoTime Enterprises          *
echo *           (C) Copyright 1987-2011 All Rights Reserved             *
echo *             Web Site URL:   http://www.simotime.com               *
echo *                   e-mail:   helpdesk@simotime.com                 *
echo * *******************************************************************
rem  * This is a multi-step job that will create a new Repository for
rem  * the Application Properties (i.e. source member information).
rem  *
rem  * Once the repository is created the source members will be scanned
rem  * an the information will be saved.
rem  *
rem  * After completing the scans the collected data will be used to
rem  * create Cross Reference reporting and an HTML document with Summary
rem  * and Detail and hyperlinks to the source members.
rem  *
     call ..\Env1Base
     set JobName=S1LOADE1
rem  *
     call SimoNOTE "*******************************************%JobName%.CMD"
     call SimoNOTE "* Starting JobName %JobName%.CMD"
rem  *
     set SimoMODE=BATCH
rem  *
     call SimoNOTE "* Continue - Create a new Application Repository File"
     call S1ALOCE1
rem  *
     call SimoNOTE "* Continue - Create a new Cross Reference File"
     call S1XREFE9
rem  *
     call SimoNOTE "* Continue - Scan the BMS Source Members"
     call S1UBMSE1
rem  *
     call SimoNOTE "* Continue - Scan the COBOL Source Members"
     call S1UCBLE1
rem  *
     call SimoNOTE "* Continue - Scan the Assembler Source Members"
     call S1UASME1
rem  *
     call SimoNOTE "* Continue - Scan the JCL Source Members"
     call S1UJCLE1
rem  *
     call SimoNOTE "* Continue - Process the Cross Reference Information"
     call S1XREFE1
     call S1XREFE2
     call S1XREFE3
rem  *
     call SimoNOTE "* Continue - Create a new HTML File with Hyperlinks"
     call S1HTMLE3
rem  *
     call SimoNOTE "* Finished JobName %JobName%.CMD "
     if not "%SimoMODE%" == "BATCH" pause

The Repository of Application Properties includes the following detail for each source member.

1 Member Type (i.e. Assembler Program/Copyfile/Macro, COBOL Program/Copyfile, JCL JOB/PROC/INCLUDE and more)
2 Programming Language (i.e. Assembler, COBOL or JCL)
3 Total Record Count
4 Lines of Code
5 Comment Lines
6 Blank Lines
7 Member contains EXEC CICS statements
8 Member contains EXEC SQL ststements
  Detailed Information for Each Source Member

The following is a list of reports or HTML documents that may be created after the repository has been created and populated.

1 Produce an HTML Document with Summary Totals for Source Member Counts by Category and Lines of Code
2 Provide for optional Detail for sub-Totals of Lines-of-Code, Blank-Lines and Comment-Lines by Individual Source Members
3 Provide for optional Hyperlinks to Individual Source Members
4 Provide for optional Cross Referencing of Program Members and Copy Files
5 Provide for optional WIP
  Summary Reports produced from theInformation in the Application Repository

The following sections will provide examples of the summary information available from the Repository of Application Properties.

Using the Repository of Application Properties
(Next) (Previous) (Table-of-Contents)

The information stored in the repository may be used when performing various tasks associated with the maintenance and support of businees applications. For example, the repository knows which source members contain EXEC CICS and/or EXEC SQL statements and this information can be used to determine which compiler directives and preprocessors or required when compiling the individual programs.

The following sections describe some of the commands and programs that are included in the suite of programs used to create and manage the Repository of Application Properties.

Using, Source Member Inventory with Line-Of-Code Counts
(Next) (Previous) (Table-of-Contents)

One of the items produced while scanning a souce code member is the number of records within the member (or file). By itself this number could be misleading. Since the scanning process determines the language and member type it has the ability to determine what is a Line-of-Code, a comment and a blank line. These numbers as a group can be quite useful.

Using, Source Member Inventory, List File in ASCII/Text Format
(Next) (Previous) (Table-of-Contents)

A Windows command file S1LISTE1.CMD is used to read the Application Properties Repository (APMASTER) and produce a report of summary information for the source members. The following shows the command line syntax.

C:\SIMOSAM1\DEVL\Adm1\S1LISTE1

The following shows the content of the S1LISTE1.CMD file.

@echo OFF
      set CmdName=S1LISTE1
echo * Starting CmdName %CmdName%, User is %USERNAME%
echo **************************************************************
echo *           S1LISTE1.CMD - a Windows Command File            *
echo *     This program is provided by SimoTime Enterprises       *
echo *        (C) Copyright 1987-2011 All Rights Reserved         *
echo *          Web Site URL:   http://www.simotime.com           *
echo *                e-mail:   helpdesk@simotime.com             *
echo **************************************************************
echo * This procedure will read the Source Code Data Base and     *
echo * create a listing file that includes SUMMARY info only.     *
rem  **************************************************************
rem  * Set the required environmnet variables.
rem  *
     set JobStatus=0000
     call ..\Env1BASE
rem  * Override pointers to config and list file
     set SLZCONFG=%BaseLib1%\Adm1\CONFIGT1.CFG
     set APMASTER=%BaseLib1%\Adm1\DATA\UTIL\SIMOTIME.UTIL.APMASTER.DAT
     set APLIST01=%BaseLib1%\Adm1\DATA\UTIL\SIMOTIME.UTIL.APLIST01.TXT
rem  *
rem  **************************************************************
rem  * The following two statements will create a temporary
rem  * configuration file for the SimoLYZE List function.
rem  *
     echo APLISTC1 NODETAIL      > %SLZCONFG%
     echo APLISTC1 SUMMARY      >> %SLZCONFG%
rem  *
rem  **************************************************************
rem  * Run the List function and display the results with NotePAD.
rem  *
     run SIMOLYZE LIST
     if not "%ERRORLEVEL%" == "0" set JobStatus=0010
     if not "%JobStatus%" == "0000" goto :EojNOK
rem  *
rem  **************************************************************
rem  * End of Job.
:EojAOK
     echo * %CmdName% Notepad will display the list file in a separate window.
     echo * %CmdName% DataTAKE is %APMASTER%.
     echo * %CmdName% DataMAKE is %APLIST01%.
     START notepad %APLIST01%
     echo * Finished CmdName %CmdName%, Job Status is %JobStatus%
     goto :End
:EojNOK
     echo * %CmdName% slzCONFG is %slzCONFG%.
     echo * %CmdName% DataTAKE is %APMASTER%.
     echo * ABENDING CmdName %CmdName%, Job Status is %JobStatus%
     goto :End
:End
     if not "%1" == "nopause" pause

The following is an example of the summary information (in ASCII/Text format) that may be obtained from the Repository of Application Properties.

o


o


o


o


o


o


o


o


o
* APLISTC1 SimoLYZE - List Source Data Base v04.04.22 http://www.simotime.com *
* APLISTC1 Copyright 1987-2011 SimoTime Enterprises All Rights Reserved *
         
Language(Type) Members Records Comments Blanks CodeLines CICS SQL
COBOL (CBL) 82 31639 10898 2209 18532 1  
COBOL (CPY) 37 2761 908 77 1776    
370(370) 15 3462 1566 2 1894    
370(CPY) 1 23 7 0 16    
370(MAC) 6 171 111 3 57    
JCL(JCL) 110 6052 4097 1 1954    
JCL(PRC) 2 86 72 0 14    
JCL(INC) 0 0 0 0 0    
370(BMS) 1 137 9 0 128    
370(MFS) 0 0 0 0 0    
370(DBD) 0 0 0 0 0    
370(PSB) 0 0 0 0 0    
Unknown(UNK) 0 0 0 0 0    
Other(???) 0 0 0 0 0    
               
Subtotal (Known) 254 44331 17668 2292 24371    
Subtotal (UNK) 0 0 0 0 0    
TOTAL 254 44331 17668 2292 24371    
               
o


o


o


o


o


o


o


o


o

Using, Source Member Inventory, List File in HTML Format
(Next) (Previous) (Table-of-Contents)

A Windows command file S1HTMLE1.CMD is used to read the Application Properties Repository (APMASTER) and produce a report of detailed and summary information for the source members. The following shows the command line syntax.

C:\SIMOSAM1\DEVL\Adm1\S1HTMLE1

The following shows the content of the S1HTMLE1.CMD file.

@echo OFF
     set CmdName=S1HTMLE1
echo * *******************************************************************
echo *               S1HTMLE1.CMD - a Windows Command File               *
echo *         This program is provided by SimoTime Enterprises          *
echo *           (C) Copyright 1987-2011 All Rights Reserved             *
echo *             Web Site URL:   http://www.simotime.com               *
echo *                   e-mail:   helpdesk@simotime.com                 *
echo * *******************************************************************
echo * This job will read the Application Properties Repository and
echo * create an HTML file that includes DETAIL and SUMMARY information.
echo *
rem  *********************************************************************
rem  * Set the required environmnet variables.
rem  *
     set JobStatus=0000
     call ..\Env1BASE
     call SimoNOTE "************************************************************%CmdName%.CMD"
     call SimoNOTE "* Starting CmdName %CmdName%, Job Status is %JobStatus%"
     set APHTMHDR=c:\SimoLIBR\aphtmhdr.htm
     set APHTMFTR=c:\SimoLIBR\aphtmftr.htm
     set APHTMINC=c:\SimoLIBR\aphtminc.htm
     set APHTML01=%BaseLib1%\Adm1\HTML\apsamp01.htm
     set APMASTER=%BaseLib1%\Adm1\DATA\UTIL\SIMOTIME.UTIL.APMASTER.DAT
     set SLZCONFG=%BaseLib1%\Adm1\S1C4LYZ1.CFG
rem  *
rem  **************************************************************
rem  * Run the HTML function and display the results with IEXPLORE.
rem  *
     run APHTMLC1
     if not "%ERRORLEVEL%" == "0" set JobStatus=0010
     if not "%JobStatus%" == "0000" goto :EojNOK
rem  *
rem  **************************************************************
rem  * End of Job.
:EojAOK
     call SimoNOTE "* DataTAKE is %APMASTER%."
     call SimoNOTE "* DataMAKE is %APHTML01%."
     call SimoNOTE "* StepInfo Internet Explorer will display the HTML file in a separate window."
     START iexplore %APHTML01%
     call SimoNOTE "* Finished CmdName %CmdName%, Job Status is %JobStatus%"
     goto :End
:EojNOK
     call SimoNOTE "* DataTAKE is %APMASTER%."
     call SimoNOTE "* ABENDING CmdName %CmdName%, Job Status is %JobStatus% "
     goto :End
:End
     if not "%SimoMODE%" == "BATCH" pause


The following is an example of the detail and summary information (in HTML format) that may be obtained from the Repository of Application Properties.

The following shows the detailed information of the individual source members.

Member Name Language Type of Member Record Count Comment Lines Blank Lines Lines of Code CICS SQL
A2E512IO.CBL CBL CBL 382 87 24 271 N N
A2E512J1.JCL JCL JCL 60 44 0 16 N N
A2E512R1.CBL CBL CBL 37 16 3 18 N N
AB0048C1.CBL CBL CBL 59 24 5 30 N N
and more... JCL JCL 24 21 0 3 N N

This following table is a summary of member information by programming group with totals for all source members.

Language(Type) Members Record Count Comment Lines Blank Lines Lines of Code CICS SQL
COBOL(CBL) 235 94,334 23,329 6,705 64,300 13 12
COBOL(CPY) 148 13,837 3,342 177 10,318 0 4
370(370) 29 3,600 1,588 5 2,007 0 0
370(CPY) 2 46 14 0 32 0 0
370(MAC) 6 181 121 3 57 0 0
JCL(JCL) 378 20,852 13,427 12 5,359 0 0
JCL(PRC) 12 401 296 0 95 0 0
JCL(INC) 4 31 26 0 5 0 0
370(BMS) 10 1,770 74 0 1,696 0 0
370(MFS) 0 0 0 0 0 0 0
370(DBD) 0 0 0 0 0 0 0
370(PSB) 0 0 0 0 0 0 0
Unknown(UNK ) 1 6 0 0 0 0 0
Other(???) 0 0 0 0 0 0 0
SubTotal(Known) 824 135,052 42,217 6,902 83,869 0 0
SubTotal(UNK) 1 6 0 0 0 0 0
Final Total 825 135,058 42,217 6,902 83,869 0 0

Using, Source Member Inventory, List File in HTML Format with Hyperlinks
(Next) (Previous) (Table-of-Contents)

A Windows command file S1HTMLE3.CMD is used to read the Application Properties Repository (APMASTER) and produce a report of detailed and summary information for the source members. The following shows the command line syntax.

This program is very similar to the preceding program with one exception. The Member Name in the first column of the detailed member list is hyperlinked to the source member.

C:\SIMOSAM1\DEVL\Adm1\S1HTMLE3

The following shows the content of the S1HTMLE3.CMD file.

@echo OFF
     set CmdName=S1HTMLE3
echo * *******************************************************************
echo *               S1HTMLE3.CMD - a Windows Command File               *
echo *         This program is provided by SimoTime Enterprises          *
echo *           (C) Copyright 1987-2011 All Rights Reserved             *
echo *             Web Site URL:   http://www.simotime.com               *
echo *                   e-mail:   helpdesk@simotime.com                 *
echo * *******************************************************************
echo * This job will read the Application Properties Repository and
echo * create an HTML file that includes DETAIL and SUMMARY information
echo * information with Hyperlinks to the Source Members.
echo * *******************************************************************
rem  * Set the required environmnet variables.
rem  *
     set JobStatus=0000
     call ..\Env1BASE
     call SimoNOTE "************************************************************%CmdName%.CMD"
     call SimoNOTE "* Starting CmdName %CmdName%, Job Status is %JobStatus%"
     set APHTMHDR=c:\SimoLIBR\aphtmhdr.htm
     set APHTMFTR=c:\SimoLIBR\aphtmftr.htm
     set APHTMINC=c:\SimoLIBR\aphtminc.htm
     set APHTML01=%BaseLib1%\Adm1\HTML\aphtml03.htm
     set APMASTER=%BaseLib1%\Adm1\DATA\UTIL\SIMOTIME.UTIL.APMASTER.DAT
     set SLZCONFG=%BaseLib1%\Adm1\S1C4LYZ3.CFG
rem  *
rem  **************************************************************
rem  * Run the HTML function and display the results with IEXPLORE.
rem  *
     run APHTMLC1
     if not "%ERRORLEVEL%" == "0" set JobStatus=0010
     if not "%JobStatus%" == "0000" goto :EojNOK
rem  *
rem  **************************************************************
rem  * End of Job.
:EojAOK
     call SimoNOTE "* SLZCONFG is %SLZCONFG%
     call SimoNOTE "* DataTAKE is %APMASTER%."
     call SimoNOTE "* DataMAKE is %APHTML01%."
     call SimoNOTE "* StepInfo Internet Explorer will display the HTML file in a separate window."
     START iexplore %APHTML01%
     call SimoNOTE "* Finished CmdName %CmdName%, Job Status is %JobStatus%"
     goto :End
:EojNOK
     call SimoNOTE "* DataTAKE is %APMASTER%."
     call SimoNOTE "* ABENDING CmdName %CmdName%, Job Status is %JobStatus% "
     goto :End
:End
     if not "%SimoMODE%" == "BATCH" pause


Using, Scripted Batch Compiles
(Next) (Previous) (Table-of-Contents)

This approach provides a documented, repeatable process that can be executed on demand or scheduled to run without operator intervention.

Using, Creating Source Member Lists by Category
(Next) (Previous) (Table-of-Contents)

The following command file (CBLISTE4.CMD) will read the Application Properties Repository or APMASTER.DAT and create four (4) sequential files in ASCII/Text format. Each file contains a list of COBOL source members. The list files are categorized based on the COBOL source member properties for batch without SQL, batch with SQL, online with CICS and without SQL and online with CICS and SQL. This determines the directives files and precompilers to be used as part of the compilation process.

@echo OFF
     set CmdName=CBLISTE4
     call SimoNOTE "Starting CmdName %CmdName%, User is %USERNAME%"
echo *********************************************************************
echo *              CBLISTE4.CMD - a Windows Command File                *
echo *        This program is provided by SimoTime Enterprises           *
echo *           (C) Copyright 1987-2011 All Rights Reserved             *
echo *             Web Site URL:   http://www.simotime.com               *
echo *                   e-mail:   helpdesk@simotime.com                 *
echo *********************************************************************
rem  *
rem  * This command will read the Application Properties Repository and
rem  * create four list files as follows.
rem  * 1. A list of COBOL batch programs without SQL.
rem  * 2. A list of COBOL batch programs with SQL.
rem  * 3. A list of COBOL online programs with CICS and without SQL.
rem  * 4. A list of COBOL online programs with CICS and with SQL.
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  *
     call ..\Env1Base
     set JobStatus=0000
     call SimoNOTE "*******************************************************************%CmdName%.CMD"
     call SimoNOTE "* This job will read the Application Properties Repository"
     call SimoNOTE "* or APMASTER and create 4 lists of CBL Member Names"
     call SimoNOTE "* 1. CBLBATL1.LST - List of batch programs without EXEC SQL. *"
     call SimoNOTE "* 2. CBLBSQL1.LST - List of batch programs with EXEC SQL.    *"
     call SimoNOTE "* 3. CBLONLL1.LST - List of CICS programs without EXEC SQL.  *"
     call SimoNOTE "* 4. CBLOSQL1.LST - List of CICS programs with EXEC SQL.     *"
     call SimoNOTE "* Starting CmdName %CmdName%.CMD, V09.07.25, User is %USERNAME%"
rem  *
rem  **************************************************************
rem  * Run the List function and create the listing file.
rem  *
     set APMASTER=%BaseLib1%\Adm1\DATA\UTIL\SIMOTIME.UTIL.APMASTER.DAT
     set CBLBATL1=%BASELIB1%\Adm1\DATA\UTIL\SIMOTIME.UTIL.CBLBATL1.LST
     set CBLBSQL1=%BASELIB1%\Adm1\DATA\UTIL\SIMOTIME.UTIL.CBLBSQL1.LST
     set CBLONLL1=%BASELIB1%\Adm1\DATA\UTIL\SIMOTIME.UTIL.CBLONLL1.LST
     set CBLOSQL1=%BASELIB1%\Adm1\DATA\UTIL\SIMOTIME.UTIL.CBLOSQL1.LST
     run APLISTC4
     if not "%ERRORLEVEL%" == "0" set JobStatus=0020
     if not "%JobStatus%" == "0000" goto EojNOK2
rem  *
rem  **************************************************************
rem  * End of Job.
:EojAOK
     call SimoNOTE "* %CmdName% DataTAKE is %APMASTER%."
     call SimoNOTE "* %CmdName% DataMAKE is %CBLBATL1%."
     call SimoNOTE "* %CmdName% DataMAKE is %CBLBSQL1%."
     call SimoNOTE "* %CmdName% DataMAKE is %CBLONLL1%."
     call SimoNOTE "* %CmdName% DataMAKE is %CBLOSQL1%."
     call SimoNOTE "* Finished CmdName %CmdName%, Job Status is %JobStatus% "
     goto :End
:EojNOK1
     call SimoNOTE "* ABENDING CmdName %CmdName%, must run set process "
:EojNOK2
     call SimoNOTE "* %CmdName% is ABENDING>>%BaseLib1%\LOGS\ABENDLOG.TXT"
:EojNOK
     call SimoNOTE "* ABENDING CmdName %CmdName%, Job Status is %JobStatus% "
     goto :End
:End
     if not "%1" == "nopause" pause

Using, Batch Compiles using the Member Lists by Category
(Next) (Previous) (Table-of-Contents)

The batch compiles may be executed on demand or scheduled to run without operator intervention.

Explore A Scripted Build for additional information about how to do an automated, unattended build of an application that was migrated from a Mainframe System.

Using, Cross Reference List
(Next) (Previous) (Table-of-Contents)

WIP

Technical Details
(Next) (Previous) (Table-of-Contents)

This section provides a technical overview of the job scripts, programs and data used by the technical administrative tasks.

Technical Details, Record Structure for the Repository
(Next) (Previous) (Table-of-Contents)

The following COBOL copy file (APMASTB1.CPY) shows the record structure for the Application Properties Repository or APMASTER.DAT. The record structure is Fixed Field Length (FFL) format.

      *****************************************************************
      *                APMASTB1 is a COBOL Copy File                  *
      *    Copy File for SIMOLYZE Application Properties Repository   *
      *      This is a VSAM Keyed Sequence Data Structure (KSDS)      *
      *              or a Micro Focus Keyed-Index File.               *
      *         Copyright (C) 1987-2012 SimoTime Enterprises          *
      *                     All Rights Reserved                       *
      *****************************************************************
      *              Provided by SimoTime Enterprises                 *
      *        Our e-mail address is: helpdesk@simotime.com           *
      *     Also, visit our Web Site at http://www.simotime.com       *
      *****************************************************************
      *
       01  APMASTER-RECORD.
           05  APMASTER-KEY.
               10  APMASTER-KEY-16             PIC X(16).
               10  APMASTER-RECORD-ID          PIC 9(2).
           05  APMASTER-DATA.
               10  APMASTER-RECORD-STATUS      PIC X.
               10  APMASTER-LAST-ACTIVITY-DATE PIC X(8).
               10  APMASTER-LAST-ACTIVITY-TIME PIC X(8).
               10  APMASTER-MEMBER-DATE        PIC X(8).
               10  APMASTER-MEMBER-TIME        PIC X(8).
               10  APMASTER-LANGUAGE           PIC X(8).
               10  APMASTER-LANGUAGE-USER      PIC X(8).
               10  APMASTER-LANGUAGE-MFA       PIC X(8).
               10  APMASTER-TYPE               PIC X(8).
               10  APMASTER-TYPE-USER          PIC X(8).
               10  APMASTER-TYPE-MFA           PIC X(8).
               10  APMASTER-CICS               PIC X.
               10  APMASTER-CICS-USER          PIC X.
               10  APMASTER-CICS-MFA           PIC X.
               10  APMASTER-SQL                PIC X.
               10  APMASTER-SQL-USER           PIC X.
               10  APMASTER-SQL-MFA            PIC X.
               10  APMASTER-FLAGS.
                   15  APMASTER-FLAG-01        PIC X.
                   15  APMASTER-FLAG-02        PIC X.
                   15  APMASTER-FLAG-03        PIC X.
                   15  APMASTER-FLAG-04        PIC X.
                   15  APMASTER-FLAG-05        PIC X.
                   15  APMASTER-FLAG-06        PIC X.
                   15  APMASTER-FLAG-07        PIC X.
                   15  APMASTER-FLAG-08        PIC X.
               10  APMASTER-FLAGS-USER.
                   15  APMASTER-FLAG-U1        PIC X.
                   15  APMASTER-FLAG-U2        PIC X.
                   15  APMASTER-FLAG-U3        PIC X.
                   15  APMASTER-FLAG-U4        PIC X.
                   15  APMASTER-FLAG-U5        PIC X.
                   15  APMASTER-FLAG-U6        PIC X.
                   15  APMASTER-FLAG-U7        PIC X.
                   15  APMASTER-FLAG-U8        PIC X.
               10  APMASTER-RECORDS            PIC 9(8).
               10  APMASTER-BLANK-LINES        PIC 9(8).
               10  APMASTER-COMMENTS           PIC 9(8).
               10  APMASTER-LINES-OF-CODE      PIC 9(8).
               10  APMASTER-LA-DATE            PIC X(8).
               10  APMASTER-LA-TIME            PIC X(8).
               10  APMASTER-LA-TOKEN           PIC 9(3).
               10  APMASTER-FILLER-00          PIC X(100).
               10  APMASTER-MVS-MEMBER-NAME    PIC X(16).
               10  APMASTER-PCNAME             PIC X(256).
               10  APMASTER-MAKEACTION         PIC X(224).
               10  APMASTER-HOSTNAME           PIC X(256).
      *
      ***  APMASTB1 - End-of-Copy File - - - - - - - - - - - APMASTB1 *
      *****************************************************************
      *

Technical Details, Command Files
(Next) (Previous) (Table-of-Contents)

This section describes some of the Windows Command files used in the processes associated with managing the Application Properties Repository and doing scripted builds of the applications.

Technical Details, Command File, Source Member Properties, HTML Format
(Next) (Previous) (Table-of-Contents)

WIP

The following (APHTMLE1.CMD) is the source listing for the CMD file that creates the HTML Documentation.

@echo OFF
     set CmdName=S1HTMLE1
echo * *******************************************************************
echo *               S1HTMLE1.CMD - a Windows Command File               *
echo *         This program is provided by SimoTime Enterprises          *
echo *           (C) Copyright 1987-2011 All Rights Reserved             *
echo *             Web Site URL:   http://www.simotime.com               *
echo *                   e-mail:   helpdesk@simotime.com                 *
echo * *******************************************************************
echo * This job will read the Application Properties Repository and
echo * create an HTML file that includes DETAIL and SUMMARY information.
echo *
rem  *********************************************************************
rem  * Set the required environmnet variables.
rem  *
     set JobStatus=0000
     call ..\Env1BASE
     call SimoNOTE "************************************************************%CmdName%.CMD"
     call SimoNOTE "* Starting CmdName %CmdName%, Job Status is %JobStatus%"
     set APHTMHDR=c:\SimoLIBR\aphtmhdr.htm
     set APHTMFTR=c:\SimoLIBR\aphtmftr.htm
     set APHTMINC=c:\SimoLIBR\aphtminc.htm
     set APHTML01=%BaseLib1%\Adm1\HTML\apsamp01.htm
     set APMASTER=%BaseLib1%\Adm1\DATA\UTIL\SIMOTIME.UTIL.APMASTER.DAT
     set SLZCONFG=%BaseLib1%\Adm1\S1C4LYZ1.CFG
rem  *
rem  **************************************************************
rem  * Run the HTML function and display the results with IEXPLORE.
rem  *
     run APHTMLC1
     if not "%ERRORLEVEL%" == "0" set JobStatus=0010
     if not "%JobStatus%" == "0000" goto :EojNOK
rem  *
rem  **************************************************************
rem  * End of Job.
:EojAOK
     call SimoNOTE "* DataTAKE is %APMASTER%."
     call SimoNOTE "* DataMAKE is %APHTML01%."
     call SimoNOTE "* StepInfo Internet Explorer will display the HTML file in a separate window."
     START iexplore %APHTML01%
     call SimoNOTE "* Finished CmdName %CmdName%, Job Status is %JobStatus%"
     goto :End
:EojNOK
     call SimoNOTE "* DataTAKE is %APMASTER%."
     call SimoNOTE "* ABENDING CmdName %CmdName%, Job Status is %JobStatus% "
     goto :End
:End
     if not "%SimoMODE%" == "BATCH" pause


Technical Details, Command File, Prepare and Execute a BMS Generation
(Next) (Previous) (Table-of-Contents)

The scripted BMS Generation for multiple BMS Members uses a "List of Member Names" stored in an ASCII/Text file. Once the list is created a Windows Command File with a "FOR" loop will access the List of Member Names and execute the BMS Generation process for each BMS member.

Technical Details, Command File, Create a List of BMS Members
(Next) (Previous) (Table-of-Contents)

Creating an ASCII/Text file with a list of BMS Member names can be done maually using a file editor such as Microsoft NotePad. The BMS Member name is the 8-byte (or less) member name without a file extension. Doing this manually may be a good choice for a small number of BMS Members.

However, when there is a large number of BMS Members an automated process may be a better alternative. If the SimoLYZE function was used to do member typing and create an Application Properties Repository a command script and a program are provided to create a BMS Member list. This sample script (BMLISTE3.CMD) will access the Application Properties Repository (APMASTER.DAT) and create a list of BMS member names. The following shows the Windows command script.

@echo OFF
     set CmdName=BMLISTE3
     call SimoNOTE "Starting CmdName %CmdName%, User is %USERNAME%"
echo *********************************************************************
echo *              BMLISTE3.CMD - a Windows Command File                *
echo *        This program is provided by SimoTime Enterprises           *
echo *           (C) Copyright 1987-2011 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
rem  *                   or log file.
rem  *
     call ..\Env1Base
     set JobStatus=0000
     call SimoNOTE "*******************************************************************%CmdName%.CMD"
     call SimoNOTE "* This job will read the Application Properties Repository"
     call SimoNOTE "* or APMASTER and create a list of BMS Member Names"
     call SimoNOTE "* Starting CmdName %CmdName%.CMD, V09.07.25, User is %USERNAME%"
rem  *
rem  * Set the selection criteria
     set APMEMLANG=370
     set APMEMTYPE=BMS
     set APCICSSTAT=*
     set APSQLSTAT=*
rem  *
rem  **************************************************************
rem  * Run the List function and create the listing file.
rem  *
     set APMASTER=%BaseLib1%\Adm1\DATA\UTIL\SIMOTIME.UTIL.APMASTER.DAT
     set APLIST03=%BASELIB1%\Adm1\DATA\UTIL\SIMOTIME.UTIL.BMSMEML1.LST
     if exist %APLIST03% erase %APLIST03%
     run APLISTC3
     if not "%ERRORLEVEL%" == "0" set JobStatus=0020
     if not "%JobStatus%" == "0000" goto EojNOK2
rem  *
rem  **************************************************************
rem  * End of Job.
:EojAOK
     call SimoNOTE "* %CmdName% DataTAKE is %APMASTER%."
     call SimoNOTE "* %CmdName% DataMAKE is %APLIST03%."
     call SimoNOTE "* Finished CmdName %CmdName%, Job Status is %JobStatus% "
     goto :End
:EojNOK1
     call SimoNOTE "* ABENDING CmdName %CmdName%, must run set process "
:EojNOK2
     call SimoNOTE "* %CmdName% is ABENDING>>%BaseLib1%\LOGS\ABENDLOG.TXT"
:EojNOK
     call SimoNOTE "* ABENDING CmdName %CmdName%, Job Status is %JobStatus% "
     goto :End
:End
     if not "%1" == "nopause" pause

Technical Details, Command File, Scripted BMS Generation
(Next) (Previous) (Table-of-Contents)

This sample job (BMGENAE1.CMD) will read the list of BMS Source Member names and use a Windows "FOR" loop to Generate a BMS Load Member and a BMS Copy File for each BMS member. This script will call a second command file (ZBMSGENR.CMD) to do the actual BMS Generation. The following is the content of the two command file.

@echo OFF
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 or
rem  *                   log file.
rem  * 3. ZBMSGENR.CMD - this will do the generation of the specified member.
rem  * ************************************************************************
     setlocal
     call ..\Env1Base
     set CmdName=BMGENAE1
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\DATA\UTIL\SIMOTIME.UTIL.BMSMEML1.LST
     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

This preceding job (or script) calls a second command file (ZBMSGENR.CMD) to do the actual BMS Generation. The following is the content of the second 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  * 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 /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 "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 "ABENDING JobStep ZBMSGENR, Status is %BMSgenerateStatus%, BMS Member is %1"
     echo %1>%BaseLib1%\LOGS\%1.ERR
     goto :End
rem  *
rem  * ************************************************************************
:End

Technical Details, Command File, Prepare and Compile COBOL Programs
(Next) (Previous) (Table-of-Contents)

This section will focus on creating an automated and unattended batch process to build the load members from the COBOL source code.

Technical Details, Command File, Create Four Lists of COBOL Members by Category
(Next) (Previous) (Table-of-Contents)

This process will read the Application Properties Repository and create four list files.

The following table describes the four (4) list files and the corresponding categories of COBOL Programs.

CBLBATL1 A list of COBOL batch programs without SQL.
CBLBSQL1 A list of COBOL batch programs with SQL.
CBLONLL1 A list of COBOL online programs without SQL and with CICS.
CBLOSQL1 A list of COBOL batch programs with SQL and with CICS.
 The Categories of COBOL Programs for Scripted Compile

The list files are in ASCII/Text Format. The followng shows the content of a sample command file.

@echo OFF
     set CmdName=CBLISTE4
     call SimoNOTE "Starting CmdName %CmdName%, User is %USERNAME%"
echo *********************************************************************
echo *              CBLISTE4.CMD - a Windows Command File                *
echo *        This program is provided by SimoTime Enterprises           *
echo *           (C) Copyright 1987-2011 All Rights Reserved             *
echo *             Web Site URL:   http://www.simotime.com               *
echo *                   e-mail:   helpdesk@simotime.com                 *
echo *********************************************************************
rem  *
rem  * This command will read the Application Properties Repository and
rem  * create four list files as follows.
rem  * 1. A list of COBOL batch programs without SQL.
rem  * 2. A list of COBOL batch programs with SQL.
rem  * 3. A list of COBOL online programs with CICS and without SQL.
rem  * 4. A list of COBOL online programs with CICS and with SQL.
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  *
     call ..\Env1Base
     set JobStatus=0000
     call SimoNOTE "*******************************************************************%CmdName%.CMD"
     call SimoNOTE "* This job will read the Application Properties Repository"
     call SimoNOTE "* or APMASTER and create 4 lists of CBL Member Names"
     call SimoNOTE "* 1. CBLBATL1.LST - List of batch programs without EXEC SQL. *"
     call SimoNOTE "* 2. CBLBSQL1.LST - List of batch programs with EXEC SQL.    *"
     call SimoNOTE "* 3. CBLONLL1.LST - List of CICS programs without EXEC SQL.  *"
     call SimoNOTE "* 4. CBLOSQL1.LST - List of CICS programs with EXEC SQL.     *"
     call SimoNOTE "* Starting CmdName %CmdName%.CMD, V09.07.25, User is %USERNAME%"
rem  *
rem  **************************************************************
rem  * Run the List function and create the listing file.
rem  *
     set APMASTER=%BaseLib1%\Adm1\DATA\UTIL\SIMOTIME.UTIL.APMASTER.DAT
     set CBLBATL1=%BASELIB1%\Adm1\DATA\UTIL\SIMOTIME.UTIL.CBLBATL1.LST
     set CBLBSQL1=%BASELIB1%\Adm1\DATA\UTIL\SIMOTIME.UTIL.CBLBSQL1.LST
     set CBLONLL1=%BASELIB1%\Adm1\DATA\UTIL\SIMOTIME.UTIL.CBLONLL1.LST
     set CBLOSQL1=%BASELIB1%\Adm1\DATA\UTIL\SIMOTIME.UTIL.CBLOSQL1.LST
     run APLISTC4
     if not "%ERRORLEVEL%" == "0" set JobStatus=0020
     if not "%JobStatus%" == "0000" goto EojNOK2
rem  *
rem  **************************************************************
rem  * End of Job.
:EojAOK
     call SimoNOTE "* %CmdName% DataTAKE is %APMASTER%."
     call SimoNOTE "* %CmdName% DataMAKE is %CBLBATL1%."
     call SimoNOTE "* %CmdName% DataMAKE is %CBLBSQL1%."
     call SimoNOTE "* %CmdName% DataMAKE is %CBLONLL1%."
     call SimoNOTE "* %CmdName% DataMAKE is %CBLOSQL1%."
     call SimoNOTE "* Finished CmdName %CmdName%, Job Status is %JobStatus% "
     goto :End
:EojNOK1
     call SimoNOTE "* ABENDING CmdName %CmdName%, must run set process "
:EojNOK2
     call SimoNOTE "* %CmdName% is ABENDING>>%BaseLib1%\LOGS\ABENDLOG.TXT"
:EojNOK
     call SimoNOTE "* ABENDING CmdName %CmdName%, Job Status is %JobStatus% "
     goto :End
:End
     if not "%1" == "nopause" pause

Technical Details, Command File, COBOL Compile for Batch without SQL
(Next) (Previous) (Table-of-Contents)

This sample job (CBBATAE1.CMD) will read the list of COBOL Source Member names and use a Windows "FOR" loop to compile the Load Members. This script will call a second command file (ZBMSGENR.CMD) to do the actual COBOL compile. The following is the content of the CBLBATE1.CMD command file.

@echo OFF
echo *********************************************************************
echo *              CBBATAE1.CMD - a Windows Command File                *
echo *        This program is provided by SimoTime Enterprises           *
echo *           (C) Copyright 1987-2011 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
     set CmdName=CBBATAE1
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%\OS390AscCBLBAT.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.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

Technical Details, Command File, COBOL Compile for Batch with SQL
(Next) (Previous) (Table-of-Contents)

This sample job (CBBSQAE1.CMD) will read the list of COBOL Source Member names and use a Windows "FOR" loop to compile the Load Members. This script will call a second command file (ZBMSGENR.CMD) to do the actual COBOL compile. The following is the content of the CBLBSQE1.CMD command file.

@echo OFF
echo *********************************************************************
echo *              CBBSQAE1.CMD - a Windows Command File                *
echo *        This program is provided by SimoTime Enterprises           *
echo *           (C) Copyright 1987-2011 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\DATA\UTIL\SIMOTIME.UTIL.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

Technical Details, Command File, COBOL Compile for Online without SQL
(Next) (Previous) (Table-of-Contents)

This sample job (CBONLAE1.CMD) will read the list of COBOL Source Member names and use a Windows "FOR" loop to compile the Load Members. This script will call a second command file (ZBMSGENR.CMD) to do the actual COBOL compile. The following is the content of the CBLBSQE1.CMD command file.

@echo OFF
echo *********************************************************************
echo *              CBONLAE1.CMD - a Windows Command File                *
echo *        This program is provided by SimoTime Enterprises           *
echo *           (C) Copyright 1987-2011 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%\OS390AscCBLONL.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.CBLONLL1.LST
     for /F "eol=; tokens=1,2* delims=." %%i in (%MemberList%) do call zCBL2GNT %%i COBOLCS1 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

Technical Details, Command File, COBOL Compile for Online with SQL
(Next) (Previous) (Table-of-Contents)

This sample job (CBOSQAE1.CMD) will read the list of COBOL Source Member names and use a Windows "FOR" loop to compile the Load Members. This script will call a second command file (ZBMSGENR.CMD) to do the actual COBOL compile. The following is the content of the CBLBSQE1.CMD command file.

@echo OFF
echo *********************************************************************
echo *              CBOSQAE1.CMD - a Windows Command File                *
echo *        This program is provided by SimoTime Enterprises           *
echo *           (C) Copyright 1987-2011 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\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

Technical Details, Command File, COBOL Compile to GNT Load Member
(Next) (Previous) (Table-of-Contents)

This preceding jobs (or script) call a second command file (ZCBL2GNT.CMD) to do the actual COBOL compilation.

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 various
rem  *               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 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  * ---------  ------------------------------------------------------------
rem  *    4.      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 use
rem  * the directives file specified in the zDIRS environment variable. The
rem  * second statement will then check for a .DIR file with the same name as
rem  * the program. 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, RC=%Compile2GNTStatus%, PGM=%1"
     goto :End
rem  *
rem  * ************************************************************************
:Compile2GNTNOK
     set JobStatus=%Compile2GNTStatus%
     set /A NOK_Count=%NOK_Count% + 1
     call SimoNOTE "ABENDING ZCBL2GNT, RC=%Compile2GNTStatus%, PGM=%1, !!!ABENDING!!!"
     echo %1 - Error during Compile, refer to %BaseLib1%\LIST\%1.LST>%BaseLib1%\LOGS\%1.ERR
     goto :End
rem  *
rem  * ************************************************************************
:End

Ancillary Functions
(Next) (Previous) (Table-of-Contents)

This section provides technical detail about the supporting scripts and programs used or called by the primary jobs.

Ancillary Function, Setting the Environment
(Next) (Previous) (Table-of-Contents)

A command file (ENV1BASE.CMD located in the base directory (SIMOSAM1 for this example) and 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 Enterprises           *
rem  *           (C) Copyright 1987-2012 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 Enterprises
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 BaseLib1=c:\SimoSAM1\DEVL
     set BaseLib8=c:\SimoSAM8
     set SAM1ANIM=C:\SIMOSAM1\DEVL\SAM1SOL1\SAMBATG1\bin\x86\Debug
     set BASEAPP=%BaseLib1%
     set BASESYS=%BaseLib1%\SYS1
     set BASECAT=%BaseLib1%\DATA
     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\SYSOUT_SIMONOTE.TXT
     set SimoNOTE=%BASEAPP%\LOGS\SYSOUT_SIMONOTE.TXT
     set MIFOBASE="C:\Program Files (x86)\Micro Focus\Studio Enterprise Edition 6.0\Base"
     set MIFOBIN=%MIFOBASE%\bin
rem  *
     set SimoLIBR=c:\SimoLIBR
     set JESSERVERNAME=SIMOBATA
rem  *     set SIMOMODE=PAUSE
rem  *
     set MAINFRAME_FLOATING_POINT=true
     set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy6;c:\SimoLIBR;%MIFOBASE%\SOURCE
     set COBIDY=%BASEAPP%\COBIDY
rem  * For large file support and record locking control of File Handler
     set EXTFH=%BASESYS%\CONFIG\EXTFHBIG.CFG
rem  * For Sort Resource Allocation and Performance
     set SORTSPACE=1000000
     set ES_ALLOC_OVERRIDE=%BASESYS%\CONFIG\CATMAPA1.cfg
     set COBCONFIG_=%BASESYS%\CONFIG\diagnose.cfg
rem  * Set environment for MFBSI (Micro Focus Batch Scheduling Interface)
     set ES_EMP_EXIT_1=mfbsiemx
     set MFBSI_DIR=%BASESYS%\LOGS\%ezServerName%
     set MFBSIEOP_CMD=ENABLE
     set MFBSIEOP_CSV=ENABLE
     set MFBSIEOP_HTM=ENABLE
     set MFBSIEOP_XML=ENABLE
rem  * Set Behavior and Trace Flags for GETJOBDD
     set JDDFLAGS=nnnWnnnn/nnnnnnnn
rem  *
     if "%SIMOPATH%" == "Y" goto JUMPPATH
     set path=%MIFOBASE%;%MIFOBIN%;%PATH%;
     set COBPATH=.;%BASEAPP%\LOADLIB;%BASESYS%\LOADLIB;C:\SimoLIBR
     set LIBPATH=.;%BASEAPP%\LOADLIB;%BASESYS%\LOADLIB;C:\SimoLIBR
     set TXDIR=%BASESYS%\LOADLIB;%MIFOBASE%
:JUMPPATH
     set SIMOPATH=Y
     set JobStatus=0000
     call SimoNOTE "* Settings CmdName Env1BASE.CMD, Version 10.04.19"
     call SimoNOTE "* BaseAPP is %BASEAPP%"

Ancillary Function, Displaying and Logging Messages
(Next) (Previous) (Table-of-Contents)

The following (SimoNOTE.CMD) is a listing of the contents of the SimoNOTE.CMD command file. The command is used to provide a consistent process for logging and displaying messages.

@echo OFF
rem  * *******************************************************************
rem  *         This program is provided by SimoTime Enterprises          *
rem  *            (C) Copyright 1987-2012 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 Enterprises
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

Summary
(Next) (Previous) (Table-of-Contents)

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 documents and the links to other documents are intended to provide a choice of alternatives.

Software Agreement and Disclaimer
(Next) (Previous) (Table-of-Contents)

Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Enterprises. 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 Enterprises.

SimoTime Enterprises 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 Enterprises shall not be liable for any direct, indirect, special or consequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software, documentation or training material.

Downloads and Links to Similar Pages
(Next) (Previous) (Table-of-Contents)

This section includes links to documents with additional information that is beyond the scope and purpose of this document. The first sub-section requires an internet connection, the second sub-section references locally available documents.

Downloads and Links, Internet Access Required
(Next) (Previous) (Table-of-Contents)

The following links will require an internet connect.

A good place to start is The SimoTime Home Page for access to white papers, program examples and product information.

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 non-Relational Data Connection for more examples of accessing methodologies and coding techniques for Data Files and VSAM Data Sets.

Explore The Micro Focus Web Site for more information about products and services available from Micro Focus.

Downloads and Links, Local Access
(Next) (Previous) (Table-of-Contents)

The following links should be accessible without an internet connection.

Explore The File Status Return Codes to interpret the results of accessing VSAM data sets and QSAM files.

Glossary of Terms
(Next) (Previous) (Table-of-Contents)

Check out  The SimoTime Glossary  for a list of terms and definitions used in the documents provided by SimoTime.

Comments, Suggestions or Feedback
(Next) (Previous) (Table-of-Contents)

This document was created and is maintained by SimoTime Enterprises.

If you have any questions, suggestions, comments or feedback please call or send an e-mail to: helpdesk@simotime.com

We appreciate hearing from you.

Company Overview
(Next) (Previous) (Table-of-Contents)

Founded in 1987, SimoTime Enterprises 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. This includes the smallest thin client using the Internet and the very large mainframe systems. There is more to making the Internet work for your company's business than just having a nice looking WEB site. It is about combining the latest technologies and existing technologies with practical business experience. It's about the business of doing business and looking good in the process. 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.

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
Repository of Application Properties, Management Information & Development Support
Copyright © 1987-2012 SimoTime Enterprises  All Rights Reserved
When technology complements business
http://www.simotime.com