Define Environments Shared or Common Properties |
The SimoTime Home Page |
This document provides information about program members that are shared with (or called by) other tasks or applications. These ancillary program members are available as a separate package or as part of the SimoTime Enterprise package.
We have made a significant effort to ensure the documents and software technologies are correct and accurate. We reserve the right to make changes without notice at any time. The function delivered in this version is based upon the enhancement requests from a specific group of users. The intent is to provide changes as the need arises and in a timeframe that is dependent upon the availability of resources.
Copyright © 1987-2025
SimoTime Technologies and Services
All Rights Reserved
Set the commonly used environment variables or perform repeatable function using a consistent and predefined methodology. These are used to provide a single point for setting the commonly used environment variables or managing repeatable functions that are used across various applications.
The following members are for the Windows Environment. The Job Scripts use Command Files.
The following (ENV1BASE.cmd) is a Windows Command file that will set the commonly used environment variables. This member is used to provide a single point for managing the commonly used environment variables.
@echo OFF rem * ******************************************************************* rem * ENV1BASE.cmd - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2021 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * rem * Text - Provide a single point to set common environment variables. rem * Author - SimoTime Technologies rem * Date - January 24, 1996 rem * rem * Set the commonly used environment variables. This is used to provide rem * a single point for managing the commonly used environment variables. rem * set SimoLIBR=c:\SimoLIBR set BASELIB1=c:\SIMOSAM1\DEVL set BASELIB8=c:\SimoSAM8 set BaseWIP1=c:\SimoSAM1\WIP1 set DATAZERO=c:\SIMODATA\DEVL\DATA\ZERO set BASEAPP=%BaseLib1% set BASESYS=%BaseLib1%\SYS1 set BASECAT=%BaseLib1%\DATA set UMAPALIB=%BASECAT%\ASC1 set UMAPELIB=%BASECAT%\EBC1 set SYSLOG=%BASESYS%\LOGS\SYSLOG_USER.DAT set SYSOUT=%BASEAPP%\LOGS\SYSOUT_SIMSAM01.txt set SLZMSG=%BASEAPP%\LOGS\SLZMSG_USER.TXT set PostNOTE=%BASEAPP%\LOGS\JOBLOG_SIMONOTE.TXT set SIMONOTE=%BASEAPP%\LOGS\JOBLOG_SIMONOTE.txt set USERPOST=%BASEAPP%\LOGS\ASSIGNED_USER_POST_FILE.txt if [%1]==[] goto NO_POST set SYSOUT=%BaseLib1%\LOGS\SYSOUT_%1.txt call SIMONOTE "+ ENV1BASE *" call SIMONOTE "+ ENV1BASE ********************************************************************%1" call SIMONOTE "+ ENV1BASE is preparing the System Environment..." call SIMONOTE "+ SIMOLIBR is %SIMOLIBR%" call SIMONOTE "+ MIFOSYS1 is %MIFOSYS1%" call SIMONOTE "+ BASELIB1 is %BASELIB1%" :NO_POST call SIMONOTE "+ SIMONOTE Job Log File is %SIMONOTE% " rem * set MQBASE=C:\Program Files\IBM\WebSphere MQ rem * rem * Set the location for the Apache-Tomcat Server... set CATALINA_HOME=C:\APACHETC\apache-tomcat-7.0.52 rem set CATALINA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_112 rem * rem * Set the Environment for the Java Environment... rem set JAVABASE=C:\APACHETC\apache-tomcat-7.0.52 set JAVABASE=C:\Program Files (x86)\Java\jdk1.8.0_112 set JAVASDK="%JAVABASE%\bin" set JAVA_HOME=%JAVABASE% set JRE_HOME=%JAVABASE% set SIMOTCAT=%CATALINA_HOME%\webapps\simotcat set SIMPACKS=%CATALINA_HOME%\webapps\simotcat\WEB-INF\classes\simpacks rem * rem * Set the environment for the Micro Focus technology... set MIFOEDEV=C:\Program Files (x86)\Micro Focus\Enterprise Developer set MIFOVCBL=C:\Program Files (x86)\Micro Focus\Visual COBOL Build Tools set MIFOESTU=C:\Program Files (x86)\Micro Focus\Studio Enterprise Edition 6.0 set MIFOEMFE="C:\Program Files (x86)\Micro Focus\Mainframe Express" rem * rem * Large file support, performance tuning and record locking of the File Handler set EXTFH=%BASESYS%\CONFIG\EXTFHBIG.CFG rem * rem * For IMS Support set ES_IMSLIB=%BASEAPP%\IMSLIB set ES_ACBLIB=%BASEAPP%\IMSLIB rem * rem * EZASOKETS Check EZASOKETS Enabled box or set ES_EZASOKET_SUPPORT=YES set EZACONFG=BASESYS1\CONFIG\EZACONFG.dat rem * rem * Resource Allocation and Performance for SORT and non-Relational Data rem set MFJSENGINE=SYNCSORT set SORTSCHEME=1 set SORTSPACE=750000000 set TMP=C:\SORTWORK rem * set ES_ALLOC_OVERRIDE=%BASESYS%\CONFIG\CATMAPA1.cfg rem * For CORE_ON_ERROR function, ABEND Dump rem * set COBCONFIG_=%BASESYS%\CONFIG\diagnose.cfg rem * rem * Consolidated Trace Facility (CTF) rem * set MFTRACE_CONFIG=%BASESYS%\CONFIG\ctf.cfg rem * set MFTRACE_LOGS=c:\ctflogs rem * rem * For Job Restart, ABEND Recovery set MF_UCC11=Y set ES_JES_RESTART=Y rem * rem * Set environment for MFBSI (Micro Focus Batch Scheduling Interface) set ES_EMP_EXIT_1=mfbsiemx set MFBSI_DIR=%BASESYS%\LOGS\%JESSERVERNAME% set MFBSIEOP_CMD=ENABLE set MFBSIEOP_CSV=ENABLE set MFBSIEOP_HTM=ENABLE set MFBSIEOP_XML=ENABLE rem * rem * Set Behavior and Trace Flags for GETJOBDD rem * Position=12345678/12345678 set JDDFLAGS=nnnWnnnn/YYnnnnnn rem * rem * If not already set then set the PATH for Micro Focus Directories if "%SIMOPATH%" == "Y" goto JUMPPATH if "%MIFOSYS1%" == "EDEV" goto JUMPEDEV if "%MIFOSYS1%" == "VCBL" goto JUMPVCBL if "%MIFOSYS1%" == "ESTU" goto JUMPESTU if "%MIFOSYS1%" == "EMFE" goto JUMPEMFE :JUMPEDEV set path=%BASESYS%\LOADLIB;%MIFOEDEV%\bin;%JAVASDK%;%BASEAPP%\JAVA;%PATH%; set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOEDEV%\CPYLIB set MIFOBASE=%MIFOEDEV% goto JUMPPATH :JUMPVCBL set path=%MIFOVCBL%\bin;%MIFOVCBL%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%; set MIFOBASE=%MIFOVCBL% goto JUMPPATH :JUMPESTU set MIFOBASE=%MIFOESTU%\Base set MIFOBIN=%MIFOBASE%\bin set path=%BASESYS%\LOADLIB;%MIFOBASE%;%MIFOBIN%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%; set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOBASE%\SOURCE goto JUMPPATH :JUMPEMFE set MIFOBASE=%MIFOEMFE%\Base set MIFOBIN=%MIFOBASE%\bin set path=%BASESYS%\LOADLIB;%MIFOBASE%;%MIFOBIN%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%; set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOBASE%\SOURCE goto JUMPPATH rem * :JUMPPATH set SIMOPATH=Y rem * set MAINFRAME_FLOATING_POINT=true set COBIDY=%BASEAPP%\COBIDY set COBPATH=.;%BASEAPP%\LOADLIB;%BASEAPP%\LOADLIB\GNTS;%BASESYS%\LOADLIB;%SimoLIBR% set LIBPATH=.;%BASEAPP%\LOADLIB;%BASEAPP%\LOADLIB\GNTS;%BASESYS%\LOADLIB;%SimoLIBR% set TXDIR=%BASESYS%\LOADLIB;%MIFOBASE% set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR% rem * set USERCLASS=%BASELIB1%\LOADLIB set CLASSPATH=. set CLASSPATH=%CLASSPATH%;%JAVABASE% set CLASSPATH=%CLASSPATH%;%JAVABASE%\lib set CLASSPATH=%CLASSPATH%;\%USERCLASS%\simpacks set CLASSPATH=%CLASSPATH%;C:\APACHETC\apache-tomcat-7.0.52\webapps\simotcat\WEB-INF\classes set CLASSPATH=%CLASSPATH%;C:\APACHETC\apache-tomcat-7.0.52\webapps\simotcat\WEB-INF\classes\simpacks rem * if "%MIFOSYS1%" == "ESTU" set CLASSPATH=%CLASSPATH%;%MIFOBIN% if "%MIFOSYS1%" == "EDEV" set CLASSPATH=%CLASSPATH%;%MIFOEDEV% if "%MIFOSYS1%" == "VCBL" set CLASSPATH=%CLASSPATH%;%MIFOVCBL% if "%MIFOSYS1%" == "VCBL" set CLASSPATH=%CLASSPATH%;%MIFOVCBL%\bin\mfcobol.jar rem * set JobStatus=0000 call SIMONOTE "+ ENV1BASE is returning to caller"
The following (SIMONOTE.cmd) is a Windows Command file that may be called from other scripts and expects a single parameter enclosed in double quotes. The double quotes will be removed. The text message will be displayed to the screen. Before writing to the log file a date and time stamp will be inserted in front of the message text.
@echo OFF rem * ******************************************************************* rem * SIMONOTE.cmd - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * rem * Text - Display message on screen and write to a log file. rem * Author - SimoTime Technologies rem * rem * This script may be called from other scripts and expects a single rem * parameter enclosed in double quotes. The double quotes will be rem * removed. Before writing to the log file a date and time stamp rem * will be inserted in front of the message text. rem * rem * Note: The tilde (~) removes leading/trailing double-quotes. rem * if "%SimoNOTE%" == "" set SimoNOTE=c:\SimoLIBR\LOGS\SimoTime.LOG echo %date% %time% %~1>> %SimoNOTE% echo %~1
The following members are for the Linux Environment. The Batch Job Scripts use Bash Script Files.
The following shows the snippet of code that is used at the start of a batch job. This snippet of code will access a configuration file (ENV4SYS1.cfg) and set the base system environment for batch job execution.
#!/bin/bash JOBNAME=jobname for textstring in $(cat ENV4SYS1.cfg); do # # * The following statement will replace all occurences # # * of USD_BASESYS1 with the value of the BASESYS1 # # * environment variable. textstring=${textstring//USD_BASESYS1/$BASESYS1} # # * The following statement will replace all occurences # # * of USD_JOBNAME with the value of the JOBNAME # # * environment variable. textstring=${textstring/USD_JOBNAME/$JOBNAME} export $textstring rc=$? if [ $rc != 0 ] then simonote.sh "# $textstring - Return Code is $rc" JOBSTATUS=$rc fi done
The following shows the content of the configuration file (ENV4SYS1.cfg) that is used to set the base environment. This member is used to provide a single point for managing the commonly used system environment variables.
BASESYS1=/home/larry/SIMOSY76 COB_LIBS=USD_BASESYS1/SIMOSAM1/DEVL/LOADLIB:USD_BASESYS1/SIMOLIBR COB_LIBRARY_PATH=USD_BASESYS1/SIMOSAM1/DEVL/LOADLIB:USD_BASESYS1/SIMOLIBR SIMONOTE=USD_BASESYS1/SIMOSAM1/DEVL/LOGS/JOBLOG_SIMONOTE_USD_JOBNAME.txt
When the configuration file is processed by a batch job script the "USD_" text string will be replaced by a the "$" symbol.
The following (simonote.sh) is a Linux Bash script file that may be called from other scripts and expects a single parameter enclosed in double quotes. The double quotes will be removed. The text message will be displayed to the screen. Before writing to the log file a date and time stamp will be inserted in front of the message text.
#!/bin/bash # * ******************************************************************* # * simonote.sh - a Bash Script File * # * This program is provided by SimoTime Technologies * # * (C) Copyright 1987-2018 All Rights Reserved * # * Web Site URL: http://www.simotime.com * # * e-mail: helpdesk@simotime.com * # * ******************************************************************* # * # * Text - Display message on screen and write to a log file. # * Author - SimoTime Technologies # * # * This script may be called from other scripts and expects a single # * parameter enclosed in double quotes. The double quotes will be # * removed. Before writing to the log file a date and time stamp # * will be inserted in front of the message text. # * # * Note: The tilde (~) removes leading/trailing double-quotes. # * # * "$simonote" == "" export SimoNOTE=/SIMOLIBR/LOGS/JESLOG_BASHUSER.txt if [ "$SIMONOTE" = "" ] then export SIMONOTE=SIMONOTE_JOBLOG_BASHUSER.txt fi echo $(date +'%Y/%m/%d') - $(date +'%r') $1>> $SIMONOTE echo $1
Set the environment variables that are used by the data file conversion processes.
This procedure runs a program (UTCONVRT.GNT) that edits the Process Control File and if the information is correct it creates a command file and a specifications file based on the information in a Process Control File. The newly created command file is executed to generate the COBOL data file conversion programs and optional HTML documentation for a COBOL copy file.
@echo OFF rem * ************************************************************************ rem * SIMOCONV.cmd - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2021 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ************************************************************************ rem * This procedure runs a program to create a command file and a rem * specifications file based on the information in a Process Control File. rem * If the status is correct the newly created command file is executed. rem * ************************************************************************ rem * rem * Set the environment variable to use the default directives file. set CmdName=SIMOCONV call SimoNOTE "**********************************************************************%CmdName%" call SimoNOTE "Starting %CmdName% Prepare the Environment for a Convert" set ConvertStatus=0000 set UTCONVD1=%UTGENGET%\%1.pcf set UTCONVD2=%UTGENGET%\%1_genr.cmd set UTCONVD3=%UTGENGET%\%1_spec.txt if exist %UTCONVD2% erase %UTCONVD2% if exist %UTCONVD3% erase %UTCONVD3% call SimoNOTE "Continue %CmdName% Generation requested output using %1_genr" call SimoNOTE "Generate PCF File is %UTCONVD1% run UTCONVRT if not "%ERRORLEVEL%" == "0" set ConvertStatus=0010 if not "%ConvertStatus%" == "0000" goto :ConvertEojNOK rem * rem * ************************************************************************ :ConvertEojAOK set /A AOK_Count=%AOK_Count% + 1 call SimoNOTE "Continue %CmdName% Execution..... Task=%1_genr" call %1_genr if not "%ERRORLEVEL%" == "0" set ConvertStatus=0020 if not "%ConvertStatus%" == "0000" goto :ConvertEojNOK if not "%SIMODROP%" == "Y" goto SkipCleanup call SimoNOTE "Continue %CmdName% Housekeeping..... Task=%1_genr" if exist %UTCONVD2% erase %UTCONVD2% if exist %UTCONVD3% erase %UTCONVD3% :SkipCleanup call SimoNOTE "Complete %CmdName%, RC=%ConvertStatus%, PGM=%1" goto :End rem * rem * ************************************************************************ :ConvertEojNOK set JobStatus=%ConvertStatus% set /A NOK_Count=%NOK_Count% + 1 call SimoNOTE "ABENDING %CmdName%, RC=%ConvertStatus%, PGM=%1, !!!ABENDING!!!" echo %1 - Error during SIMOCONV, refer to %BaseLib1%\LIST\%1.LST>%BaseLib1%\LOGS\%1.ERR goto :End rem * rem * ************************************************************************ :End
Set the environment variables for the process that generates the COBOL code that will do the actual data file conversion.
rem * ******************************************************************* rem * USERCONV.cmd - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * Set the environment variables for the COBOL code generation rem * process for data file conversion. rem * set UTCOBCPY=c:\SimoSam1\DEVL\CobCpy1 set UTHTMLIB=c:\SimoSam1\DEVL\SIMOGENS\CONVERTS\HTML set UTGENGET=c:\SimoSam1\DEVL\SIMOGENS\CONVERTS set UTGENPUT=c:\SimoSam1\DEVL\SIMOGENS\CONVERTS\GENS set UTMODLIB=c:\SIMOLIBR set UTWRKLIB=c:\SimoSam1\DEVL\SIMOGENS\CONVERTS\WORK set SIMOCFG1=SIMOCFG1.CFG rem * call SIMONOTE "UTCOBCPY is %UTCOBCPY%" call SIMONOTE "UTHTMLIB is %UTHTMLIB%" call SIMONOTE "UTGENGET is %UTGENGET%" call SIMONOTE "UTGENPUT is %UTGENPUT%" call SIMONOTE "SIMOCFG1 is %SIMOCFG1%"
This section will focus on tips and techniques that are available when doing problem determination. Techniques for tracking program behavior and memory content will be discussed.
Micro Focus provides an explicit call to enable the visual debugger. The call may be placed in a user program at the entry point into the program or at a preferred user location in the program. The call name is greater than eight characters (CBL_DEBUGBREAK). When using a mainframe dialect this will cause a compile error. This may be easily resolved by using a small program that is compiled with a Micro Focus dialect and issues a call to CBL_DEBUGBREAK.
Note: The CBLBREAK.cbl program must be compiled with a Micro Focus dialect.
The following (CBLBREAK.cbl) is the source code for a load member that will do the call to CBL_DEBUGBREAK and may be called from a COBOL program that has been compiled with a mainframe dialect.
IDENTIFICATION DIVISION. PROGRAM-ID. CBLBREAK. ***************************************************************** PROCEDURE DIVISION. call 'CBL_DEBUGBREAK' GOBACK.
WIP
Explore How to Dump the Content of a User Data String to the System Console Log. The dump information will be in hexadecimal format with a possible ASCII and EBCDIC translation.
Prior to the mid-1980's it was necessary to use an editor with hex capability to key in hexadecimal values. Once a source member contained hexadecimal values it had to be carefully monitored because many editors would only display a space since the hex value could not be displayed. In addition, the compiler listing would display spaces and the embedded hex characters were hidden from view. A programmer could make a change that had nothing to do with the hex values and inadvertently change the hex value to a space when the member was saved. The program would then fail in a completely unexpected manner and the resulting debugging effort could take a significant amount of time. In other words this was (and still is) an accident waiting to happen on the mainframe.
During the mid-1980's IBM introduced COBOL/2 and it provided COBOL programmers with a method for defining data fields containing hexadecimal values. Therefore, there is no excuse to continue the practice of using hexadecimal characters in COBOL source code.
Explore How to Identify Hexadecimal Characters in program Source code using this utility program. This utility reads an EBCDIC-encoded, record sequential file and writes to an ASCII-encoded, Line Sequential file. The records with embedded hexadecimal characters are converted and copied followed by two comment lines that show the original hexedecimal values.
This document provides information about program members that are shared with (or called by) other tasks or applications. This document may be used to assist as a tutorial for new programmers or as a quick reference for experienced programmers.
In the world of programming there are many ways to solve a problem. This documentation and software were developed and tested on systems that are configured for a SIMOTIME environment based on the hardware, operating systems, user requirements and security requirements. Therefore, adjustments may be needed to execute the jobs and programs when transferred to a system of a different architecture or configuration.
SIMOTIME Services has experience in moving or sharing data or application processing across a variety of systems. For additional information about SIMOTIME Services or Technologies please contact us using the information in the Contact or Feedback section of this document.
Software Agreement and Disclaimer
Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Technologies. Once the fee is received by SimoTime the latest version of the software, documentation or training material will be delivered and a license will be granted for use within an enterprise, provided the SimoTime copyright notice appear on all copies of the software. The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Technologies.
SimoTime Technologies makes no warranty or representations about the suitability of the software, documentation or learning material for any purpose. It is provided "AS IS" without any expressed or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement. SimoTime Technologies shall not be liable for any direct, indirect, special or consequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software, documentation or training material.
This section includes links to documents with additional information that are beyond the scope and purpose of this document. The first group of documents may be available from a local system or via an internet connection, the second group of documents will require an internet connection.
Note: A SimoTime License is required for the items to be made available on a local system or server.
The following links may be to the current server or to the Internet.
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 File Status Return Codes that are used to interpret the results of accessing VSAM data sets and/or QSAM files.
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. This link requires an Internet Connection
Explore The Micro Focus Web Site for more information about products (including Micro Focus COBOL) and services available from Micro Focus. This link requires an Internet Connection.
Explore the Glossary of Terms for a list of terms and definitions used in this suite of documents and white papers.
This document was created and is maintained by SimoTime Technologies. If you have any questions, suggestions, comments or feedback please use the following contact information.
1. | Send an e-mail to our helpdesk. |
1.1. | helpdesk@simotime.com. |
2. | Our telephone numbers are as follows. |
2.1. | 1 415 763-9430 office-helpdesk |
2.2. | 1 415 827-7045 mobile |
We appreciate hearing from you.
SimoTime Technologies was founded in 1987 and is a privately owned company. We specialize in the creation and deployment of business applications using new or existing technologies and services. We have a team of individuals that understand the broad range of technologies being used in today's environments. Our customers include small businesses using Internet technologies to corporations using very large mainframe systems.
Quite often, to reach larger markets or provide a higher level of service to existing customers it requires the newer Internet technologies to work in a complementary manner with existing corporate mainframe systems. We specialize in preparing applications and the associated data that are currently residing on a single platform to be distributed across a variety of platforms.
Preparing the application programs will require the transfer of source members that will be compiled and deployed on the target platform. The data will need to be transferred between the systems and may need to be converted and validated at various stages within the process. SimoTime has the technology, services and experience to assist in the application and data management tasks involved with doing business in a multi-system environment.
Whether you want to use the Internet to expand into new market segments or as a delivery vehicle for existing business functions simply give us a call or check the web site at http://www.simotime.com
Return-to-Top |
Define Base Environment, Commonly used Program Members |
Copyright © 1987-2025 SimoTime Technologies and Services All Rights Reserved |
When technology complements business |
http://www.simotime.com |