|
|
The
ezSERIES Micro Focus Enterprise Server http://www.simotime.com |
| When technology complements business | Copyright © 1987-2010 SimoTime Enterprises All Rights Reserved |
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 |
| ezSetEnv | 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.
The "Quick Start" provides a quick sumary of how to use the most common command files of the ezSERIES.
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
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
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.
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-1: A specified job will be submitted to the server. After the job is executed control is returned to the user with a return code that reflects the job completion code.
Note-2: A prerequisite for running this command is the Micro Focus Batch Scheduler Interface (or MFBSI).
The commands and associated programs in this section provide additional capability and/or specialized functions that are complimentary to the base programs included in this package.
This command is available in a separate package. This utility program provides a specialized function. It provides for the execution of a COBOL program without using JCL. The COBOL program may expect a parameter via its LINKAGE SECTION to be in the standard format as if it were executed by JCL. This utility program will read the parameter string from the Windows Command line and re-format to the JCL format and call the COBOL program. The COBOL program does not know it was executed from a non-JCL environment.
C:\SimoSam1\ProdLibA> ezEXEC ProgramName Parameter
Refer to the SimoMODS Utility Programs for more information..
This command is available in a separate package. This utility program provides a quick and simple way to list or hex-dump the contents of the CATALOG.DAT file to an ASCII/Text file from a Windows Command. The list or hex-dump file may be viewed with NotePad.
C:\SimoSam1\ProdLibA> ezCATLIST
Refer to the ezCATLIST Utility Program for more information..
This command is available in a separate package. This utility program provides a quick and simple way to export file information thT IA AVAILABLE IN THE CATALOG.DAT file to a CSV File that is easily imported into a Microsoft Excel spreadsheet or relational data base such as Microsoft Access or MD/SQL.
C:\SimoSam1\ProdLibA> ezCATXPORT
Refer to the ezCATXPORT Utility Program for more information..
This section provides additional detail about Micro Focus Server usage and configuration.
A command file (ezSetEnv.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 "%ezSetEnv%" == "Y" goto :NOPATH
set iexplore=C:\Program Files\Internet Explorer
set path="C:\Program Files\Micro Focus\Net Express 5.1\Base\";"C:\Program Files\Micro Focus\Net Express 5.1\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 ezSetEnv=Y
call SimoNOTE "BaseLib1 is %BaseLib1%"
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-2010 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
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 ezSetEnv
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 *
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.
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. |
This section provides additional detail about the ezSERIES of command files.
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 ezSetEnv
rem * Provide up to ten (10) levels of backup for the console.log
call ezBAKConsole
call SimoNOTE "****************************************ezSTART"
call SimoNOTE "Starting CmdName ezSTART %ezServerName%, User is %USERNAME%"
rem *
casstart -r%1 /w
rem *
call SimoNOTE "Complete CmdName ezSTART %ezServerName%, User is %USERNAME%"
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 ezSetEnv
rem *
call SimoNOTE "****************************************ezSTOP"
call SimoNOTE "Starting CmdName ezSTOP %ezServerName%, User is %USERNAME%"
rem *
casstop -r%1
rem *
call SimoNOTE "Complete CmdName ezSTOP %ezServerName%, User is %USERNAME%"
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 ezSetEnv
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%
The following is a listing of the ezSCHEDULE command file. A prerequisite for running this command is the Micro Focus Batch Scheduler Interface (or MFBSI).
@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 ezSetEnv
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
call SimoNOTE "Continue CmdName ezSCHEDULE, Server is %ezServerName%, Job is %2 "
run MFBSIJCL -j%BaseLib1%\JCL\%2.JCL -r%1 END
echo * ezSCHEDULE, CC=%ERRORLEVEL%
if not "%ERRORLEVEL%" == "0" set JobStatus=%ERRORLEVEL%
if not "%JobStatus%" == "0000" goto :EOJNOK
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
if "%JobStatus%" == "0091" (call SimoNOTE "Parameter 1 must be Server Name"
goto EOJNOK2)
if "%JobStatus%" == "0092" (call SimoNOTE "Parameter 2 must be Job Name"
goto EOJNOK2)
if "%JobStatus%" == "209" (call SimoNOTE "Requested JCL Member is missing or invalid,"
call SimoNOTE "or requested server not available"
goto EOJNOK2)
set OLDNAME=%MFBSI_DIR%\%2.LOG
run MFBSIEOP
:EOJNOK2
call SimoNOTE "ABENDING CmdName ezSCHEDULE %ezServerName%, %2 JobStatus is %JobStatus% "
goto :END
:EOJAOK
call SimoNOTE "Complete CmdName ezSCHEDULE %ezServerName%, %2 JobStatus is %JobStatus% "
goto :END
:END
exit /B %JobStatus%
The purpose of this suite of programs is to provide a model 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.
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.
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 .
Check out The SimoTime Glossary for a list of terms and definitions used in the documents provided by SimoTime.
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.
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 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-2010 SimoTime Enterprises All Rights Reserved |
| When technology complements business |
| http://www.simotime.com |
| Version 08.01.14 |