Server Access & Operational Management
 EZ & SYS1 Series, Complementary Technology for Micro Focus
When technology complements business    Copyright © 1987-2012  SimoTime Enterprises  All Rights Reserved
  Table of Contents Version 10.11.01 
  Introduction
  Quick Start
  Quick Start, Start a Server
  Quick Start, Stop a Server
  Quick Start, Submit a Job
  Quick Start, Schedule a Job
  Additional EZ Series and SYS1 Series Commands
  EZEXEC, Run a COBOL Program
  SYS1FORCE, Force a Server to Stop (Terminate)
  SYS1CATLIST, List the Content of a Catalog
  SYS1CATXPORT, Export Catalog Information to CSV File
  SYS1JESLOG, Review Results of Job Execution
  SYS1CSDFCTGET, Get FCT Information from DFHDRDAT
  SYS1CSDPCTGET, Get PCT Information from DFHDRDAT
  SYS1FILEDISABLE, Disable and Close a CICS File from Batch
  SYS1FILEENABLE, Enable and Open a CICS File from Batch
  Ancillary or Secondary Functions
  Ancillary Function, Setting the Environment
  Ancillary Function, Displaying and Logging Messages
  Ancillary Function, CONSOLE.LOG Backup, Ten Levels
  Ancillary Function, CATALOG.DAT Backup, Ten Levels
  Possibilties and Considerations
  Frequently Asked Questions (FAQ's)
  Technical Information
  Technical Information, SYS1START Command
  Technical Information, SYS1STOP Command
  Technical Information, EZSUB Command
  Technical Information, EZSCHEDULE Command
  Technical Information, SYS1CSDFCTGET Command
  Technical Information, SYS1CSDPCTGET Command
  Technical Information, SYS1FILEDISABLE Command
  Technical Information, SYS1FILEENABLE Command
  Summary
  Software Agreement and Disclaimer
  Downloads and Links to Similar Pages
  Glossary of Terms
  Comments, Suggestions or Feedback
  Company Overview
The SimoTime Home Page

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

This document is an introduction or overview of the EZ Series and SYS1 Series 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 EZ Series and SYS1 Series of command files

Command Description
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.
ezSUB This script will submit a job to the specified server (or region) running under Enterprise Server.
SYS1START This script will start a server (or region) to run under control of Enterprise Server.
SYS1STOP This script will stop a server (or region) that is running under control of Enterprise Server.
  The Primary Group of EZ Series and SYS1 Series of Commands

Note: The EZ Series of commands start with the letters EZ and are intended for use by the application programmers and business users. The SYS1 Series of commands start with the letters SYS1 and are intended for use by the operations staff and systems programmers.

The preceding command files will call the following command files.

Command Description
ENV1BASE 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.
SYS1BAKCATALOG This script will make a backup copy of the CATALOG.DAT file. It maintains ten (10) levels of back-up. This command is usually called from the SYS1START command.
SYS1BAKCONSOLE This script will make a backup copy of the CONSOLE.LOG file. It maintains ten (10) levels of back-up. This command is usually called from the SYS1START command.
  The Ancillary Group of Commands called by the EZ Series and SYS1 Series of Commands

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 EZ Series and SYS1 Series of commands. The EZ Series is primarily intended for use by business users that need to access and use the applications. The SYS1 Series is intended for use by the Operations Staff and Systems Programmers to support and maintain the Micro Focus Enterprise Server and the User Configured Application Servers.

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

The SYS1START command file calls the ENV1BASE command file to set commonly used environment variables. It then calls the SYS1BAKConsole 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\DEVL\SYS1\LOADLIB> SYS1START ServerName

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

The SYS1STOP command file calls the ENV1BASE 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\DEVL\SYS1\LOADLIB> SYS1STOP ServerName

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

The EZSUB command file calls the ENV1BASE 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\DEVL\LOADLIB> 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 ENV1BASE 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\DEVL\LOADLIB> 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).

Additional EZ Series and SYS1 Series Commands
(Next) (Previous) (Table-of-Contents)

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.

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

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\DEVL\LOADLIB>  EZEXEC ProgramName Parameter

SYS1FORCE, Force a Server to Stop (Terminate)
(Next) (Previous) (Table-of-Contents)

The SYS1FORCE command file calls the ENV1BASE command file to set commonly used environment variables. It then stops (or terminates)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\DEVL\SYS1\LOADLIB> SYS1FORCE ServerName

Caution!  This command should only be used when the SYS1STOP command fails to stop a server. The SYS1FORCE will terminate the server and all user jobs in active mode will be cancelled.

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

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\DEVL\SYS1\LOADLIB>  SYS1CATLIST

SYS1CATXPORT, Export Catalog Information to CSV File
(Next) (Previous) (Table-of-Contents)

This command is available in a separate package. This utility program provides a quick and simple way to export file information that is 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 MS/SQL

C:\SIMOSAM1\DEVL\SYS1\LOADLIB>  SYS1CATXPORT

SYS1JESLOG, Review Results of Job Execution
(Next) (Previous) (Table-of-Contents)

This utility program provides a quick and simple way to create and view a list of Job summary information that includes job start, stop and elapsed times.

C:\SIMOSAM1\DEVL\SYS1\LOADLIB>  SYS1JESLOG

The following is an example of the output for the SYS1JESLOG utility program.

20110718,12:25:11,JOB01895,UVBR00J1,                 ,SIMOTIME,JOB ,STARTED ,        ,
20110718,12:25:11,JOB01895,UVBR00J1,                 ,SIMOTIME,JOB ,ENDED   ,0000    ,00:00:00
20110718,12:28:24,JOB01896,UVBR00J1,                 ,SIMOTIME,JOB ,STARTED ,        ,
20110718,12:28:24,JOB01896,UVBR00J1,                 ,SIMOTIME,JOB ,ENDED   ,0000    ,00:00:00
20110718,12:37:36,JOB01897,STAMLRJ1,                 ,mfuser  ,JOB ,STARTED ,        ,
20110718,12:37:40,JOB01897,STAMLRJ1,                 ,mfuser  ,JOB ,ENDED   ,0000    ,00:00:04
20110718,12:40:06,JOB01898,STAMLRJ1,                 ,mfuser  ,JOB ,STARTED ,        ,
20110718,12:40:11,JOB01898,STAMLRJ1,                 ,mfuser  ,JOB ,ENDED   ,0000    ,00:00:05
20110718,12:42:23,JOB01899,STAMLRJ1,                 ,mfuser  ,JOB ,STARTED ,        ,
20110718,12:42:28,JOB01899,STAMLRJ1,                 ,mfuser  ,JOB ,ENDED   ,0000    ,00:00:05
20110718,13:10:44,JOB01900,UVBR00J1,                 ,SIMOTIME,JOB ,STARTED ,        ,
20110718,13:10:44,JOB01900,UVBR00J1,                 ,SIMOTIME,JOB ,ENDED   ,0000    ,00:00:00
20110718,13:13:00,JOB01901,UVBR00J1,                 ,SIMOTIME,JOB ,STARTED ,        ,
20110718,13:13:01,JOB01901,UVBR00J1,                 ,SIMOTIME,JOB ,ENDED   ,0000    ,00:00:01
20110718,17:46:39,JOB01902,CUQUP1J1,                 ,mfuser  ,JOB ,STARTED ,        ,
20110718,17:47:00,JOB01902,CUQUP1J1,                 ,mfuser  ,JOB ,ENDED   ,0000    ,00:00:21
20110719,08:08:51,JOB01903,CCSRDRJ9,                 ,SIMOCICA,JOB ,STARTED ,        ,
20110719,08:08:51,JOB01903,CCSRDRJ9,                 ,SIMOCICA,JOB ,ENDED   ,0000    ,00:00:00

SYS1CSDFCTGET, Get FCT Information from DFHDRDAT
(Next) (Previous) (Table-of-Contents)

This utility program provides a quick and simple way to identify and obtain a list of the files defined in the CICS System Definitions (CSD) file. For the Micro Focus environment this information is stored in the DFHDRDAT file.

C:\SIMOSAM1\DEVL\SYS1\LOADLIB>  SYS1CSDFCTGET

Additional information about the SYS1CSDFCTGET command may be found in the Technical Information section of this document.

SYS1CSDPCTGET, Get PCT Information from DFHDRDAT
(Next) (Previous) (Table-of-Contents)

This utility program provides a quick and simple way to identify and obtain a list of the transactions defined in the CICS System Definitions (CSD) file. For the Micro Focus environment this information is stored in the DFHDRDAT file.

C:\SIMOSAM1\DEVL\SYS1\LOADLIB>  SYS1CSDPCTGET

Additional information about the SYS1CSDPCTGET command may be found in the Technical Information section of this document.

SYS1FILEDISABLE, Disable and Close a CICS File from Batch
(Next) (Previous) (Table-of-Contents)

This utility program provides a quick and simple way to close and disable a file allocated to CICS from a Batch environment.

C:\SIMOSAM1\DEVL\SYS1\LOADLIB>  SYS1FILEDISABLE ServerName FileName

Additional information about the SYS1FILEDISABLE command may be found in the Technical Information section of this document.

SYS1FILEENABLE, Enable and Open a CICS File from Batch
(Next) (Previous) (Table-of-Contents)

This utility program provides a quick and simple way to enable and open a file allocated to CICS from a Batch environment.

C:\SIMOSAM1\DEVL\SYS1\LOADLIB>  SYS1FILEENABLE ServerName FileName

Additional information about the SYS1FILEENABLE command may be found in the Technical Information section of this document.

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

This section provides additional detail about Micro Focus Server usage and configuration. The commands described in this section are usually called from other commands and not called directly by a business user.

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

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

@echo OFF
rem  * *******************************************************************
rem  *               ENV1BASE.CMD - a Windows Command File               *
rem  *        This program is provided by SimoTime 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 is a listing of the contents of the SimoNOTE.CMD command file.

@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

Ancillary Function, CONSOLE.LOG Backup, Ten Levels
(Next) (Previous) (Table-of-Contents)

A command file (SYS1BAKConsole.CMD) is called from the SYS1START.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 SYS1BAKCONSOLE.CMD 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 ..\..\Env1base
     set SDIR=%BASESYS%\LOGS\%ezServerName%
     set TDIR=%BASESYS%\LOGS\%ezServerName%
rem  *
     call SimoNOTE "****************************************SYS1BAKConsole"
     call SimoNOTE "Starting CmdName SYS1BAKConsole, 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 SYS1BAKConsole.CMD, User is %USERNAME%"
rem  *

Ancillary Function, CATALOG.DAT Backup, Ten Levels
(Next) (Previous) (Table-of-Contents)

A command file (SYS1BAKCatalog.CMD) is called from the SYS1START.CMD file when starting a server. This command will keep ten levels of backup for the CATALOG.DAT file.

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

@echo OFF
rem  *
rem  * ESA, Enterprise Server Administration
rem  *      Catalog 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 ..\..\Env1base
     set SDIR=%BASECAT%
     set TDIR=%BASESYS%\LOGS\%ezServerName%
rem  *
     call SimoNOTE "****************************************SYS1BAKCatalog"
     call SimoNOTE "Starting CmdName SYS1BAKCatalog, User is %USERNAME%"
rem  *
     if exist %TDIR%\CATALOG_BAK_10.DAT  erase %TDIR%\CATALOG_BAK_10.DAT
     if exist %TDIR%\CATALOG_BAK_09.DAT rename %TDIR%\CATALOG_BAK_09.DAT CATALOG_BAK_10.DAT
     if exist %TDIR%\CATALOG_BAK_08.DAT rename %TDIR%\CATALOG_BAK_08.DAT CATALOG_BAK_09.DAT
     if exist %TDIR%\CATALOG_BAK_07.DAT rename %TDIR%\CATALOG_BAK_07.DAT CATALOG_BAK_08.DAT
     if exist %TDIR%\CATALOG_BAK_06.DAT rename %TDIR%\CATALOG_BAK_06.DAT CATALOG_BAK_07.DAT
     if exist %TDIR%\CATALOG_BAK_05.DAT rename %TDIR%\CATALOG_BAK_05.DAT CATALOG_BAK_06.DAT
     if exist %TDIR%\CATALOG_BAK_04.DAT rename %TDIR%\CATALOG_BAK_04.DAT CATALOG_BAK_05.DAT
     if exist %TDIR%\CATALOG_BAK_03.DAT rename %TDIR%\CATALOG_BAK_03.DAT CATALOG_BAK_04.DAT
     if exist %TDIR%\CATALOG_BAK_02.DAT rename %TDIR%\CATALOG_BAK_02.DAT CATALOG_BAK_03.DAT
     if exist %TDIR%\CATALOG_BAK_01.DAT rename %TDIR%\CATALOG_BAK_01.DAT CATALOG_BAK_02.DAT
     if exist %SDIR%\CATALOG.DAT          copy %SDIR%\CATALOG.DAT %TDIR%\CATALOG_BAK_01.DAT
rem  *
     call SimoNOTE "Complete CmdName SYS1BAKCatalog.CMD, User is %USERNAME%"
rem  *


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

Date Question and Answer
2007-03-17 Is it a standard practice to provide access by application and business individuals to the EZ Series and deny access to the SYS1 Series?
Yes. This is normally done through a separate security system. Most production environments do not allow just anyone to start or stop a server.
2007-05-17 Are the EZ Series and SYS1 Series commands kept in the same directory?
No, we normally configure a "LOADLIB" directory for the EZ Series of commands that allow an individual to execute jobs. The SYS1 Series is kept in a "SYS1\LOADLIB" and are only accessible by operations, support and systems individuals.
  Frequently Asked Questions (FAQ)

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

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

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

The following is a listing of the SYS1START 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 ..\..\Env1BASE
rem  * Provide up to ten (10) levels of backup for the console.log
     call SYS1BAKConsole
     call SYS1BAKCatalog
     call SimoNOTE "****************************************SYS1START"
     call SimoNOTE "Starting CmdName SYS1START %ezServerName%, User is %USERNAME%"
rem  *
     set DEBUGEXIT=TRUE
     set MFJUXITLOG=%BaseLib1%\LOGS\MFJCLXIT.LOG
rem  *
     casstart -r%1 /w
rem  *
     call SimoNOTE "Complete CmdName SYS1START %ezServerName%, User is %USERNAME%"

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

The following is a listing of the SYS1STOP 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 ..\..\Env1BASE
rem  *
     call SimoNOTE "****************************************SYS1STOP"
     call SimoNOTE "Starting CmdName SYS1STOP %ezServerName%, User is %USERNAME%"
rem  *
     casstop -r%1
rem  *
     call SimoNOTE "Complete CmdName SYS1STOP %ezServerName%, 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  *                   EZSUB.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  * 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 ..\Env1BASE
     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  *               EZSCHEDULE.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  * 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 ..\env1BASE
     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 "
     call SimoNOTE "Continue CmdName ezSCHEDULE, %DATE% - %TIME% "
rem  * C:\Windows\System32\cmd.exe /C start /affinity 1 C:\(ProgramFolder)\(program).exe
rem  * C:\Windows\System32\cmd.exe /C start /affinity 6 run MFBSIJCL -j%BaseLib1%\JCL\%2.JCL -r%1 END
     run MFBSIJCL -j%BASEAPP%\JCL\%2.JCL -r%1 %3 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%
     call SimoNOTE "MFJESDIR %OLDNAME% "
     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, %DATE% - %TIME% "
     call SimoNOTE "Complete CmdName ezSCHEDULE %ezServerName%, %2 JobStatus is %JobStatus% "
     goto :END
:END
     exit /B %JobStatus%

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

This command produces a list of the File Control Table (FCT) defined in the CICS System Definitions (CSD) file. The File Control Table (FCT) contains an entry for each file used by the CICS regions. For the Micro Focus environment this information is stored in the DFHDRDAT file. The following shows the content of the SYS1CSDFCTGET command.

@echo OFF
rem  * *******************************************************************
rem  *            SYS1CSDFCTGET.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   - Glance at the CSD Information for FCTs.
rem  * Author - SimoTime Enterprises
rem  * Date   - January 24, 2006
rem  *
rem  * The 1st step will Prepare the environment.
rem  *
rem  * The 2nd step will extract FCT information from DFHDRDAT.
rem  *
rem  * The 3rd step will post FCT information to a CSV File.
rem  *
rem  * *******************************************************************
rem  * Step 1 of 3,  Prepare the environment...
rem  *
     set CmdName=SYS1CSDFCTGET
     call ..\..\Env1BASE %CmdName%
     if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
rem  *
     call SimoNOTE "*******************************************************%CmdName%"
     call SimoNOTE "Starting CmdName %CmdName%, V08.06.05, User is %USERNAME%"
     call SimoNOTE "StepInfo Delete previously created files"
     set RDTFILE2=%BaseLib1%\DATA\TXT1\SIMOTIME.FCT.RDTFILE2.TXT
     if exist %RDTFILE2% del %RDTFILE2%
rem  *
rem  * *******************************************************************
rem  * Step 2 of 3, Get FCT Information from RDO File...
rem  *
     call SimoNOTE "StepInfo Create Record Sequential files"
     casrdtex /o%RDTFILE2% /gSIMOGRPA /f /e /ip"c:\SimoSam1\DEVL\SYS1\CONFIG"
rem  *
     if exist %RDTFILE2% goto :PostToCSV
     set JobStatus=0020
     goto :EojNok
rem  *
rem  * *******************************************************************
rem  * Step 3 of 3, Post FCT Information to a CSV File...
rem  *
:PostToCSV
     set CSDGETD1=%RDTFILE2%
     set CSDPUTD1=%BaseLib1%\DATA\XLSS\SIMOTIME.FCT.SAMDEVS1.CSV
     call SimoNOTE "DataTAKE is %CSDGETD1%"
     call SimoNOTE "DataMAKE is %CSDPUTD1%"
     run CSDFCTC1
rem  *
rem  * *******************************************************************
rem  *
:EojAok
     call SimoNOTE "Finished JobName %CmdName%, Job Status is %JobStatus% "
     goto :End
:EojNok
     call SimoNOTE "ABENDING JobName %CmdName%, Job Status is %JobStatus% "
:End
     if not "%1" == "nopause" pause

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

This command produces a list of the Program Control table (PCT) defined in the CICS System Definitions (CSD) file. The Program Control Table (PCT) contains a definition for each transaction and the program that is used by th etransaction. For the Micro Focus environment this information is stored in the DFHDRDAT file. The following shows the content of the SYS1CSDFCTGET command.

@echo OFF
rem  * *******************************************************************
rem  *            SYS1CSDPCTGET.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   - Glance at the CSD Information for PCTs.
rem  * Author - SimoTime Enterprises
rem  * Date   - January 24, 2006
rem  *
rem  * The 1st step will Prepare the environment.
rem  *
rem  * The 2nd step will extract PCT information from DFHDRDAT.
rem  *
rem  * The 3rd step will post PCT information to a CSV File.
rem  *
rem  * *******************************************************************
rem  * Step 1 of 3,  Prepare the environment...
rem  *
     set CmdName=CSDPCTGET
     call ..\..\Env1BASE %CmdName%
     set JobStatus=0000
     if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
     call SimoNOTE "*******************************************************%CmdName%"
     call SimoNOTE "Starting JobName %CmdName%, User is %USERNAME%"
     call SimoNOTE "Identify JobStep DeleteQSAM"
     set RDTFILE2=%BaseLib1%\DATA\TXT1\SIMOTIME.PCT.RDTFILE2.TXT
     if exist %RDTFILE2% del %RDTFILE2%
rem  *
rem  * *******************************************************************
rem  * Step 2 of 3, Get PCT Information from RDO File...
rem  *
     casrdtex /o%RDTFILE2% /gSIMOGRPA /x /e /ip"c:\SimoSam1\DEVL\SYS1\CONFIG"
rem  *
     if exist %RDTFILE2% goto :PostToCSV
     set JobStatus=0020
     goto :EojNok
rem  *
rem  * *******************************************************************
rem  * Step 3 of 3, Post PCT Information to a CSV File...
rem  *
:PostToCSV
     set CSDGETD1=%RDTFILE2%
     set CSDPUTD1=%BaseLib1%\DATA\XLSS\SIMOTIME.PCT.SAMDEVS1.CSV
     call SimoNOTE "DataTAKE is %CSDGETD1%"
     call SimoNOTE "DataMAKE is %CSDPUTD1%"
     run CSDPCTC1
rem  *
rem  * *******************************************************************
rem  *
:EojAok
     call SimoNOTE "Produced %CSDPUTD1%"
     call SimoNOTE "Finished JobName %CmdName%, Job Status is %JobStatus%"
     goto :End
:EojNok
     call SimoNOTE "ABENDING JobName %CmdName%, Job Status is %JobStatus%"
:End
     call SimoNOTE "Conclude SysLog is %SYSLOG%"
     if not "%1" == "nopause" pause

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

The following shows the content of the SYS1FILEDISABLE command.

@echo OFF
rem  * *******************************************************************
rem  *           SYS1FILEDISABLE.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  * ESA, Enterprise Server Administration
rem  *      Disable and Close a File for a CICS Region
rem  *      Parameter one must be the server name
rem  *      Parameter two must be the data file name
rem  *
rem  * Set the common environment variables
     set ezServerName=%1
     call ..\..\Env1BASE
     call SimoNOTE "****************************************SYS1FILEDISABLE"
     call SimoNOTE "Starting CmdName SYS1FILEDISABLE %ezServerName%, File is %2, User is %USERNAME%"
rem  *
     casfile -r%1 -oc -ed -d%2
rem  *
     call SimoNOTE "Complete CmdName SYS1FILEDISABLE %ezServerName%, File is %2, User is %USERNAME%"

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

The following shows the content of the SYS1FILEDISABLE command.

@echo OFF
rem  * *******************************************************************
rem  *            SYS1FILEENABLE.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  * ESA, Enterprise Server Administration
rem  *      Enable and Open a File for a CICS Region
rem  *      Parameter one must be the server name
rem  *      Parameter two must be the data file name
rem  *
rem  * Set the common environment variables
     set ezServerName=%1
     call ..\..\Env1BASE
     call SimoNOTE "****************************************SYS1FILEENABLE"
     call SimoNOTE "Starting CmdName SYS1FILEENABLE %ezServerName%, File is %2, User is %USERNAME%"
rem  *
     casfile -r%1 -ee -oo -d%2
rem  *
     call SimoNOTE "Complete CmdName SYS1FILEENABLE %ezServerName%, File is %2, User is %USERNAME%"

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

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.

Also, this document may be used to assist as a tutorial for new programmers or as a quick reference for experienced programmers. In the world of programming there are many ways to solve a problem. This 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.

You may download this example at  http://www.simotime.com/sim4dzip.htm#ezseriesdzip .

Explore an Extended List of Software Technologies that are available for review and evaluation. The software technologies (or Z-Packs) provide individual programming examples, documentation and test data files in a single package. The Z-Packs are usually in zip format to reduce the amount of time to download.

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

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

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
Server Access & Operational Management, EZ & SYS1 Series, Complementery Technology for Micro Focus
Copyright © 1987-2012 SimoTime Enterprises  All Rights Reserved
When technology complements business
http://www.simotime.com