The ezSERIES
When technology complements business   Micro Focus Enterprise Server
Copyright © 1987-2008  SimoTime Enterprises, LLC  All Rights Reserved http://www.simotime.com

 
Introduction Version 08.01.14
  Quick Start
 
  Quick Start, Start a Server
  Quick Start, Stop a Server
  Quick Start, Submit a Job
  Quick Start, Schedule a Job
  Additional ezSERIES Commands
 
  ezEXEC, Run a COBOL Program
  ezCATLIST, List the Contents of a Catalog
  Ancillary Functions
 
  Ancillary Function, Setting the Environment
  Ancillary Function, Displaying and Logging Messages
  Ancillary Function, Console.Log Backup, Ten Levels
  Possibilities & Considerations
 
  Frequently Asked Questions (FAQ's)
  Technical Information
 
  The ezSTART Command
  The ezSTOP Command
  The ezSUB Command
  The ezSCHEDULE Command
  Summary
 
  Software Agreement and Disclaimer
  Downloads and Links to Similar Pages
  Glossary of Terms
  Comments or Suggestions
About SimoTime

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

This document is an introduction or overview of the ezSERIES of Windows Command files that may be used to start a region within Enterprise Server, submit or schedule batch jobs to a region within Enterprise Server or stop a region within Enterprise Server. There are four (4) primary command files used in the ezSERIES.

Command Description
ezSTART This script will start a server (or region) to run under control of Enterprise Server.
ezSUB This script will submit a job to the specified server (or region) running under Enterprise Server.
ezSCHEDULE This script will schedule a job for a specified server (or region) running under Enterprise Server.
Note: The Micro Focus Batch Scheduler Interface (MFBSI) is required for this function.
ezSTOP This script will stop a server (or region) running under control of Enterprise Server.

The preceding command files will call the following command files.

Command Description
ezPROD01 This script will set commonly used environment variables. This script provides a single point of definition for commonly used environment variables.
SimoNOTE This script will display a message to the screen and write a time-stamped record to a log file. This script provides a single method for consistently displaying and logging information about job execution.
ezBAKConsole This script will maintain up to ten (10) levels of backup for the CONSOLE.LOG file.

The preceding command files are called from the primary command files to perform common processes in a consistent manner.

Quick Start
(Next) (Previous) (Table-of-Contents)

The "Quick Start" provides a quick sumary of how to use the most common command files of the ezSERIES.

Quick Start, Start a Server
(Next) (Previous) (Table-of-Contents)

The ezSTART command file calls the ezPROD01 command file to set commonly used environment variables. It then calls the ezBAKConsole command file to provide a backup of the previously created "console.log" file. It then starts the specified server based on the first parameter of the command line. The following is an example of the command line syntax. The first parameter is the name of the server to be started.

C:\SimoSam1\ProdLibA> ezSTART ServerName

Quick Start, Stop a Server
(Next) (Previous) (Table-of-Contents)

The ezSTOP command file calls the ezPROD01 command file to set commonly used environment variables. It then stops the specified server based on the first parameter of the command line. The following is an example of the command line syntax. The first parameter is the name of the server to be stopped.

C:\SimoSam1\ProdLibA> ezSTOP ServerName

Quick Start, Submit a Job
(Next) (Previous) (Table-of-Contents)

The ezSUB command file calls the ezPROD01 command file to set commonly used environment variables. It then submits the job name that is specified as the second parameter to the specified server based on the first parameter of the command line. The following is an example of the command line syntax. The first parameter is the name of the server and the second parameter is the job name (i.e. JCL member).

C:\SimoSam1\ProdLibA> ezSUB ServerName JobName

Note: A specified job will be submitted to the server. When the server accepts the job control is returned to the user with a zero return code.

Quick Start, Schedule a Job
(Next) (Previous) (Table-of-Contents)

The ezSCHEDULE command file calls the ezPROD01 command file to set commonly used environment variables. It then submits the job name that is specified as the second parameter to the specified server based on the first parameter on the command line. The following is an example of the command line syntax. The first parameter is the name of the server and the second parameter is the job name (i.e. JCL member).

C:\SimoSam1\ProdLibA> ezSCHEDULE ServerName JobName

Note: A specified job will be submitted to the server. After the server executes the job control is returned to the user with a return code that reflects the job completion code.

Additional ezSERIES Commands
(Next) (Previous) (Table-of-Contents)

WIP...

ezEXEC, Run a COBOL Program
(Next) (Previous) (Table-of-Contents)

WIP...

C:\SimoSam1\ProdLibA> ezEXEC ProgramName Parameter

ezCATLIST, List the Contents of a Catalog
(Next) (Previous) (Table-of-Contents)

WIP...

C:\SimoSam1\ProdLibA> ezCATLIST

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

This section provides additional detail about Micro Focus Server usage and configuration.

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

A command file (ezPROD01.CMD located in the sub-directory named ProdLibA) 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.

rem  * *******************************************************************
rem  * Set the commonly used environment variables. This is used to
rem  * provide a single point for managing the commonly used environment
rem  * variables.
rem  *
     set BaseLib1=c:\SimoSAM1
     set SYSLOG=%BaseLib1%\LOGS\SYSLOG_USER.TXT
     set SimoNOTE=%BaseLib1%\LOGS\SIMONOTE_USER.TXT
     call SimoNOTE "*"
rem  *
     set SYSOUT=%BaseLib1%\LOGS\SYSOUT_USER.TXT
     set LRSTOKEN=%BaseLib1%\DataLibA\Txt1\LRSTOKEN.TXT
     set CobCpy=%BaseLib1%\CobCpy1;c:\SimoLIBR
rem  *
     set MAINFRAME_FLOATING_POINT=true
rem  *
rem  * set MFTRACE_CONFIG=%BaseLib1%\LOGS\TRACE001\ctfrtsfs.cfg
rem  * set MFTRACE_LOGS=%BaseLib1%\LOGS\TRACE001
rem  *
rem  * The following SORTSPACE of 1 gigabyte is used when sorting very
rem  * large files. The value is the digit one (1) followed by nine (9)
rem  * zeroes. To allocate this amount of memory for sorting requires a
rem  * minimum of two (2) gigabytes of RAM.
rem  set SORTSPACE=1000000000
rem  *
rem  * For large file support and record locking control of File Handler
     set EXTFH=%BaseLib1%\SysLibA1\EXTFH4AE.CFG
rem  * Set environment for MFBSI (Micro Focus Batch Scheduling Interface)
     set ES_EMP_EXIT_1=mfbsiemx
     set MFBSI_DIR=%BaseLib1%\BSIA\%ezServerName%
     set MFBSIEOP_CMD=ENABLE
     set MFBSIEOP_CSV=ENABLE
rem  *
rem  * The following is used to map the location of files that are to be
rem  * allocated using JCL with ES/MTO.
     set ES_ALLOC_OVERRIDE=%BaseLib1%\SysLibA1\CatMapA1.cfg
rem  *
rem  * Set the environment for Core Dump on System error, CBLCORE file
rem  set COBCONFIG_=%BaseLib1%\SysLibA1\Diagnose.CFG
     set COBCONFIG_=
rem  *
rem  * Specify the location of the IDY files when animating
     set COBIDY=%BaseLib1%\COBOL
rem  *
rem  * The following may need to be adjusted based on individual systems
rem  * and the various versions of the Operating System, Sub-Systems and
rem  * other software.
     if "%ENV1PROD%" == "Y" goto :NOPATH
     set iexplore=C:\Program Files\Internet Explorer
     set path="C:\Program Files\Micro Focus\Net Express 5.0\Base\";"C:\Program Files\Micro Focus\Net Express 5.0\Base\bin";%PATH%;
rem  set path="C:\Program Files\Micro Focus\Server 5.0\Base\";"C:\Program Files\Micro Focus\Server 5.0\Base\bin";%PATH%;
:NOPATH
     set cobpath=%BaseLib1%\ProdLibA;%BaseLib1%\ProdLibA\UTIL;c:\SimoLIBR
     set JobStatus=0000
     set StepStatus=0000
     set ENV1PROD=Y
     call SimoNOTE "BaseLib1 is %BaseLib1%"

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

The following is a listing of the contents of the SimoNOTE.CMD command file.

@echo OFF
rem  * *******************************************************************
rem  *                   This program is provided by:                    *
rem  *                    SimoTime Enterprises, LLC                      *
rem  *           (C) Copyright 1987-2007 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
rem  * single parameter enclosed in double quotes. The double quotes
rem  * will be removed. Before writing to the log file a date and time
rem  * stamp 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

Ancillary Function, Console.Log Backup, Ten Levels
(Next) (Previous) (Table-of-Contents)

A command file (ezBAKConsole .CMD) is called from the ezSTART.CMD file when starting a server. Enterprise Server will make a single backup copy of the console log but one level of backup is usually not enough. This command will keep ten levels of backup for the console.log file.

The following is a listing of the contents of the command file.

@echo OFF
rem  *
rem  * ESA, Enterprise Server Administration
rem  *      Console Back up, maintain ten (10) levels
rem  *      The ezServerName environment must be set to the
rem  *      server name prior to calling this procedure
rem  *
     call Env1PROD
     set SDIR=%BaseLib1%\LOGS\%ezServerName%
     set TDIR=%BaseLib1%\LOGS\%ezServerName%
rem  *
     call SimoNOTE "****************************************ezBAKConsole"
     call SimoNOTE "Starting CmdName ezBAKConsole, User is %USERNAME%"
rem  *
     if exist %SDIR%\Console_log_10.txt  erase %TDIR%\Console_log_10.txt
     if exist %SDIR%\Console_log_09.txt rename %TDIR%\Console_log_09.txt Console_log_10.txt
     if exist %SDIR%\Console_log_08.txt rename %TDIR%\Console_log_08.txt Console_log_09.txt
     if exist %SDIR%\Console_log_07.txt rename %TDIR%\Console_log_07.txt Console_log_08.txt
     if exist %SDIR%\Console_log_06.txt rename %TDIR%\Console_log_06.txt Console_log_07.txt
     if exist %SDIR%\Console_log_05.txt rename %TDIR%\Console_log_05.txt Console_log_06.txt
     if exist %SDIR%\Console_log_04.txt rename %TDIR%\Console_log_04.txt Console_log_05.txt
     if exist %SDIR%\Console_log_03.txt rename %TDIR%\Console_log_03.txt Console_log_04.txt
     if exist %SDIR%\Console_log_02.txt rename %TDIR%\Console_log_02.txt Console_log_03.txt
     if exist %SDIR%\Console_log_01.txt rename %TDIR%\Console_log_01.txt Console_log_02.txt
     if exist %SDIR%\console.log          copy %TDIR%\console.log %TDIR%\Console_log_01.txt
rem  *
     call SimoNOTE "Complete CmdName ezBAKConsole.CMD, User is %USERNAME%"
rem  *

Possibilities & Considerations
(Next) (Previous) (Table-of-Contents)

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.

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

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

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.

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

This section provides additional detail about the ezSERIES of command files.

Technical Information, ezSTART Command
(Next) (Previous) (Table-of-Contents)

The following is a listing of the ezSTART command file.

@echo OFF
rem  *
rem  * ESA, Enterprise Server Administration
rem  *      Start a server (or region)
rem  *      Parameter one must be the server name
rem  *
rem  * Set the common environment variables
     set ezServerName=%1
     call Env1PROD
rem  * Provide up to ten (10) levels of backup for the console.log
     call ezBAKConsole
     call SimoNOTE "****************************************ezSTART"
     call SimoNOTE "Starting CmdName ezSTART, User is %USERNAME%"
     call SimoNOTE "Server will be STARTED, name is %ezServerName%"
rem  *
     casstart -r%1 /w
rem  *
     call SimoNOTE "Complete CmdName ezSTART, User is %USERNAME%"

Technical Information, ezSTOP Command
(Next) (Previous) (Table-of-Contents)

The following is a listing of the ezSTOP command file.

@echo OFF
rem  *
rem  * ESA, Enterprise Server Administration
rem  *      Stop a server (or region)
rem  *      Parameter one must be the server name
rem  *
     set ezServerName=%1
     call Env1PROD
rem  *
     call SimoNOTE "****************************************ezSTOP"
     call SimoNOTE "Starting CmdName ezSTOP, User is %USERNAME%"
     call SimoNOTE "Server will be STOPPED, name is %ezServerName%"
rem  *
     casstop -r%1
rem  *
     call SimoNOTE "Complete CmdName ezSTOP, User is %USERNAME%"

Technical Information, ezSUB Command
(Next) (Previous) (Table-of-Contents)

The following is a listing of the ezSUB command file.

@echo OFF
rem  *
rem  * ESA, Enterprise Server Administration
rem  *      Submit a Job (to a Server or Region)
rem  *      Parameter 1 is Server Name
rem  *      Parameter 2 is Job Name, a JCL member name without
rem  *                  an extension
rem  *
     call Env1PROD
     call SimoNOTE "****************************************ezSUB"
     call SimoNOTE "Starting CmdName ezSUB, User is %USERNAME%"
rem  *
     if "%1" == "" (set JobStatus=0091
                    goto EOJNOK)
     if "%2" == "" (set JobStatus=0092
                    goto EOJNOK)
rem  *
     call cassub -j%BaseLib1%\JCL\%2.JCL -r%1
     if not "%ERRORLEVEL%" == "0" (set JobStatus=%ERRORLEVEL%
                                    goto EOJNOK)
     goto EOJAOK
:EOJNOK
     call SimoNOTE "ABENDING CmdName ezSUB, JobStatus is %JobStatus%"
     if "%JobStatus%" == "0091" call SimoNOTE "Parameter 1 must be Server Name"
     if "%JobStatus%" == "0092" call SimoNOTE "Parameter 2 must be Job Name"
     goto :END
:EOJAOK
     call SimoNOTE "Complete CmdName ezSUB, JobStatus is %JobStatus%"
     goto :END
:END
     exit /B %JobStatus%

Technical Information, ezSCHEDULE Command
(Next) (Previous) (Table-of-Contents)

The following is a listing of the ezSCHEDULE command file.

@echo OFF
rem  *
rem  * ESA, Enterprise Server Administration
rem  *      Batch Scheduler Interface
rem  *      Parameter 1 is Server Name
rem  *      Parameter 2 is Job Name, a JCL member name without
rem  *                  an extension
rem  *
     set ezServerName=%1
     call Env1PROD
     call SimoNOTE "****************************************ezSCHEDULE"
     call SimoNOTE "Starting CmdName ezSCHEDULE, User is %USERNAME%"
rem  *
     if "%1" == "" (set JobStatus=0091
                    goto EOJNOK)
     if "%2" == "" (set JobStatus=0092
                    goto EOJNOK)
rem  * Schedule and Monitor the Job
     run MFBSIJCL -j%BaseLib1%\JCL\%2.JCL -r%1 END
     if not "%ERRORLEVEL%" == "0" set JobStatus=%ERRORLEVEL%
     if not "%JobStatus%" == "0000" goto :EOJNOK
     echo ezSCHEDULEjobA, CC=%ERRORLEVEL%
echo * Rename the MFBSI Log file with appended date and time values
     set OLDNAME=%MFBSI_DIR%\%2.LOG
     run MFBSIEOP
     if not "%ERRORLEVEL%" == "0" set JobStatus=%ERRORLEVEL%
     if not "%JobStatus%" == "0000" goto :EOJNOK
     goto :EOJAOK
:EOJNOK
     call SimoNOTE "ABENDING CmdName ezSCHEDULE, JobStatus is %JobStatus%"
     if "%JobStatus%" == "0091" call SimoNOTE "Parameter 1 must be Server Name"
     if "%JobStatus%" == "0092" call SimoNOTE "Parameter 2 must be Job Name"
     if "%JobStatus%" == "209" call SimoNOTE "Requested JCL Member is missing or invalid"
     goto :END
:EOJAOK
     call SimoNOTE "Complete CmdName ezSCHEDULE, JobStatus is %JobStatus%"
     goto :END
:END
     exit /B %JobStatus%

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

The purpose of this program is to provide a model suite of Windows Command Files that may be used to start a region within Enterprise Server, submit or schedule batch jobs to a region within Enterprise Server or stop a region within Enterprise Server.

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

Permission to use, copy, modify and distribute this software for any commercial purpose requires a fee to be paid to SimoTime Enterprises. Once the fee is received by SimoTime the latest version of the software will be delivered and a license will be granted for use within an enterprise, provided the SimoTime copyright notice appear on all copies of the software. The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Enterprises.

Permission to use, copy, modify and distribute this software for a non-commercial purpose and without fee is hereby granted, provided the SimoTime copyright notice appear on all copies of the software. The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Enterprises.

SimoTime Enterprises makes no warranty or representations about the suitability of the software for any purpose. It is provided "AS IS" without any express 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.

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

You may download this example at http://www.simotime.com/sim4dzip.htm#zpackezseries or view the complete list of SimoTime Examples at http://www.simotime.com/sim4dzip.htm.

Note: You must be attached to the Internet to download a Z-Pack or view the list.

To review all the information available on this site start at  The SimoTime Home Page .

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 or Suggestions
(Next) (Previous) (Table-of-Contents)

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

We appreciate your comments and feedback.

About SimoTime Enterprises, LLC
(Next) (Previous) (Table-of-Contents)

Founded in 1987, SimoTime Enterprises is a privately owned, Limited Liability Corporation located in Novato, California. 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 complimentary 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
Copyright © 1987-2008 SimoTime Enterprises, LLC  All Rights Reserved
When technology complements business
http://www.simotime.com
Version 08.01.14