The SimoMODS Series
 Called Routines, Utility Programs and Interface Programs
When technology complements business    Copyright © 1987-2012  SimoTime Enterprises  All Rights Reserved
  Table of Contents Version 10.11.01 
  Introduction
  Install & Use the Shared Modules, A Quick Start Process
  Callable Sub-Routines
  SimoABN0, Callable ABEND Routine
  SimoBITS, Expand or Compress 8-Bits or 8-Bytes
  SimoBSIO, Byte Stream I/O using Micro Focus COBOL
  SimoCARD, Accessing files with 80-byte Records (Card Images)
  SimoCASE, Case Conversion of Text within a Field
  SimoDATE, Provide Date Validation and Editing
  SimoDUMP, Provide Hex-Dump Information
  SimoHEX4, Provide Hex-Dump Information
  SimoJUST, Justify Text within a Field (Center, Right or Left)
  SimoLOGS, Write to a Log File and Display to Console
  SimoPARS, Parse a Field by Keywords
  SimoRA12, Right-Adjust and Zero-Fill
  SimoROAD, Edit and Modify a Street Address
  SimoSNAP, A Snap-Shot Hex-Dump of Memory
  SimoSTAT, File Status Codes
  SimoSUB1, Substitute or Replace a String within a Field
  SimoTXTN, Convert Numbers to Words
  SimoVREC, Variable Length File (Mainframe Format)
  Utility Programs
  ASMOGENR, Generate non-Executable Load Members from Assembler Table Definitions
  HTMGENER, Generate HTML Documentation from Excel Information
  MFCATPOP, Populate a Micro Focus Catalog
  MFCATXPT, Catalog Export Utility Program
  MFENVARS, Get or Set Environment Variables
  MFEVENTS, Display CALL Stack to SYSOUT
  MFJESLOG, Presentation or Sharing Alternatives
  MFWAITER, the Wait or Sleep Function
  STRPROBE, Analyze STR File and Create New COBOL Source Definition of Data Structure
  UTCOMPRT, Generate a Program to Compare Two Data Files
  UTCONVRT, Generate the Programs to Convert Data Files
  Interface or Driver Programs
  SimoEXEC, Driver Program for Net Express Applications
  SimoNOTE, Display Message, Write to Log File
  SimoPARK, Parse a Field by Keywords
  ZZWAITER, Accept Windows Command Parameter and pass as per JCL Format
  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)

The SimoMODS are a collection of shared modules that perform common tasks or repeatable processes for a variety of users that include application programmers, system programmers, developers and support personnel. The SimoMODS are divided into three (3) categories.

item Description
1 Callable Members or sub-routines, This group may have an Application or Data Orientation, the members in this category are usually callable sub-routines that perform common repeatable business or data related tasks.
2 Utility Programs, This group may have a Utilitarian Orientation, the items in this category focus on utilitarian task to assist development and support personnel to perform their daily tasks. These are usually stand alone programs that focus on a specific task or function.
3 Interface or Driver Programs, This group may have a System or Sub-System Orientation, the items in this category focus on the environment and the interaction of the various applications, sub-systems and the operating system.
  A brief Overview of the Categories for the Shared or Common Members

The SimoMODS that are written in COBOL have been compiled with Micro Focus Net Express to create executable members. The executable members are intended for use in an ASCII-encoded environment and may be used with Net Express, Application Server or Enterprise Server running on a Microsoft Windows system. The SimoMODS programs in the applications-oriented group have been ported (at the source code level) to UNIX, Linux, AS/400 and many were originally devloped and continue to run on an IBM Mainframe (both ZOS and VSE).

This document provides information or links to information for the callable routines provided in the SimoMODS Suite of programs. Additional information about this program may be obtained by sending an e-mail to: helpdesk@simotime.com

Install & Use the Shared Modules, A Quick Start Process
(Next) (Previous) (Table-of-Contents)

To quickly install and use the SimoMODS shared modules the following procedure is recommended.

Step Description
Step 1 Create a new directory and make the new directory the current directory using the following statements.
c:\> MD SimoLIBR
c:\> CD SimoLIBR
c:\SimoLIBR
Step 2 Create three sub-directories under the SimoLIBR directory using the following statements.
c:\SimoLIBR> MD DataWrk1
c:\SimoLIBR> MD HTML
c:\SimoLIBR> MD LOGS
Step 3 Download the zPack for the executable members using the following URL
http://www.simotime.com/sim4dzip.htm#ZipsforSharedModules.
Step 4 Unzip the contents of the execmods.zip file into the c: \SimoLIBR directory.
Step 5 Add the SimoLIBR directory to the Windows PATH.
  A Quick Start for using the Shared Members

After completing the preceding steps the SimoLIBR directory should contain the three sub-directories, the executable members, the COBOL copy files and a couple of command files(additional members may be in the SimoLIBR directory if other technologies have been downloaded from the SimoTime web site). To validate the proper installation execute the Ivp4NOTE.CMD file. This may be done from a command line window or by simply clicking on the item from a Windows Explorer display.

Note: Many of the examples and technologies available from SimoTime use the services provided by the SimoMODS drivers and callable routines.

Callable Sub-Routines
(Next) (Previous) (Table-of-Contents)

This group may have an Application or Data Orientation, the members in this category are usually callable sub-routines that perform common repeatable business or data related tasks.

SimoABN0, Callable ABEND Routine
(Next) (Previous) (Table-of-Contents)

The SimoABN0 routine (or callable routine) is for use in a Micro Focus environment. The routine will call MFEVENTS.CBL to display the call stack and then issue a STOP RUN to terminiate processing.

For additional information about this callable routine refer to the simoabn0.htm document.

SimoBITS, Expand or Compress 8-Bits or 8-Bytes
(Next) (Previous) (Table-of-Contents)

The SimoBITS routine (or callable routine) will convert the bit information in a single byte to or from an eight-byte field of COBOL accessible zeroes and ones.

For additional information about this callable routine refer to the simobits.htm document.

SimoBSIO, Byte Stream I/O using Micro Focus COBOL
(Next) (Previous) (Table-of-Contents)

SimoBSIO is a callable routine that uses the Micro Focus Byte-Stream I/O capability to access a file. This routine may access a single byte or multiple bytes of data at the specified offset into the file. SimoBSIO is written and tested using the Micro Focus COBOL dialect (it will only execute in a Micro Focus environment, it will not compile and run on a mainframe system).

For additional information about this callable routine refer to the simobsio.htm document.

SimoCARD, Accessing files with 80-byte Records (Card Images)
(Next) (Previous) (Table-of-Contents)

On the mainframe it is a common practice to read a record sequential file of eighty (80) byte, fixed length records to obtain information or specifications that will affect the behavior of program execution. The eighty (80) byte records are a carry-over from the days when eighty-column cards were used. Even today these files are referred to as card files. The technique for accessing these files varies and this suite of utility programs with examples will describe a few of the possible techniques.

In addition, when an application is moved between an EBCDIC-encoded Mainframe platform and a Linux, UNIX or Windows (LUW) platform with Micro Focus it may continue to run in an EBCDIC-encoded environment or be converted to run in an ASCII-encoded environment. Furthermore, the file format may continue to be eighty (80) byte, fixed record length, record sequential files (also referred to as RSEQ) or the files may be converted to ASCII/Text files (also referred to as Line Sequential or LSEQ). Adding to all this confusion the files may be stored as data files, members in a PDS or instream data in a JCL or PROC member. This introduces a new set of challenges.

For additional information about this callable routine refer to the simocard.htm document.

SimoCASE, Case Conversion of Text within a Field
(Next) (Previous) (Table-of-Contents)

The SimoCASE routine does simple conversions of text strings between Upper and Lower Case. It also has some advanced functions to do capitalization of the first letter in a word and/or identify certain words to be exempt from the conversion process.

Function Description
0 Convert a text string to lower case.
1 Convert a text string to upper case.
2 Capitalize each word in a text string.
3 Edit specific words in a text string using pre-defined table values.
  A Summary of the Functions Provided by the SimoCASE Routine

For additional information about this callable routine refer to the simocase.htm document.

SimoDATE, Provide Date Validation and Editing
(Next) (Previous) (Table-of-Contents)

The SimoDATE routine (or callable program) will validate, edit and convert a given date in the ccyymmdd format into various other formats. For example, if the date of 20000401 (or April 1, 2000) is pased to the SimoDATE routine the following will be returned in the pass area.

Gregorian Date .............. 20000401
Edited Gregorian Date ....... 2000-04-01
Text for the Date............ April 1, 2000
Julian Date ................. 2000092
Days remaining in the year .. 274
Leap Year Flag (Y or N) ..... Y
Days in the Month ........... 30
Text for the Month .......... April

For additional information about this callable routine refer to the simodate.htm document.

For an example that will calculate the difference in days between two dates click on this link.

SimoDUMP, Provide Hex-Dump Information
(Next) (Previous) (Table-of-Contents)

This routine will display the contents of a field in hexadecimal format with the EBCDIC and ASCII translation where possible. Also, the information may be written to a log file or simply passed back to the calling program. The format of the dump information is intended for use when dumping the contents of memory or WORKING-STORAGE.

For additional information about this callable routine refer to the simodump.htm document.

SimoHEX4, Provide Hex-Dump Information
(Next) (Previous) (Table-of-Contents)

This routine will display the contents of a field in hexadecimal format with the EBCDIC and ASCII translation where possible. Also, the information may be written to a log file or simply passed back to the calling program. The format of the dump information is intended for use when dumping the contents of data file records.

For additional information about this callable routine refer to the simohex4.htm document.

SimoJUST, Justify Text within a Field (Center, Right or Left)
(Next) (Previous) (Table-of-Contents)

This program provides an example of how to justify or position a text string within a field. The example shows how to do the following.

Item Description
Step 1 Center a text string within a field.
Step 2 Right justify a text string within a field.
Step 3 Left justify a text string within a field.
  A Summary of the Functions Provided by the SimoJUST Routine

For additional information about this callable routine refer to the simojust.htm document.

SimoLOGS, Write to a Log File and Display to Console
(Next) (Previous) (Table-of-Contents)

This program provides an example of how to display text messages to the screen and write the information to a log file. When the text message is written to a log file it is preceded by a date and time stamp.

For additional information about this callable routine refer to the simologs.htm document.

SimoPARS, Parse a Field by Keywords
(Next) (Previous) (Table-of-Contents)

This program provides an example of how to parse keywords within a field and then access each keyword using the "Reference Modification" feature of the COBOL language.

For additional information about this callable routine refer to the simopars.htm document.

SimoRA12, Right-Adjust and Zero-Fill
(Next) (Previous) (Table-of-Contents)

This program provides an example of how to right-adjust and zero fill a string of digits within a field.

For additional information about this callable routine refer to the simora12.htm document.

SimoROAD, Edit and Modify a Street Address
(Next) (Previous) (Table-of-Contents)

This is an example of a callable COBOL program that will edit and modify a text string (or field) that contains a street address (oriented for the United States).

For additional information about this callable routine refer to the simoroad.htm document.

SimoSNAP, A Snap-Shot Hex-Dump of Memory
(Next) (Previous) (Table-of-Contents)

The SimoSNAP routine (or callable program) is a callable memory dump routine for a linear area of memory. Its primary purpose is to dump the working storage section of a program but may be used to dump other areas of memory or partial areas of working storage. A secondary purpose is to calcualte the size of the memory area.

The callable module (SIMOSNAP) is used to determine the size and dump the content of a COBOL program's WORKING-STORAGE section in a Hex-dump format. The SIMOSNAP routine is intended to be used by application programs currently running on a Linux, UNIX or Windows (LUW) system with Micro Focus. A sample program (CBSNAPC1.CBL) is provided and describes the details of calling and reviewing the output of the snap-dump routine.

For additional information about this callable routine refer to the simosnap.htm document.

SimoSTAT, File Status Codes
(Next) (Previous) (Table-of-Contents)

This program provides an example of how to access and display a File Status Code after an attempted file access in a COBOL program.

For additional information about this callable routine refer to the simostat.htm document.

SimoSUB1, Substitute or Replace a String within a Field
(Next) (Previous) (Table-of-Contents)

This program provides an example of how to replace a text string within a fixed-length field with a text string of a different length.

For additional information about this callable routine refer to the simosub1.htm document.

SimoTXTN, Convert Numbers to Words
(Next) (Previous) (Table-of-Contents)

The SimoTXTN routine will create a 150-character text data string from a 12-digit numeric field. For example, if the numeric field contains 000000001234 then a text string is created with the following information.

One-Thousand-Two-Hundred-Thirty-Four

For additional information about this callable routine refer to the simotxtn.htm document.

SimoVREC, Variable Length File (Mainframe Format)
(Next) (Previous) (Table-of-Contents)

This callable routine will read a file of variable length records that is in a mainframe format for variable length records.

For additional information about this callable routine refer to the simovrec.htm document.

Utility Programs
(Next) (Previous) (Table-of-Contents)

The items in this category focus on utilitarian task to assist development and support personnel to perform their daily tasks. These are usually stand alone programs that focus on a specific task or function.

ASMOGENR, Generate non-Executable Load Members from Assembler Table Definitions
(Next) (Previous) (Table-of-Contents)

In the CICS environment on the mainframe it was a common practice to use the EXEC CICS LOAD function to load a data table into memory. These data tables were typically created as mainframe assembler source members. The source members were then compiled and linked as non-Executable load members. This example will describe how to create a non-executable member from Assembler Source Code for the Micro Focus Studio and Server environments running in EBCDIC or ASCII by reading the assembler source member containing data definition opcodes and creating a .MOD file.

For additional information about this utility program refer to the asmogenr.htm document.

HTMGENER, Generate HTML Documentation from Excel Information
(Next) (Previous) (Table-of-Contents)

The HTMGENER program provides the capabiliy of quickly creating multple HTML documents with a consistent look and feel. It is inteneded to be used by developers and support personnel to create application documentaion that is primarly text-oriented. By using an HTML format the documents may be easily viewed using a Web Browser.

The HTMGENER program provides the capabiliy of creating simple block diagrams or flow charts. A description of this functionality along with examples is included in following sections of this document and the links to other documents.

Note: Many of the documents on the SimoTime Web site were created using HTMGENER

For additional information about this utility program refer to the htmgener.htm document.

MFCATPOP, Populate a Micro Focus Catalog
(Next) (Previous) (Table-of-Contents)

The MFCATPOP Utility Program will read a record sequential file containing a list of names and properties for various data structures (i.e. PDS's, GDG;s, Sequential Data Files and VSAM Data Sets) and create catalog entries in the Micro Focus catalog.

For additional information about this utility program refer to the mfcatpop.htm document.

MFCATXPT, Catalog Export Utility Program
(Next) (Previous) (Table-of-Contents)

This program provides presentation alternatives for reviewing or sharing the contents of the Micro Focus catalog. The MFCATXPT program will read a CATALOG.DAT file created by Micro Focus and produce a Comma Separated Values (or CSV) file with data file information. The information included in the CSV file may be easily imported into an Excel spreadsheet. This information includes the Data Set Name (DSN), Record Format (RECFM), Data Set Organization (DSORG), the minimum and maximum record length, the key position and key length and other information.

For additional information about this utility program refer to the mfcatxpt.htm document.

MFENVARS, Get or Set Environment Variables
(Next) (Previous) (Table-of-Contents)

The MFENVARS routine (or callable program) will provide the capability of getting or setting and environment variable to a 256-byte value for use in a Micro Focus environment.

For additional information about this utility program refer to the mfenvars.htm document.

MFEVENTS, Display CALL Stack to SYSOUT
(Next) (Previous) (Table-of-Contents)

The MFEVENTS routine (or callable program) will provide the capability of identifying and displaying the call stack for the Micro Focus environment. The following is an example of the output that is written to the SYSOUT device.

For additional information about this utility program refer to the mfevents.htm document.

MFJESLOG, Presentation or Sharing Alternatives
(Next) (Previous) (Table-of-Contents)

This program provides presentation alternatives for reviewing or sharing the contents of the Micro Focus JES log. The MFJESLOG program will read a JES Spool file created by Micro Focus and produce an HTML or CSV file with job and job step information such as start, stop and elapsed times along with the Job Name, Job Number and the condition code at the end of each step and at the end of job.

For additional information about this utility program refer to the mfjeslog.htm document.

MFWAITER, the Wait or Sleep Function
(Next) (Previous) (Table-of-Contents)

The purpose of this callable routine is to WAIT (or SLEEP) for a specified amount of time. This is a callable routine (MFWAITER.cbl) that will return to the calling program after the specified amount of time.

For additional information about this utility program refer to the mfwaiter.htm document.

STRPROBE, Analyze STR File and Create New COBOL Source Definition of Data Structure
(Next) (Previous) (Table-of-Contents)

The STRPROBE program will read a Micro Focus Structure file, analyze the information and create a new COBOL source member that defines the data structure or a record layout.

For additional information about this utility program refer to the strprobe.htm document.

UTCOMPRT, Generate a Program to Compare Two Data Files
(Next) (Previous) (Table-of-Contents)

The SimoTime Utility Program (UTCOMPRT) for Data File Comparison runs on a Windows System with Micro Focus and will generate the COBOL source code for a program that will do a compare of two data files on a record by record basis.

For additional information about this utility program refer to the utcomprt.htm document.

UTCONVRT, Generate the Programs to Convert Data Files
(Next) (Previous) (Table-of-Contents)

The UTCONVRT program runs in the Windows environment and generates conversion programs (COBOL Source Code) that may be compiled and executed on a distributed LUW platform with Micro Focus or an IBM Mainframe System. The UTCONVRT program is capable of generating programs that do File Format, Record Format and Record Content Conversion.

For additional information about this utility program refer to the utconvrt.htm document.

Interface or Driver Programs
(Next) (Previous) (Table-of-Contents)

This section describes programs that provide an interface to system functions from an application program. Driver programs that help isolate operating system differences are also included in this section.

SimoEXEC, Driver Program for Net Express Applications
(Next) (Previous) (Table-of-Contents)

The SimoEXEC driver program is used to execute a user-defined filename.DLL or a filename.GNT that was created by Micro Focus COBOL. The purpose of this program is to execute the user-defined program as if it were being executed by mainframe JCL. It will examine the Windows command line for parameters and pass them through as if they were provided using the PARM= keyword of mainframe JCL. It also has the capability of writing to a SYSLOG file.

For additional information about this callable routine refer to the simoexec.htm document.

SimoNOTE, Display Message, Write to Log File
(Next) (Previous) (Table-of-Contents)

This Windows Command File may be called from other command files and will display a string of message text to the screen and write to a log file in a consistent, predefined format. The log file function provides a way to review the results of running a command file that was scheduled and executed in an unattended environment. Prior to writing a message to the log file a date and time stamp is inserted in front of the message text. This command file is intended to be called by other command files and used in the Microsoft Windows environment.

For additional information about this callable routine refer to the simonote.htm document.

SimoPARK, Parse a Field by Keywords
(Next) (Previous) (Table-of-Contents)

This program provides an example of how to share a data area between programs that are executing in a single Micro Focus Run Unit. This routine is provided for the batch environment.

For additional information about this callable routine refer to the simopark.htm document.

ZZWAITER, Accept Windows Command Parameter and pass as per JCL Format
(Next) (Previous) (Table-of-Contents)

WIP

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

The purpose of this document is to assist as a tutorial for new programmers or as a quick reference for experienced programmers. In the world of programming there are many ways to solve a problem. This documents and the links to other documents are intended to provide a choice of alternatives.

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

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

SimoTime Enterprises makes no warranty or representations about the suitability of the software, documentation or learning material for any purpose. It is provided "AS IS" without any expressed or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement. SimoTime Enterprises shall not be liable for any direct, indirect, special or consequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software, documentation or training material.

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

This section includes links to documents with additional information that is beyond the scope and purpose of this document.

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

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

You may view the complete list of SimoTime callable modules, interface programs or driver programs at http://www.simotime.com/sim4dzip.htm#ZipsforSharedModules.

The following table provides a quick reference to examples that use the SimoMODS programs.

Sample Description
jcscan01 MFENVARS is the callable routine used by this example. The MFENVARS is used to dynamically map physical file names to the logical file name used in the program.
jcscan01 MFJESLOG is the callable routine used by this example.
abtest01 SIMOABN0 is the callable routine used by this example.
cblbit01 SIMOBITS is the callable routine used by this example.
vrecex01 SIMOBSIO is the callable routine used by this example.
casecr01 SIMOCASE is the callable routine used by this example.
cbldat01 SIMODATE is the callable routine used by this example.
cblday01 SIMODAYS is the callable routine used by this example.
cblhbx01 SIMODUMP is the callable routine used by this example.
cblcsv01 SIMOEXEC is the callable routine used by this example.
txthex01 SIMOHEX4 is the callable routine used by this example.
cbljus01 SIMOJUST is the callable routine used by this example.
stamlr01 SIMOLOGS is the callable routine used by this example.
simmsg01 SIMONOTE is the callable routine used by this example.
cblrmp01 SIMOPARS is the callable routine used by this example.
cblraz01 SIMORA12 is the callable routine used by this example.
cbsnap01 SIMOSNAP is the callable routine used by this example.
cblrtn01 SIMOSTAT is the callable routine used by this example.
cblrep01 SIMOSUB1 is the callable routine used by this example.
cbltxn01 SIMOTXTN is the callable routine used by this example.
vrecex01 SIMOVREC is the callable routine used by this example.
  A Qucik Reference to Sample Programs that use the SimoMODS Programs

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

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
The SimoMODS Series - Called Routines, Utility Programs and Interface Programs
Copyright © 1987-2012 SimoTime Enterprises  All Rights Reserved
When technology complements business
http://www.simotime.com