![]() |
SimoLYZE Source Member Typing http://www.simotime.com Copyright © 1987-2010 SimoTime Enterprises All Rights Reserved |
| Table of Contents | Version 09.06.29 |
What is member typing and why is it important? Member typing is the process of storing a source member and then being able to determine its content without having to examine the member. This is typically accomplished in the following ways.
| 1. | How the member is stored. Many of the source code management systems provide a capability of defining the type of member when it is being stored. | |
| 2. | Where the member is stored. Member types are stored into specifics directories or libraries base on the type of member. | |
| 3. | How the member is named. Naming conventions are used to identify a member type. For example, on the PC the file extension is typically used for this purpose. |
If a process is not established to do source member typing then it will be necessary to scan the source member content and identify the type of member. SimoLYZE is designed to scan mainframe-oriented source code and determine the member type.
Source member typing is often overlooked or receives a low priority in some programming shops. The importance of member typing is not often recognized until a change to an application is required. Attempting to estimate the skills required to implement a change and define the scope-of-effort required is difficult and time consuming when the type and quantity of members that makeup an application are not known and/or are difficult to determine.
Applications running on a mainframe are usually written in COBOL. However, mainframe applications are typically COBOL oriented but are not written entirely in COBOL. Mainframe applications are dependent on non-COBOL processes such as calls to 370 assembler subroutines, embedded calls to external sort routines and dependencies on batch processes using mainframe JCL to create and update existing data bases. If the plan is to migrate the application or distribute components of the application from the mainframe to a PC or Unix platform then additional time should be allocated to handle these situations.
Some programming shops have the technology and a process to keep track of members by type but even these shops run an average error rate of five percent or higher. Other shops or programming groups do not even attempt to track member types and many shops have a variety of application source code that has not been touched in years. Knowledge about these applications is minimal or non-existent.
If the member type is not readily available or unknown it could be a significant effort to transfer programming functions from the mainframe to the PC Desktop or an application server. Revolve (see Note-1) and Mainframe Express (see Note-2) are dependent on member typing (i.e. the existence of a file extension with the file name). Many programming shops need assistance in creating and maintaining a programming environment that incorporates member typing. All programming shops could benefit from the ability to validate the accuracy of current member typing efforts.
Once a library of source members with accurate member typing has been established the time it requires to modify, deploy and maintain an application on the mainframe or PC, Micro Focus platform may be significantly reduced. Both Revolve and Mainframe Express deliver a tremendous amount of analytical and programming power for the analysis, development, testing, maintenance and deployment of business applications. However, both products are dependent on member typing. The suite of programs provided in this package will be referred to as SimoLYZE. The primary purpose of SimoLYZE is to do member typing and provide an overview of the number and type of members stored in a mainframe library or source code management facility. Prior to doing the initial scanning of the source code it must be downloaded from the mainframe to the PC. The downloading of the source members is greatly simplified by using Mainframe Express (MFE) with Mainframe Access (MFA) that is provided by Micro Focus.
Note-1: Revolve is a very powerful application and source code analysis tool provided by Micro Focus.
Note-2: Mainframe Express (MFE) is a product that provides for the development, maintenance and testing of mainframe applications on the PC in a Windows environment. MFE also has the capability of easily downloading and uploading source members from and to the mainframe.
Note-3: The Micro Focus web site is located at: http://www.microfocus.com .
In addition to determining the member language and member type a summary report is also provided. The following is an example of the summary information that is produced by SimoLYZE.
| o o o o o o o o o |
|
o o o o o o o o o |
Please note that many of the items discussed in this document are based on the hardware and software technologies that were available when this document was created. This is a rapidly changing environment and functional improvements are expected.
During the scanning process SimoLYZE will create and/or maintain a Source Code Repository (APMASTER.DAT and .IDX) that contains information about the individual source members. Some of the information is the member language, member type, record count and date/time of last update. If a COBOL member contains EXEC CICS or EXEC SQL syntax it is noted in the repository. This information is very useful when determining the compiler directives to use with individual source members. The Source Code Repository is an indexed file in the Micro Focus file format.
For a detailed description of the record layout refer to The Source Code Repository (APMASTER) section of this document.
This documentation is intended for SimoLYZE, Version 4.0.00. The following is the minimum system requirements.
| Window/NT, Windows/XP, Windows/Vista or Windows Server | |
| 1 gig of memory | |
| 30 gig disk space | |
| Internet Explorer 7.0 or other browsers (used to review the documentation) | |
| Micro Focus Studio 5.0 or later. |
The following is a typical system configuration for running SimoLYZE with Micro Focus Mainframe Express and/or Mainframe Access.
| Window/NT, Windows/XP, Windows/Vista or Windows Server | |
| 2 gig of memory | |
| 100 gig disk space | |
| Internet Explorer 70 or or other browsers (used to review the documentation) | |
| Micro Focus Mainframe Express or Micro Focus Studio (for compiling and executing mainframe applications on the PC) | |
| Revolve, used to do further analysis after member typing is complete |
Note: The software and supporting members included in the SimoLYZE package require less than 1 meg of disk space.
Note: Mainframe Express and Revolve are products provided by Micro Focus (http://www.microfocus.com).
The SimoLYZE program, this documentation, the Installation Verification Procedures (IVP's) and examples are provided in a zip'ed file. Additional information about acquiring SimoLYZE may be obtained from http://www.simotime.com/evaltek2.htm
SimoLYZE is currently delivered on a Compact Disk . SimoLYZE is also available directly from SimoTime via digital delivery using e-mail. Information about the latest version may be obtained from the following WEB site.
| http://www.simotime.com |
If you have received SimoLYZE on a CD then simply follow the SETUP instructions from the custom install options to install SimoLYZE. This process will install SimoLYZE into a directory called SimoLIBR.
If you have received SimoLYZE in a zipped file then the following instructions define the necessary steps for installation.
| Step | Description |
| 1. | Create a directory on the C-drive called SimoLIBR. |
| 2. | Make SimoLIBR the current directory. |
| 3. | Create a sub-directory LOGS under the SimoLIBR directory. |
| 4. | Unzip the SimoLYZE.ZIP file into the SimoLIBR directory. |
The following is the list of command statements required using WinZip.
C:\>md SimoLIBR C:\>cd SimoLIBR C:\SimoLIBR>md LOGS C:\SimoLIBR>wzunzip SimoLYZE.zip
Three Installation Verification Procedures (IVP's) are provided with SimoLYZE. The IVP's may also serve as examples. A little setup and preparation is required prior to running the IVP's. First, we must set the environment variables that will map directories.
| C:\SimoLIBR> SET4LYZ1 | |
| or | |
| C:\SimoLIBR> SET4LYZ2 | |
| or | |
| C:\SimoLIBR> SET4LYZ3 |
Next, we must create a set of directories.The following command will use the environment variables that were set in the preceding command and create the input directory (SLZINPUT) and the output directory (SLZMODEL) with its sub-directories.
| C:\SimoLIBR> DIR4LYZE |
The preceding command also creates an input directory. This is the directory that needs to be populated with the source members without file extension (i.e. unknown content).
Now it is necessary to copy a few source member into the SLZINPUT directory. For the IVP approximately ten (10) source members will provide an adequate test for proper installation.
Note: Do not use file extensions. Use only the file name without a file extension. The file name should be eight characters or less.
After copying a few member into the SLZINPUT directory run the following command to execute the SimoLYZE Installation Verification Procedure.
| C:\SimoLIBR> IVP4LYZ1 SET4LYZ1 |
The preceding command will scan all the members (filenames without extensions) in the SLZINPUT directory and copy the typed members (filenames with extensions) to the appropriate sub-directories of SLZMODEL. A separate window should be displayed with a summary of the members by type. Use Windows Explorer to view the contents of the SLZMODEL directory and sub-directories.
The following is a second IVP that will produce a detailed list by member and the summary information.
| C:\SimoLIBR> IVP4LYZ2 SET4LYZ2 |
The following is a third IVP that will produce a a cross reference listing in an ASCII/Text file and summary information.
| C:\SimoLIBR> IVP4LYZ3 SET4LYZ3 |
SimoLYZE is run from a DOS command line by calling SIMOLYZE.GNT . It requires one parameter. Depending on the parameter value certain environment variables will need to be specified. The following is the command line format.
| C:\SimoLIBR> run SIMOLYZE parameter |
The Installation Verification Programs (IVP's) provide a good model for running SimoLYZE and are described in more detail in this section.
The following table is a summary of the parameters (function to be performed) and environment variables.
| parameter | Description and Environment Variables | ||||||||||||||
| ORGANIZE | The purpose of the ORGANIZE function is to do the member typing. Refer to
The Organize Function for more information.
|
||||||||||||||
| QUERY | The purpose if the QUERY function is to provide a method for selecting certain member types from the Source Code Repository (APMASTER) and create a file of "user-specified" output. Refer to
The Query Function for more information.
|
||||||||||||||
| UPDATE | The purpose of the UPDATE function is to provide a method for updating information in the Source Code Repository (APMASTER) without having to write a program. Refer to
The Update Function for more information.
|
||||||||||||||
| COPY | The purpose of the COPY function is to copy the specified members from the untyped directory to the typed directories with proper extensions. Refer to
The Copy Function for more information.
|
||||||||||||||
| LIST | The purpose of the LIST function is to read the Source Code Repository (APMASTER) file and create an ASCII/Text file of summary or detailed information about the source members. Refer to
The List Function for more information.
|
||||||||||||||
| HTML | The purpose of the HTML function is to read the Source Code Repository (APMASTER) file and create an HTML file of detailed and summary information about the source members. Refer to
The HTML Function for more information.
|
The following figure shows the process flow used by the Installation Verification Procedure for SimoLYZE.
|
The First Parameter is usually SET4LZY1 | |||||||||||||||||||
|
|
|
If the Source Code Repository does not exist then create one. | |||||||||||||||||
|
|
||||||||||||||||||||
|
|
|
Use the DIR command to create a list of the un-typed members in the SLZINPUT directory. | |||||||||||||||||
|
|
||||||||||||||||||||
|
|
|
|
|
The Organize Function, Update the Source Code Repository with member type | |||||||||||||||
|
|
|
||||||||||||||||||
|
|
|
|
|
The Query Function, identify members that have been changed | |||||||||||||||
|
|
|
||||||||||||||||||
|
|
|
||||||||||||||||||
|
|
|
||||||||||||||||||
|
|
|
|
|
The Copy Function, copy the typed members to the model directories. | |||||||||||||||
|
|
|
|
|
Read the Source Code Repository and create a SLZLIST file in ASCII/Text format. | |||||||||||||||
|
|
|
||||||||||||||||||
|
|
|
|
|
Read the Source Code Repository and create a SLZHTML file. | |||||||||||||||
|
|
|
||||||||||||||||||
|
||||||||||||||||||||
The SIMOLIBR directory is the directory where SimoLYZE is installed. The SLZINPUT directory is the directory that contains the untyped source members (i.e. names without file extensions).
The IVP4LYZ1 is a command file that will run the necessary programs to analyze each of the members in the SLZINPUT directory and copy each member to the proper sub-directory within SLZMODEL based on the member type.
This process will also create a Source Code Repository (APMASTER). This data base is a VSAM file with a single key composed of the member name. The actual name of the APMASTER is determined by an environment variable called APMASTER.
The environment variables must be set prior to running SimoLYZE. The following is a description of the environment variables used in SET4LYZ1.CMD.
@echo OFF
echo * Set4Lyz1 is Starting...
echo * Set4Lyz1 Setting the Environment Variables for SimoLYZE. This
echo * Set4Lyz1 CMD file provides a single location for defining the
echo * Set4Lyz1 location of the input directory, output directories,
echo * Set4Lyz1 the configuration file and the Source Code Repository.
rem *
rem * The SIMOLIBR environment variable specifies the drive and
rem * directory location for the SimoLIBR directory where SimoLYZE
rem * is installed.
rem *
set SIMOLIBR=C:\SimoLIBR
rem *
rem * The SLZBASE environment variable is the base directtory used
rem * by SimoLYZE. SimoLYZE will use sub-directories created under
rem * this directory.
rem *
set SLZBASE=C:\slzLIB01
rem *
rem * Identify the directory where the SimoLYZE work files and the
rem * user-defined Source Code Repository are located.
rem *
set SLZADMIN=%SLZBASE%\slzADMIN
rem *
rem * Define the location of the SimoLYZE configuration file.
rem *
set SLZCONFG=%SIMOLIBR%\cfg4lyz1.cfg
rem *
rem * Define the fully qualified name for the Source Code Repository file.
rem * Notice the technique of using the previously defined SLZUSER
rem * environment variable. The following could also be an explicit,
rem * fully qualified drive, directory and filename.ext.
rem *
set APMASTER=%SLZADMIN%\APMASTER.DAT
rem *
rem * Define the Input directory. The following directory will contain the
rem * source members that do not have file extensions.
rem *
set SLZINPUT=%SLZBASE%\slzINPUT
rem *
rem * Provide for a high-level directory definition for output members
rem *
set SLZMODEL=%SLZBASE%\slzMODEL
rem *
rem * Define the Output directories
rem *
set SLZ4CBL=%SLZMODEL%\cobol
set SLZ4COBCPY1=%SLZMODEL%\cobcpy1
set SLZ4ASM=%SLZMODEL%\asm
set SLZ4ASMCPY1=%SLZMODEL%\asmcpy1
set SLZ4ASMMAC1=%SLZMODEL%\asmmac1
set SLZ4JCL=%SLZMODEL%\jcl
set SLZ4PRC=%SLZMODEL%\prc
set SLZ4INC=%SLZMODEL%\inc
set SLZ4BMS=%SLZMODEL%\bms
set SLZ4MFS=%SLZMODEL%\mfs
set SLZ4DBD=%SLZMODEL%\dbd
set SLZ4PSB=%SLZMODEL%\psb
set SLZ4OTHER=%SLZMODEL%\other
rem *
rem * The following is provided as a method for identifying the
rem * PDS where the original members reside.
rem * It is only used to when writing to the Source Code Repository
rem *
set SLZHOST=SIMOTIME.DEMO.BASE
rem *
rem * *************************************************************************
rem * The following are optional based on configuration file setting to
rem * enable or disable a function.
rem *
rem * The following is for the SLZLIST file.
rem *
set SLZLIST=%SLZADMIN%\SLZLIST.TXT
rem *
rem * The following is for the messaging file.
rem *
set SYSMSG1=%SLZADMIN%\SYSMSG1.TXT
rem *
rem * The following is for the cross reference file of main members to
rem * to copyfiles.
rem *
set COPYXREF=%SLZADMIN%\COPYXREF.TXT
rem *
echo * Set4Lyz1 is Finished...
The input directory and output directories must be must exist prior to running SimoLYZE. The following is a description of a sample command file (DIR4LYZE.CMD) that may be used to create a directory structure.
Please note, prior to running the following command file the environment variables must be set as described in the Previous section of this document
@echo OFF
echo * Dir4LYZE is Starting...
echo **************************************************************
echo * This program is provided by: *
echo * SimoTime Enterprises, LLC *
echo * (C) Copyright 1987-2010 All Rights Reserved *
echo * Web Site URL: http://www.simotime.com *
echo * e-mail: helpdesk@simotime.com *
echo **************************************************************
echo *
echo * This command file will create the directories used by the
echo * Installation Verification Procedures for SimoLYZE.
echo *
echo * Please note, the environment variables must be set prior
echo * to running this procedure. Refer to the SET4LYZ1.CMD file
echo * for more information.
echo *
MD %SLZADMIN%
rem *
MD %SLZINPUT%
MD %SLZMODEL%
rem *
MD %SLZ4CBL%
MD %SLZ4COBCPY1%
MD %SLZ4ASM%
MD %SLZ4ASMCPY1%
MD %SLZ4ASMMAC1%
MD %SLZ4JCL%
MD %SLZ4PRC%
MD %SLZ4INC%
MD %SLZ4BMS%
MD %SLZ4MFS%
MD %SLZ4DBD%
MD %SLZ4PSB%
MD %SLZ4OTHER%
echo * Dir4LYZE is Finished...
The following is a description of a sample command file (IVP4LYZ1.CMD) that steps through the member typing process.
@ECHO OFF
setlocal
set SimoNote=c:\SimoLIBR\LOGS\SimoTIME.LOG
call :PostNote "************************************************************Ivp4Lyz1"
call :PostNote "Starting JobName Ivp4Lyz1, User is %USERNAME%"
echo * Ivp4Lyz1 **********************************************************
echo * Ivp4Lyz1 * This program is provided by: *
echo * Ivp4Lyz1 * SimoTime Enterprises, LLC *
echo * Ivp4Lyz1 * (C) Copyright 1987-2010 All Rights Reserved *
echo * Ivp4Lyz1 * Web Site URL: http://www.simotime.com *
echo * Ivp4Lyz1 * e-mail: helpdesk@simotime.com *
echo * Ivp4Lyz1 **********************************************************
rem *
call :PostNote "Set specific Base-Directory variables"
rem *
if not "%1" == "" set slzcall=%1
if "%1" == "" set slzcall=set4lyz1
CALL %slzcall%
call :PostNote "SLZINPUT set to %SLZINPUT%"
rem *
rem ******************************************************************************
rem *
if EXIST %APMASTER% GOTO :SKIPALOC
call :PostNote "Create Source-Code-Data-Base for unidentified members."
echo * Ivp4Lyz1 %SLZCONFG%
echo * Ivp4Lyz1 %APMASTER%
set SLZUPD1=UPDALOC1.UPD
run SimoLYZE UPDATE
if ERRORLEVEL = 1 GOTO :ABEND01
:SKIPALOC
rem *
rem ******************************************************************************
call :PostNote "Prepare to read the unidentified source members."
rem *
rem * The HOSTNAME identifies the original mainframe PDS. On the
rem * PC this is used for documentation purposes,
rem * The PCDIR identifies the directory where the unidentified
rem * input source members are stored. If the source members are not
rem * in the current directory the PCDIR must be used.
rem *
rem * The DIR command will create a list file of the members in the
rem * input directory.
rem * The /B option will list only the file name.
rem * The /A-D option will cause directory names not to be listed.
rem * The /ONE option will organize in name and extension sequence.
rem *
echo HOSTNAME %SLZHOST% >%SLZADMIN%\SYSTEMP1.TXT
echo PCDIR %SLZINPUT%\ >>%SLZADMIN%\SYSTEMP1.TXT
dir %SLZINPUT%\*.* /B /A-D /ONE >%SLZADMIN%\SYSTEMP2.TXT
rem *
rem * Load the Source-Code-Data-Base with unknown member types.
rem *
call :PostNote "Do the source code analysis and Populate the Source Code Repository"
rem *
set SYSIMP1=%SLZADMIN%\SYSTEMP1.TXT
set SYSIMP2=%SLZADMIN%\SYSTEMP2.TXT
run SimoLYZE ORGANIZE
if ERRORLEVEL = 1 GOTO :ABEND02
rem *
rem ******************************************************************************
call :PostNote "Select members from the Source Code Repository to be copied."
rem *
rem * This command file is usually run with the CFG4LYZ1.CFG file that has
rem * the statement ...SLZQRY01 USERDATE NO... included
rem * Therefore, all members that meet the other criteria will be selected.
rem *
set SYSQRY1=QRY4CPY1.QRY
set SYSQRY2=%SLZADMIN%\SYSTEMP3.TXT
run SimoLYZE QUERY
rem *
rem ******************************************************************************
call :PostNote "Copy member to SLZMODEL Directories, append the file extension."
rem *
set SYSCPY0=%SLZADMIN%\SYSTEMP3.TXT
set SYSCPY3=%SLZADMIN%\SYSCPY3.LOG
run SimoLYZE COPY
echo * Ivp4Lyz1 Source members have been copied to specified user directories.
rem *
rem ******************************************************************************
call :PostNote "Create an ASCII/Text SLZLIST file from the Source Code Repository."
rem *
set SLZLIST=%SLZADMIN%\SLZLIST.TXT
run SimoLYZE LIST
rem *
echo * Ivp4Lyz1 Notepad will display the list file in a separate window.
rem *
START notepad %SLZADMIN%\SLZLIST.TXT
rem *
echo * Ivp4Lyz1 Thank you for using SimoLYZE by SimoTime Enterprises
rem *
goto :EojAok
rem *
rem ****************************************************************
rem * Display the message and write to the log file using ECHO.
rem * The ~ causes the leading/trailing double-quotes to be removed.
rem *
:PostNote
if "%SimoNote%" == "" set SimoNote=c:\SimoTime.LOG
echo %date% %time% %~1 >> %SimoNote%
echo * Ivp4Lyz1 %~1
goto :EOF
rem * The preceding :EOF is a reserved word/label that returns to
rem * the statement after the call to :PostNote.
rem *
rem ******************************************************************************
:ABEND01
call :PostNote "ABENDING Allocate function for Source Code Repository failed!"
goto :END
rem *
rem ******************************************************************************
:ABEND02
call :PostNote "ABENDING Organize function for Source Code Repository failed!"
goto :END
rem *
rem ******************************************************************************
:EojAok
call :PostNote "Finished JobName Ivp4Lyz1 "
rem *
:END
This section describes each of the SimoLYZE functions. The ORGANIZE function does the actual member typing. The LIST function reads the Source Code Repository and creates a listing file in ASCII/Text format for easy viewing with most editors. The UPDATE function provides a quick method for updating records in the Source Code Repository. The QUERY function provides a quick method for accessing information in the Source Code Repository. The COPY function provides a method for quickly copying the untyped source members from an input directory to the appropriate directories that have been defined for each member type.
The organize function does the actual member typing. This function will read each of the specified source members and determine the member type. This function starts by reading an ASCII/Text file (SYSIMP2) that contains a list of members that will be used to update or add records to the Source Code Repository file (APMASTER.DAT). The configuration file is read to get additional parameters to determine the execution behavior and results. The SYSIMP1 file contains two records. The first record provides the name of the PDS where the members are stored on the mainframe. The second record provides the name of the PC directory where the input members are stored.
|
|
|
|
|
The Organize Function | |||||||||||||||
|
|
|
||||||||||||||||||
|
|
|
||||||||||||||||||
|
|
|
||||||||||||||||||
The list function will read the Source Code Repository file (APMASTER.DAT) and produce a listing file in ASCII/Text format. Two sample command files are provided. The first command file (SLZLIST1.CMD) will produce a listing file (ASCII/Text format) with a summary of information by member type group. The second example (SLZLIST2.CMD) will produce a listing file (ASCII/Text format) with detail for each member and a summary of information by member type group.
|
|
|
|
|
The List Function | |||||||||||||||
|
|
|
Configuration File | |||||||||||||||||
|
||||||||||||||||||||
The following is an example of a command file (SLZLIST1.CMD) that will execute SimoLYZE with the LIST option.
@echo OFF
echo * slzList1 is Starting, User is %USERNAME%
echo **************************************************************
echo * This program is provided by: *
echo * SimoTime Enterprises, LLC *
echo * (C) Copyright 1987-2010 All Rights Reserved *
echo * Web Site URL: http://www.simotime.com *
echo * e-mail: helpdesk@simotime.com *
echo **************************************************************
echo * This procedure will read the Source Code Repository and *
echo * create a listing file that includes SUMMARY info only. *
echo **************************************************************
rem * Set the required environmnet variables.
rem *
call set4lyz1
rem * Override pointer to configuration file
set SLZCONFG=%SLZADMIN%\tmp4lyze.CFG
rem *
rem **************************************************************
rem * The following two statements will create a temporary
rem * configuration file for the SimoLYZE List function.
rem *
echo SLZLST01 NODETAIL > %SLZCONFG%
echo SLZLST01 SUMMARY >> %SLZCONFG%
rem *
rem **************************************************************
rem * Run the List function and display the results with NotePAD.
rem *
run SIMOLYZE LIST
echo * slzList1 Notepad will display the list file in a separate window.
START notepad %SLZLIST%
rem *
rem **************************************************************
rem * End of Job.
echo * slzList1 Thank you for using SimoLYZE by SimoTime Enterprises
echo * slzList1 is Finished...
The following statements in the configuration file (SLZCONFG) affect the program execution for the list function
SLZLST01 DETAIL * Include record detail SLZLST01 SUMMARY * Include summary information
The first statement with the DETAIL keyword will write detailed information about each source member to the listing file. The NODETAIL keyword prevents the detailed information about each source member from being written to the listing file.
The second statement with the SUMMARY keyword will provide a summary of the number of source members in each type grouping and total count of members with total lines of code. The NOSUMMARY keyword will prevent the summary information from being placed in the listing file.
The HTML function will read the Source Code Repository file (APMASTER.DAT) and produce a listing file in HTML format. Two sample com mand files are provided. The first command file (APHTMLE1.CMD) will produce an HTML file with a summary of information by member type group. The second example (APHTMLE2.CMD) will produce an HTML file with detail for each member and a summary of information by member type group.
The following link to view a sample HTML document will provide a quick look at the information provided by the HTML function.
|
A WIndows Command File | |||||||||||||||||||
|
|
||||||||||||||||||||
|
Mainline Program | |||||||||||||||||||
|
|
||||||||||||||||||||
|
|
|
|
|
The HTML Function | |||||||||||||||
|
|
|
||||||||||||||||||
|
|
|
Header for HTML | |||||||||||||||||
|
|
|
Include for HTML | |||||||||||||||||
|
|
|
Footer for HTML | |||||||||||||||||
|
||||||||||||||||||||
The following is an example of a command file (SLZHTML1.CMD) that will execute SimoLYZE with the HTML option.
@echo OFF
echo * slzHTML1 is Starting, User is %USERNAME%
echo **************************************************************
echo * This program is provided by: *
echo * SimoTime Enterprises, LLC *
echo * (C) Copyright 1987-2010 All Rights Reserved *
echo * Web Site URL: http://www.simotime.com *
echo * e-mail: helpdesk@simotime.com *
echo **************************************************************
echo * This procedure will read the Source Code Repository and *
echo * create an HTML file that includes DETAIL and SUMMARY info. *
echo **************************************************************
rem * Set the required environmnet variables.
rem *
set JobStatus=0000
call set4lyz1
set SLZHDRH1=%SIMOLIBR%\slzhdrh1.htm
set SLZFTRH1=%SIMOLIBR%\slzftrh1.htm
set SLZINCH1=%SIMOLIBR%\slzinch1.htm
set SLZHTML=%slzADMIN%\slzhtml.htm
copy %SIMOLIBR%\simotime.gif %slzADMIN%
rem *
rem **************************************************************
rem * Run the HTML function and display the results with IEXPLORE.
rem *
run SIMOLYZE HTML
if not "%ERRORLEVEL%" == "0" set JobStatus=0010
if not "%JobStatus%" == "0000" goto :EojNOK
rem *
rem **************************************************************
rem * End of Job.
:EojAOK
echo * slzHTML1 Internet Explorer will display the HTML file in a separate window.
START iexplore %SLZHTML%
echo * Finished CmdName %CmdName%, Job Status is %JobStatus%
goto :End
:EojNOK
echo * ABENDING CmdName %CmdName%, Job Status is %JobStatus%
echo slzHTML1 is ABENDING>>%BaseLib1%\LOGS\ABENDLOG.TXT
goto :End
:End
if not "%1" == "nopause" pause
The COBOL Category function will read the Source Code Repository file (APMASTER.DAT) and produce four (4) listing files in ASCII/Text format. A sample command file is provided. This command file (APLISTE4.CMD) will produce four (4) ASCII/Text files containing the following information.
| File Name | Description |
| CBLBATL1.LST | A list of the source members for BATCH programs that do not contain SQL statements. |
| CBLBSQL1.LST | A list of the source members for BATCH programs that contains SQL statements. |
| CBLONLL1.LST | A list of the source members for CICS programs that do not contain SQL statements. |
| CBLOSQL1.LST | A list of the source members for CICS programs that contain SQL statements. |
The query function will read the Source Code Repository file (APMASTER.DAT) and produce an ASCII/Text file using the control specifications contained in the SYSQRY1 file.
|
|
|
|
|
The Query Function | |||||||||||||||
|
|
|
User Date/Time for Selection Criteria (Optional) | |||||||||||||||||
|
|
|
Configuration File | |||||||||||||||||
|
|
|
Source Code Repository | |||||||||||||||||
This example will read the Source Code Repository and produce a CSV file that may be imported into an Excel Spreadsheet or other data bases. The following (QryGET02.QRY) is an example of a control file for the QUERY function.
********************************************************** * This program is provided by: * * SimoTime Enterprises, LLC * * (C) Copyright 1987-2010 All Rights Reserved * * Web Site URL: http://www.simotime.com * * e-mail: helpdesk@simotime.com * ********************************************************** * This Query will select active member records from the * Source Code Repository and create a CSV file that may * be imported into an Excel Spreadsheet. * //IF STATUS EQ A //PUT &<membername<&,&<language<&,&<type<&,&<records<& //END-IF *
The following is the command file (SlzQry02.CMD) that will execute the query function using the preceding query control file information.
@echo OFF
echo * slzQry02 is Starting, v04.04.14...
echo **************************************************************
echo * This program is provided by: *
echo * SimoTime Enterprises, LLC *
echo * (C) Copyright 1987-2010 All Rights Reserved *
echo * Web Site URL: http://www.simotime.com *
echo * e-mail: helpdesk@simotime.com *
echo **************************************************************
echo * Read the Source Code Repository and create a CSV file *
echo * that may be imported into an Excel Spreadsheet. *
echo **************************************************************
rem * Set the required environmnet variables.
rem *
set SLZCONFG=c:\SimoLIBR\DataWrk1\QryCfg02.CFG
set APMASTER=c:\SLZWORK1\APMASTER.DAT
set SYSQRY1=QryGet02.QRY
set SYSQRY2=%SLZUSER%\QryPut02.CSV
rem *
rem **************************************************************
rem * The following statements will create a temporary
rem * configuration file for the SimoLYZE Query function.
rem * Note: The SLZCONFG could be set to the CFG4LYZ1.CFG file
rem * that is included with SimoLYZE. The purpose of using the
rem * following is to show the minimum requirements.
rem *
echo SLZQRY01 MSGLEVEL 0 > %SLZCONFG%
echo SLZQRY01 WILDCARD * >> %SLZCONFG%
echo SLZQRY01 DOENVARS >> %SLZCONFG%
echo SLZQRY01 USERDATE NO >> %SLZCONFG%
rem *
rem **************************************************************
rem * Run the Query function and display the results with NotePAD.
rem *
SIMOLYZE QUERY
echo * slzQry02 Query File is %SYSQRY2%
echo * slzQry02 Display the QUERY file in a separate window.
START notepad %SYSQRY2%
rem *
rem **************************************************************
rem * End of Job.
echo * slzQry02 Thank you for using SimoLYZE by SimoTime Enterprises
echo * slzQry02 is Finished...
The following (QryPUT02.CSV) is the CSV file created as a result of running the preceding query function.
CBLBITC1,CBL,CBL,00000452 CBLDAYC1,CBL,CBL,00000438 CBLDAYC2,CBL,CBL,00000272 CBLHBXC2,CBL,CBL,00000400 CBLHBXC3,CBL,CBL,00000280 CBLNUXC1,CBL,CBL,00000296 CBLNUXC2,CBL,CBL,00000288 CBLPARC3,CBL,CBL,00000218 CBLPARC4,CBL,CBL,00000220 PASSBITS,CBL,CPY,00000025
The following table describes the various control statements that may be used to select the input and determine the output for the QUERY function.
| Keyword | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //IF | The //IF statement will cause the QUERY function to test various items within the Source Code Repository for the specified condition. The parameters are as follows:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //END-IF | Closes the processing for the previously defined //IF statement(s). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //PUT | The //PUT statement will cause the QUERY function to write a record to the output file (SYSQRY2). The parameters are as follows (the variable values are not case sensitive):
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //PUTPREFIX | The //PUTPREFIX statement will cause records to be written at the beginning of the output file (SYSQRY2). This is useful when inserting comments at the top of the file. The only parameter is a text string. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //PUTSUFFIX | The //PUTSUFFIX statement will cause records to be written at the end of the output file (SYSQRY2). The only parameter is a text string. |
The update function will read an ASCII/Text file of control records and update the Source Code Repository file (APMASTER.DAT).
|
|
|
|
|
Read the Specifications file, Update the Source Code Repository | |||||||||||||||
|
|
|
The Configuration file | |||||||||||||||||
|
||||||||||||||||||||
The following statements will run the update function. The first statement will point to the configuration file. The second statement will point to the input file that contains the update functions to be performed. The third statement will point to the Source Code Repository. The fourth statement will run SimoLYZE and perform the update function.
| Command | Sample File |
| C:\SIMOLIBR\>set SLZCONFG=configuration-file | CFG4LYZ1.CFG |
| C:\SIMOLIBR\>set SLZUPD1=specifications-file | UPDSPEC1.UPD |
| C:\SIMOLIBR\>set APMASTER=Source Code Repository | APMASTER.DAT |
| C:\SIMOLIBR\>SIMOLYZE UPDATE |
The format of the records in the SLZUPD1 file is as follows.
member-name keyword value-or-action
The member-name is also the key to the Source Code Repository records. A list of the keyword items and associated value-or-action may be found at the end of this section at the Summary List of Update Keywords
The following example (SLZUPD01.CMD and UPDSPEC1.UPD) shows how to change the member status definition within the Source-Code-Data-Base file (APMASTER.DAT).
@echo OFF
echo * SLZUPD01 is Starting...
echo **************************************************************
echo * This program is provided by: *
echo * SimoTime Enterprises, LLC *
echo * (C) Copyright 1987-2010 All Rights Reserved *
echo * Web Site URL: http://www.simotime.com *
echo * e-mail: helpdesk@simotime.com *
echo **************************************************************
echo * This procedure will read a file of update statements for
echo * the Source Code Repository and update the Data Base.
echo * The fields to be updated are defined in the SLZUPD1 file.
rem *
set SLZCONFG=cfg4lyz1.cfg
set SLZUPD1=UPDSPEC1.UPD
set APMASTER=%SLZUSER%\APMASTER.DAT
SIMOLYZE UPDATE
rem *
echo * SLZUPD01 is Finished...
In the preceding command file the second "set" statement points to the specification file that defines the update function that needs to be performed. The following is an example of a specifications file with one statement (the asterisk in position one (1) indicates a comment). The "CBLDAYC2" is the member name, the "STATUS" indicates the Satus Field in the record and the "D" is the value to place into the field. Once the following statement is processed the "CBLDAYC2" record will be flagged for deletion..
* This specification will change the Record Status field in * the Source Code Repository to a D. The status is as follows: * A = Active * D = Delete * S = Suspend * CBLDAYC2 STATUS D
The members (SLZUPD01.CMD and UPDSPEC1.UPD) from the preceding example are included in the z-Pack (zipped file) for SimoLYZE.
The following example (SLZUPD02.CMD and UPDSPEC2.UPD) shows how to override or explicitly define the member language definition within the Source-Code-Data-Base file (APMASTER.DAT).
@echo OFF
echo * SLZUPD02 is Starting...
echo **************************************************************
echo * This program is provided by: *
echo * SimoTime Enterprises, LLC *
echo * (C) Copyright 1987-2010 All Rights Reserved *
echo * Web Site URL: http://www.simotime.com *
echo * e-mail: helpdesk@simotime.com *
echo **************************************************************
echo * This procedure will read a file of update statements for
echo * the Source Code Repository and update the Data Base.
echo * The fields to be updated are defined in the SLZUPD1 file.
rem *
set SLZCONFG=cfg4lyz1.cfg
set SLZUPD1=UPDSPEC2.UPD
set APMASTER=%SLZUSER%\APMASTER.DAT
SIMOLYZE UPDATE
rem *
echo * SLZUPD02 is Finished...
SIMOLYZE UPDATE
In the preceding command file the second "set" statement points to the specification file that defines the update function that needs to be performed. The following is an example of a specifications file with one statement (the asterisk in position one (1) indicates a comment). The "CBLDAYC2" is the member name, the "LANGUAGE" indicates the Language Field in the record and the "CBL" is the value to place into the field. Once the following statement is processed the "CBLDAYC2" record will be identified as containing COBOL source code.
* This specification will change the Language Definition in * the Source Code Repository. The Language is as follows: * CBL = COBOL * JCL = Job Control Language * 370 = Assembler * CBLDAYC2 LANGUAGE CBL
Note: The ability to override or explicitly define the language is intended for exception conditions. If SimoLYZE fails to identify a member Language please notify the helpdesk@simotime.com
The source members (SLZUPD02.CMD and UPDSPEC2.UPD) from the preceding example are included in the z-Pack (zipped file) for SimoLYZE.
The following example (SLZUPD03.CMD and UPDSPEC3.UPD) shows how to override or explicitly define the member type definition within the Source-Code-Data-Base file (APMASTER.DAT).
@echo OFF
echo * SLZUPD03 is Starting...
echo **************************************************************
echo * This program is provided by: *
echo * SimoTime Enterprises, LLC *
echo * (C) Copyright 1987-2010 All Rights Reserved *
echo * Web Site URL: http://www.simotime.com *
echo * e-mail: helpdesk@simotime.com *
echo **************************************************************
echo * This procedure will read a file of update statements for
echo * the Source Code Repository and update the Data Base.
echo * The fields to be updated are defined in the SLZUPD1 file.
rem *
set SLZCONFG=cfg4lyz1.cfg
set SLZUPD1=UPDSPEC3.UPD
set APMASTER=%SLZUSER%\APMASTER.DAT
SIMOLYZE UPDATE
rem *
echo * SLZUPD03 is Finished...
In the preceding command file the second "set" statement points to the specification file that defines the update function that needs to be performed. The following is an example of a specifications file with one statement (the asterisk in position one (1) indicates a comment). The "CBLDAYC2" is the member name, the "TYPE" indicates the member TYPE Field in the record and the "CBL" is the value to place into the field. Once the following statement is processed the "CBLDAYC2" record will be identified as a COBOL program.
* This specification will change the Type Definition in * the Source Code Repository. The Type is as follows: * CBL = COBOL * JCL = Job Control Language * 370 = Assembler * CPY = Copy File * INC = Include * MAC = Macro * MFS = Message Format Services for IMS * BMS = Basic Mapping Support for CICS * DBD = Data Base Description for IMS * PRC = Procedure for JCL * PSB = Program Specification Block for IMS * UNKNOWN * CBLDAYC2 TYPE CBL
Note: The ability to override or explicitly define the member type is intended for exception conditions. If SimoLYZE fails to identify a member type please notify the helpdesk@simotime.com
The source members (SLZUPD03.CMD and UPDSPEC3.UPD) from the preceding example are included in the z-Pack (zipped file) for SimoLYZE.
A special feature of the update function is to create an empty Source Code Repository (APMASTER). The following example (SLZALOC1.CMD and UPD4ALOC.UPD) shows how to create a new Source-Code-Data-Base file (APMASTER.DAT).
@echo OFF
echo * SLZALOC1 is Starting...
echo **************************************************************
echo * This program is provided by: *
echo * SimoTime Enterprises, LLC *
echo * (C) Copyright 1987-2010 All Rights Reserved *
echo * Web Site URL: http://www.simotime.com *
echo * e-mail: helpdesk@simotime.com *
echo **************************************************************
echo * This procedure will read a file of update statements for
echo * the Source Code Repository and create a new Data Base.
echo * The allocate action is defined in the SLZUPD1 file.
rem *
set SLZCONFG=cfg4lyz1.cfg
set SLZUPD1=UPD4ALOC.UPD
set APMASTER=%SLZUSER%\APMASTER.DAT
SIMOLYZE UPDATE
rem *
echo * SLZALOC1 is Finished...
For the preceding example the SYSUPD1 file contains one record as follows.
* The following statement will cause a new Source Code Repository * file to be allocated. * //ACTION ALLOCATE
Note: If a Source Code Repository already exist it will not be replaced by this function. An error message will be posted and the function will terminate. The existing data base file must be deleted prior to running this function.
The source members (SLZALOC1.CMD and UPD4ALOC.UPD) from the preceding example are included in the z-Pack (zipped file) for SimoLYZE.
A special feature of the update function is to copy the Source Code Repository (APMASTER) and drop records that have been flagged for deletion. The following example (SLZCOPY2.CMD and UPDCOPY2.UPD) shows how to copy the Source-Code-Data-Base file (APMASTER.DAT) to a new Source-Code-Data-Base file (SLZSCDB2.DAT).
@echo OFF
echo * slzCopy2 is Starting...
echo **************************************************************
echo * This program is provided by: *
echo * SimoTime Enterprises, LLC *
echo * (C) Copyright 1987-2010 All Rights Reserved *
echo * Web Site URL: http://www.simotime.com *
echo * e-mail: helpdesk@simotime.com *
echo **************************************************************
echo *
echo * This procedure will read the Source Code Repository and
echo * create a new Source Code Repository without deleted records.
echo *
set SLZCONFG=c:\SimoLIBR\cfg4lyz1.cfg
set APMASTER=c:\SLZWORK1\APMASTER.DAT
set SLZSCDB2=c:\SLZWORK1\SLZSCDB2.DAT
set SLZUPD1=c:\SimoLIBR\UpdCopy2.UPD
SIMOLYZE UPDATE
echo * slzCopy2 is Finished...
For the preceding example the SYSUPD1 file contains one record as follows.
* This specification will copy the Source Code Repository * and drop records flagged for deletion. * //ACTION DROPDELETE
The source members (SLZCOPY2.CMD and UPDCOPY2.UPD) from the preceding example are included in the z-Pack (zipped file) for SimoLYZE.
The following is a list of the keywords used by the Update function for SimoLYZE.
| Keyword | Value or Action |
| STATUS | Valid Status codes are A=Active, D=Deleted and S=Suspend |
| LANGUAGE | Valid languages are CBL, JCL, 370, UNKNOWN, and the VALUE may be omitted. |
| TYPE | Valid types are CBL, JCL, 370, CPY, INC, MAC, MFS, BMS, DBD, PRC, PSB, UNKNOWN, and the VALUE may be omitted. |
| FLAG01 | Flag value must be "Y" or "N". |
| FLAG02 | Flag value must be "Y" or "N". |
| FLAG03 | Flag value must be "Y" or "N". |
| FLAG04 | Flag value must be "Y" or "N". |
| FLAG05 | Flag value must be "Y" or "N". |
| FLAG06 | Flag value must be "Y" or "N". |
| FLAG07 | Flag value must be "Y" or "N". |
| FLAG08 | Flag value must be "Y" or "N". |
| FLAGnn(x) | The value or action should be blank, the keyword value of nn is a flag number 01-08 and x is a Y or N. |
The following example (SLZUPD04.CMD and UPDSPEC4.UPD) shows how to do multiple updates to the Source-Code-Data-Base file (APMASTER.DAT) in a single pass of the SimoLYZE Update Function.
@echo OFF
echo * SLZUPD04 is Starting...
echo **************************************************************
echo * This program is provided by: *
echo * SimoTime Enterprises, LLC *
echo * (C) Copyright 1987-2010 All Rights Reserved *
echo * Web Site URL: http://www.simotime.com *
echo * e-mail: helpdesk@simotime.com *
echo **************************************************************
echo * This procedure will read a file of update statements for
echo * the Source Code Repository and update the Data Base.
echo * The fields to be updated are defined in the SLZUPD1 file.
rem *
set SLZCONFG=cfg4lyz1.cfg
set SLZUPD1=UPDSPEC4.UPD
set APMASTER=%SLZUSER%\APMASTER.DAT
SIMOLYZE UPDATE
rem *
echo * SLZUPD04 is Finished...
For the preceding example the SYSUPD1 file contains one record as follows.
* This specification is an example of multiple updates * in a single pass of the update function of SimoLYZE. * CBLDAYC1 LANGUAGE CBL CBLDAYC1 TYPE CBL CBLDAYC1 STATUS S CBLDAYC1 FLAG02 Y CBLDAYC1 FLAG04 Y CBLDAYC1 FLAG06 Y CBLDAYC1 FLAG08 Y
The source members (SLZUPD04.CMD and UPDSPEC4.UPD) from the preceding example are included in the z-Pack (zipped file) for SimoLYZE.
The copy function will read an ASCII/Text file of control records that contain the from-file and to-file names. The untyped source members (from-file) will be copied to the specified directory (to-file).
|
|
|
|
|
The Copy Function | ||||||||||||||||||||||||||
|
|
|
|
|
|||||||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||
The following statements in the configuration file (SLZCONFG) affect the program execution for the copy function
SLZCPY01 REPLACE * Replace existing members SLZCPY01 DOLOG * Create a ADD/UPD log file
The first statement with the REPLACE keyword provides for the replacement of existing members. The NOREPLACE keyword is the default and existing source members will not be replaced. If the logging function is enabled the UPD status in the first three bytes of the log record will be ERR instead of UPD.
The second statement with the DOLOG keyword will provide a log file as the source members are copied. The NOLOG keyword will prevent logging as members are copied.
When SimoLYZE performs the source code analysis and determines the member type the information along with the date and time for the source member is recorded. This information is stored in the Source Code Repository file (APMASTER). The field (MEMBERDATE) may be accessed by the query function.
The following (SLZDATE1.CMD) is a sample command file that sets the environment and calls the QUERY function of SimoLYZE.
@ECHO OFF
echo **************************************************************
echo * This program is provided by: *
echo * SimoTime Enterprises, LLC *
echo * (C) Copyright 1987-2010 All Rights Reserved *
echo * Web Site URL: http://www.simotime.com *
echo * e-mail: helpdesk@simotime.com *
echo **************************************************************
echo * slzDate1 is Starting, v04.04.14...
rem *
echo * slzDate1 set Specific Base Directory's variables
rem *
if "%1" == "" GOTO :ABEND01
CALL %1
echo * slzDate1 SLZINPUT set to %SLZINPUT%
rem *
rem ******************************************************************************
echo * slzDate1 Set environment variables for files. Do a Query to identify records
echo * slzDate1 with a member date greater than or equal to 20000101.
rem *
set APMASTER=%SLZUSER%\APMASTER.DAT
set SYSQRY1=c:\SimoLIBR\QRYDATE1.QRY
set SYSQRY2=%SLZUSER%\SLZDATE1.CSV
SimoLYZE QUERY
if ERRORLEVEL = 1 GOTO :ABEND02
rem *
rem ******************************************************************************
echo * slzDate1 NotePAD will be used to display the results in a separate window.
rem *
START NotePAD %SYSQRY2%
goto :EojAok
rem *
rem ******************************************************************************
:ABEND01
echo * slzDate1 Parameter 1 is usually SET4LYZ1 for this IVP.
echo * slzDate1 This is ABEND01 for slzDate1 processing...
goto :END
:ABEND02
echo * slzDate1 This is ABEND02 for slzDate1 processing...
goto :END
:EojAok
echo * slzDate1 Thank you for using SimoLYZE by SimoTime Enterprises
echo * slzDate1 is Finished...
:END
The following (QRYDATE1.QRY) is a sample SYSQRY1 file with the control specifications for selecting and outputting a list of file names that meet the date selection criteria.
********************************************************** * This query script is provided by: * * SimoTime Enterprises, LLC * * (C) Copyright 1987-2010 All Rights Reserved * * Web Site URL: http://www.simotime.com * * e-mail: helpdesk@simotime.com * ********************************************************** * //PUTPREFIX * //PUTPREFIX * This Query will identify source members with a //PUTPREFIX * member date greater than or equal to 20000101 //PUTPREFIX * the Source Code Repository file (APMASTER). //PUTPREFIX * * //IF TYPE NE UNKNOWN //IF MEMBERDATE GE 20000101 //PUT &<MEMBERNAME<&.&<TYPE<&,&<MEMBERDATE>&,&<MEMBERTIME>& //END-IF * //PUTSUFFIX * A test for Member Date
The contents of the output file (SYSQRY2) is determined by the //PUT statement. The preceding query will create a comma separated value or CSV file that may be easily imported into an Excel spreadsheet.
When SimoLYZE performs the source code analysis and determines the member type a flag is set to the "Y" condition. This flag is a field in the Source Code Repository file (APMASTER). This flag is not automatically reset by SimoLYZE
The following command file (SLZFLAG1.CMD) is provided as an example for determining which members have been flagged and how to reset the flag. There are eight flags available and SimoLYZE only uses the first flag.
@ECHO OFF
echo **************************************************************
echo * This program is provided by: *
echo * SimoTime Enterprises, LLC *
echo * (C) Copyright 1987-2010 All Rights Reserved *
echo * Web Site URL: http://www.simotime.com *
echo * e-mail: helpdesk@simotime.com *
echo **************************************************************
echo * SLZFLAG1 is Starting, v04.04.14...
rem *
echo * SLZFLAG1 set Specific Base Directory's variables
rem *
if "%1" == "" GOTO :ABEND01
CALL %1
echo * IVP4LYZE SLZINPUT set to %SLZINPUT%
rem *
echo * SLZFLAG1 set POINTER TO Source Code Repository.
rem *
set APMASTER=%SLZUSER%\APMASTER.DAT
rem *
echo * SLZFLAG1 Prepare to reset FLAG-01
rem *
set SYSQRY1=c:\SimoLIBR\QRYFLAG1.QRY
set SYSQRY2=%SLZUSER%\SYSTEMP4.TXT
SimoLYZE QUERY
if ERRORLEVEL = 1 GOTO :ABEND02
rem *
rem * Reset FLAG-01, this step uses the SYSTEMP4.TXT file
rem * created in the previous step.
rem *
set SLZUPD1=%SLZUSER%\SYSTEMP4.TXT
echo * SLZFLAG1 Call SIMOLYZE with UPDATE to reset Flag 01...
SimoLYZE UPDATE
if ERRORLEVEL = 1 GOTO :ABEND03
goto :END
:ABEND01
echo * SLZFLAG1 Parameter 1 is usually SET4LYZ1 for this IVP.
echo * SLZFLAG1 This is ABEND01 for IVP4FLG1 processing...
goto :END
:ABEND02
echo * SLZFLAG1 This is ABEND02 for IVP4FLG1 processing...
goto :END
:ABEND02
echo * SLZFLAG1 This is ABEND03 for IVP4FLG1 processing...
goto :END
:END
echo * SLZFLAG1 Thank you for using SimoLYZE by SimoTime Enterprises
echo * SLZFLAG1 is Finished...
The following is the SYSQRY1 file referenced in the preceding command file.
********************************************************** * This query script is provided by: * * SimoTime Enterprises, LLC * * (C) Copyright 1987-2010 All Rights Reserved * * Web Site URL: http://www.simotime.com * * e-mail: helpdesk@simotime.com * ********************************************************** * //PUTPREFIX * //PUTPREFIX * This Query will create a file that may be used by //PUTPREFIX * the SimoLYZE UPDATE facility to reset Flag-01 in //PUTPREFIX * the Source Code Repository file (APMASTER). //PUTPREFIX * * //IF FLAG01 EQ Y //PUT &<MEMBERNAME<& FLAG01(N) //END-IF *
The callable Application Programming Interface (API) is provided to determine the member type of a single member and may be called from a Micro Focus COBOL program using Mainframe Express (MFE) or Net Express. The following is an example of how a COBOL program (SLZ4TYPE.CBL) using a copy file (SLZSCAB1.CPY) would call the API for SimoLYZE.
IDENTIFICATION DIVISION.
PROGRAM-ID. SLZ4TYPE.
AUTHOR. SIMOTIME ENTERPRISES
*****************************************************************
* Copyright (C) 1987-2010 SimoTime Enterprises, LLC. *
* *
* All rights reserved. Unpublished, all rights reserved under *
* copyright law and international treaty. Use of a copyright *
* notice is precautionary only and does not imply publication *
* or disclosure. *
* *
* Permission to use, copy, modify and distribute this software *
* for any non-commercial purpose and without fee is hereby *
* granted, provided the SimoTime copyright notice appear on all *
* copies of the software. The SimoTime name or Logo may not be *
* used in any advertising or publicity pertaining to the use *
* of the software without the written permission of SimoTime *
* Enterprises. *
* *
* Permission to use, copy, modify and distribute this software *
* for any commercial purpose requires a fee to be paid to *
* SimoTime Enterprises. Once the fee is received by SimoTime *
* the latest version of the software will be delivered and a *
* license will be granted for use within an enterprise, *
* provided the SimoTime copyright notice appear on all copies *
* of the software. The SimoTime name or Logo may not be used *
* in any advertising or publicity pertaining to the use of the *
* software without the written permission of SimoTime *
* Enterprises. *
* *
* SimoTime Enterprises makes no warranty or representations *
* about the suitability of the software for any purpose. It is *
* provided "AS IS" without any express or implied warranty, *
* including the implied warranties of merchantability, fitness *
* for a particular purpose and non-infringement. SimoTime *
* Enterprises shall not be liable for any direct, indirect, *
* special or consequential damages resulting from the loss of *
* use, data or projects, whether in an action of contract or *
* tort, arising out of or in connection with the use or *
* performance of this software *
* *
* SimoTime Enterprises *
* 15 Carnoustie Drive *
* Novato, CA 94949-5849 *
* 415.883.6565 *
* *
* RESTRICTED RIGHTS LEGEND *
* Use, duplication, or disclosure by the Government is subject *
* to restrictions as set forth in subparagraph (c)(1)(ii) of *
* the Rights in Technical Data and Computer Software clause at *
* DFARS 52.227-7013 or subparagraphs (c)(1) and (2) of *
* Commercial Computer Software - Restricted Rights at 48 *
* CFR 52.227-19, as applicable. Contact SimoTime Enterprises, *
* 15 Carnoustie Drive, Novato, CA 94949-5849. *
* *
*****************************************************************
* This program is provided by SimoTime Enterprises *
* Our e-mail address is: helpdesk@simotime.com *
* Also, visit our Web Site at http://www.simotime.com *
* *
*****************************************************************
*
* SOURCE MODULE SLZ4TYPE.CBL
*
*****************************************************************
*
* SLZ4TYPE - Call Source Code Analysis to do member typing.
*
* CALLING PROTOCOL
* ----------------
* Use standard Micro Focus procedure to RUN or ANIMATE.
*
* DESCRIPTION
* -----------
* This program will call the SLZSCA02 member to identify the
* specified source member.
*
*****************************************************************
*
* MAINTENANCE
* -----------
* 1997/02/27 Simmons, Created program.
* 1999/08/13 Simmons, Added SA-Return code checking.
* 1999/08/13 Simmons, Updated Copyright and release information.
*
*****************************************************************
*
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
*****************************************************************
* Data-structure for Title and Copyright...
* ------------------------------------------------------------
01 SIM-TITLE.
05 T1 pic X(11) value '* SLZ4TYPE '.
05 T2 pic X(34) value 'Sample Program, Callable API '.
05 T3 pic X(10) value ' v04.04.14'.
05 T4 pic X(24) value ' http://www.simotime.com'.
01 SIM-COPYRIGHT.
05 C1 pic X(11) value '* SLZ4TYPE '.
05 C2 pic X(20) value 'Copyright 1987-2010 '.
05 C3 pic X(28) value ' SimoTime Enterprises, LLC '.
05 C4 pic X(20) value ' All Rights Reserved'.
*****************************************************************
COPY SLZSCAC1.
*****************************************************************
PROCEDURE DIVISION.
perform Z-POST-COPYRIGHT.
move '8' to SA-RETURN
move '1' to SA-REQUEST
move 'SLZ4TYPE ' to SA-MEMBER
move 'C:\SLZINPUT\SLZ4TYPE' to SA-FILE-NAME
call 'SLZSCA02' using SA-PASS-AREA
perform DISPLAY-RESULTS
display '* SLZ4TYPE, EOJ of SLZ4TYPE...' upon console.
GOBACK.
*****************************************************************
* The following routines are in alphabetic sequence... *
*****************************************************************
DISPLAY-RESULTS.
display ' Member Name: ' SA-MEMBER upon console
display ' Language: ' SA-LANGUAGE upon console
display ' Member Type: ' SA-TYPE upon console
display ' Record Count: ' SA-RECORDS upon console
display ' EXEC CICS: ' SA-EXEC-CICS upon console
display ' EXEC SQL: ' SA-EXEC-CICS upon console
if SA-RETURN not = 0
display ' Return Status:' SA-RETURN upon console
end-if
exit.
*****************************************************************
* The following Z-Routines perform administrative tasks *
* for this program. *
*****************************************************************
*****************************************************************
Z-POST-COPYRIGHT.
display SIM-TITLE upon console
display SIM-COPYRIGHT upon console
exit.
The copy file (SLZSCAB1.CPY) used in the preceding example contains the following statements.
*****************************************************************
* Data Structure or Pass Area used for calling SLZSCA02. *
*****************************************************************
* Copyright (C) 1987-2010 SimoTime Enterprises *
* All Rights Reserved *
*****************************************************************
* Provided by SimoTime Enterprises *
* Our e-mail address is: helpdesk@simotime.com *
* Also, visit our Web Site at http://www.simotime.com *
*****************************************************************
01 SA-PASS-AREA.
05 SA-REQUEST PIC X.
05 SA-RETURN PIC 9(9) COMP VALUE 0.
05 SA-MEMBER PIC X(16).
05 SA-FILE-NAME PIC X(256).
05 SA-LANGUAGE PIC X(8).
05 SA-TYPE PIC X(8).
05 SA-RECORDS PIC 9(8) VALUE 0.
05 SA-EXEC-CICS PIC 9(5) VALUE 0 .
05 SA-EXEC-SQL PIC 9(5) VALUE 0 .
05 SA-EXEC-JCL PIC 9(5) VALUE 0 .
The source code for the preceding example is included with SimoLYZE.
|
|||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||
|
|
|
|
|
|
|
|||||||||||||||||||
|
|
|
|
|||||||||||||||||||||||
|
|
|
|
|
|||||||||||||||||||||
Note: The SLZCONFG file is required. The analysis programs use the name SLZCONFG without a file extension. To use a file with a different name an environment variable must be used or a file error message (0035) will occur with the return code set to 12. The following set statement would map the SLZCONFG file to a MYFILE.CFG.
set SLZCONFG=MYFILE.CFG
SimoLYZE incorporates a concept known as "Judgmental Programing" or "Fuzzy Logic". In other words, SimoLYZE makes a best effort to determine the source member language and type. For example, a member that contains syntax for the COBOL language may be a COBOL program or a COBOL copy file (i.e member type).
If SimoLYZE cannot determine a member type it will categorize the member as unknown. SimoLYZE provides a very high level of accuracy when analyzing the following source members and with little or no changes to the configuration file parameters a 100% accuracy can be obtained.
| 1. | COBOL and Copy Files | |
| 2. | Assembler (Mainframe), Copy Files and Macro Files | |
| 3. | JCL, Procedures and Includes | |
| 4. | BMS | |
| 5. | MFS | |
| 6. | DBD | |
| 7. | PSB |
The following sections will describe the capabilities and limitations in more detail.
SimoLYZE provides support for scanning and identifying source member content as being the 370 Assembler language. Once the language is determined the member is then typed as a program, a copy file or a macro file. The untyped member (a filename without extension) is copied to a predefined directory with the extension MLC for programs, CPY for copy files and MAC for macro files. In a few cases where unique macro files are heavily used it may be necessary to pre-identify these macro files in the configuration file to obtain the desired results.
SimoLYZE provides support for scanning and identifying source member content as being the COBOL language. Once the language is determined the member is then typed as a program or a copy file. The untyped member (a filename without extension) is copied to a predefined directory with the extension CBL for programs and CPY for copy files. In a few cases where unique copy files are heavily used it may be necessary to pre-identify these copy files in the configuration file to obtain the desired results.
SimoLYZE provides support for scanning and identifying source member content as being the 370 JCL language. Once the language is determined the member is then typed as a mainframe job, a procedure file or an include file. The untyped member (a filename without extension) is copied to a predefined directory with the extension JCL for jobs, PRC for procedure files and INC for include files. The default parameters in the configuration file usually provide the desired results without modifications.
SimoLYZE provides support for scanning and identifying source members as being 370 Assembler language and BMS (Basic Mapping Support for CICS) source member types. The untyped member (a filename without extension) is copied to a predefined directory with the extension BMS. The default parameters in the configuration file usually provide the desired results without modifications.
SimoLYZE provides support for scanning and identifying source members as being 370 Assembler language and MFS (Message Format Services for IMS) source member types. The untyped member (a filename without extension) is copied to a predefined directory with the extension MFS. The default parameters in the configuration file usually provide the desired results without modifications.
SimoLYZE provides support for scanning and identifying source members as being 370 Assembler language and DBD (DataBase Description for IMS) source member types. The untyped member (a filename without extension) is copied to a predefined directory with the extension DBD. The default parameters in the configuration file usually provide the desired results without modifications.
SimoLYZE provides support for scanning and identifying source members as being 370 Assembler language and PSB (Program Specification Block for IMS) source member types. The untyped member (a filename without extension) is copied to a predefined directory with the extension PSB. The default parameters in the configuration file usually provide the desired results without modifications.
This section describes additional items that need to be considered and/or anticipated.
The Installation Verification Procedures (IVP's) include an example of how to save or record the start and stop times of the source member analysis and member typing process. The following is an extract from one of the IVP procedures (Ivp4Lyz1.CMD). If the environment variable for SimoNote is preset then writing to the specified log file is accomplished. Otherwise, the environment variable for SimoNote is set to the root directory on the C drive.
@ECHO OFF
setlocal
set SimoNote=c:\SimoLIBR\LOGS\SimoTIME.LOG
call :PostNote "************************************************************Ivp4Lyz1"
call :PostNote "Starting JobName Ivp4Lyz1, v04.04.14..."
...
...
...
goto :EojAok
rem *
rem ****************************************************************
rem * Display the message and write to the log file using ECHO.
rem * The ~ causes the leading/trailing double-quotes to be removed.
rem *
:PostNote
if "%SimoNote%" == "" set SimoNote=c:\SimoTime.LOG
echo %date% %time% %~1 >> %SimoNote%
echo * Ivp4Lyz1 %~1
goto :EOF
rem * The preceding :EOF is a reserved word/label that returns to
rem * the statement after the call to :PostNote.
rem *
rem ******************************************************************************
:EojAok
call :PostNote "Finished JobName Ivp4Lyz1 "
rem *
:END
When calling the :PostNote routine the parameter should be enclosed in double-quotes. This allows for a text string with embedded blanks. The technique of using the tilde character (~) when referencing the parameter string (i.e %~1) removes the double-quotes from the parameter string.
The technique of placing JCL at the beginning and ending of a source member is a technique sometimes used by mainframe programmers. This is not a wide spread technique especially when a source code management system is used. This technique can cause additional problems when downloaded to the PC since the technique for compiling a program on the PC is different than the mainframe.
The situation exists for duplicate names if members are downloaded from more than one Partitioned Data Set ((PDS). For example, the filename.BMS and the generated filename.CPY need to be kept separate. Another situation where duplicate names may occur is if the JCL has the same name as the program name. These members would be in separate PDS's on the mainframe and would need to be kept in separate directories on the PC.
The configuration file is used to set parameters that determine the way functions are performed when running SimoLYZE.
| The following statements will be used by the SLZMON01 monitoring program. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| The following statements will be used by the SLZCPY01 copy program. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| The following statements will be used by the SLZSYS01 program which performs the system function which actually reads the configuration file. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| The following statements will be used by the SLZHTMC1 program which performs the HTML function. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| The following statements will be used by the SLZLST01 program which performs the Listing function. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| The following statements will be used by the SLZMSG01 program which is called by other programs to display and/or log a message. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| The following statements will be used by the SLZQRY01 program which performs the QUERY function. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| The following statements will be used by the SLZSCA01, 02 and 03 programs which do the Source Code Analysis. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| The following statements will be used by the SLZUPD01 program which is perform which performs the mainline functions. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The Source Code Repository (APMASTB1.CPY) file contains information about the source members. For each member there is a record in APMASTER.
*****************************************************************
* Copy File for the Source Code Repository used by SimoLYZE. *
* This is a VSAM Keyed=Sequential-Data-Set or Key-Indexed File. *
*****************************************************************
* Copyright (C) 1987-2010 SimoTime Enterprises *
* All Rights Reserved *
*****************************************************************
* Provided by SimoTime Enterprises *
* Our e-mail address is: helpdesk@simotime.com *
* Also, visit our Web Site at http://www.simotime.com *
*****************************************************************
01 APMASTER-RECORD.
05 APMASTER-KEY.
10 APMASTER-KEY-16 PIC X(16).
10 APMASTER-RECORD-ID PIC 9(2).
05 APMASTER-DATA.
10 APMASTER-RECORD-STATUS PIC X.
10 APMASTER-DATE-01 PIC X(8).
10 APMASTER-TIME-01 PIC X(8).
10 APMASTER-DATE-02 PIC X(8).
10 APMASTER-TIME-02 PIC X(8).
10 APMASTER-LANGUAGE PIC X(8).
10 APMASTER-LANGUAGE-USER PIC X(8).
10 APMASTER-LANGUAGE-MFA PIC X(8).
10 APMASTER-TYPE PIC X(8).
10 APMASTER-TYPE-USER PIC X(8).
10 APMASTER-TYPE-MFA PIC X(8).
10 APMASTER-CICS PIC X.
10 APMASTER-CICS-USER PIC X.
10 APMASTER-CICS-MFA PIC X.
10 APMASTER-SQL PIC X.
10 APMASTER-SQL-USER PIC X.
10 APMASTER-SQL-MFA PIC X.
10 APMASTER-FLAGS.
15 APMASTER-FLAG-01 PIC X.
15 APMASTER-FLAG-02 PIC X.
15 APMASTER-FLAG-03 PIC X.
15 APMASTER-FLAG-04 PIC X.
15 APMASTER-FLAG-05 PIC X.
15 APMASTER-FLAG-06 PIC X.
15 APMASTER-FLAG-07 PIC X.
15 APMASTER-FLAG-08 PIC X.
10 APMASTER-FLAGS-USER.
15 APMASTER-FLAG-U1 PIC X.
15 APMASTER-FLAG-U2 PIC X.
15 APMASTER-FLAG-U3 PIC X.
15 APMASTER-FLAG-U4 PIC X.
15 APMASTER-FLAG-U5 PIC X.
15 APMASTER-FLAG-U6 PIC X.
15 APMASTER-FLAG-U7 PIC X.
15 APMASTER-FLAG-U8 PIC X.
10 APMASTER-RECORDS PIC 9(8).
10 APMASTER-COPYBOOK PIC 9(4).
10 APMASTER-MACRO PIC 9(4).
10 APMASTER-FILLER-00 PIC X(135).
10 APMASTER-MVS-MEMBER-NAME PIC X(16).
10 APMASTER-PCNAME PIC X(256).
10 APMASTER-MAKEACTION PIC X(224).
10 APMASTER-HOSTNAME PIC X(256).
To create a new, empty Source Code Repository (APMASTER) refer to The Update Function.
The File Information Repository (FPMASTB1.CPY) file contains information about the data files and VSAM Data Sets. For each file or data set there is a record in FPMASTER.
WIP...
This section is always a Work-in-Progress effort.
| 2001/01/15 | I have an assembler program that creates a table and it is not being identified as an assembler program. It does not have assembler instruction code and uses a user written macro (TABLEX) a number of times to expand into table entries. Is it possible for SimoLYZE to correctly identifiy this member? |
| Yes, it is possible. Refer to "The Configuration File" section and notice the SLZSCAC2 group. The MACRO keyword is specifically provided to allow for the definition of a maximum of 25 user macro
files. If TABLEX is defined as a user macro then SimoLYZE will interpret TABLEX as a 370 macro and this would result in the member being identified as an assembler member. |
|
| 2001/03/17 | I want to extract information from the Source Code Repository into a CSV file that will be used to import data into an Excel spreadsheet or a relational data base. How can I do this? |
| It is possible to have the SimoLYZE Query function create a CSV file. This is described in the
Source Code Repository Extract to CSV File section of the documentation. |
|
| 2001/05/22 | I want to identify source members that have been updated based a date value. How can I do this? |
| The IVP4LYZ3.CMD that is included as part of the Installation Verification Procedures has an example of how to do this using the SimoLYZE query function. |
The purpose of SimoLYZE is to do member typing and provide an overview of the number of members by member type. It is not intended to do application analysis or modification. Both Mainframe Express and Revolve (from Micro Focus) deliver a tremendous amount of analytical and programming power for the analysis, development, maintenance and deployment of business applications.
The SimoLYZE program, this documentation, the Installation Verification Procedures (IVP's) and examples are provided in a zip'ed file. Additional information about acquiring SimoLYZE may be obtained from the Product Availability and Pricing document.
Information about products and services available from Micro Focus may be found at http://www.microfocus.com
Check out The SimoTime Library for a wide range of topics for Programmers, Project Managers and Software Developers.
To review all the information available on this site start at The SimoTime Home Page .
If you have any questions, suggestions or comments please call or send an e-mail to:
| helpdesk@simotime.com |
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 |
| SimoLYZE, Version 08.12.30 |
| Copyright © 1987-2010 SimoTime Enterprises All Rights Reserved |
| When technology complements business |
| http://www.simotime.com |