|
|||||
|
When working in a shared systems environment it is quite often necessary to view, modify, convert or compare the content and format of data files. This is especially true when moving source code, JCL or control files between the mainframe, an application server and the PC. The ability to quickly convert the format and modify the content between ASCII and EBCDIC is a requirement. The ability to view or dump the content of a file in a hexadecimal display format can also be very helpful. When testing an application it is quite useful to be able to compare the contents of two data files and to select the information to be compared within a record.
In many circumstances these tasks are repetitive and run as transparent, automated processes. In this environment it is more important to be able to create a callable program or batch file than it is to have a graphical user interface that may require some human interaction during the execution process. The techniques used to do data file conversion or comparison must be able to execute on a Windows platform, a UNIX platform or the mainframe.
SimoZAPS is a collection of utility programs that are designed to fill this niche. SimoZAPS provides the following capabilities.
| 1. | View the contents of a file in hexadecimal format with
translation to EBCDIC or ASCII whenever possible. Scan a file and find information based on a user-submitted argument. The find argument may be specified in ASCII, EBCDIC or Hexadecimal format. Patch bytes of information within a file based on a user submitted patch value. The patch information may be specified in ASCII, EBCDIC or HEX. |
| 2. | Generate COBOL programs that will convert data files on the mainframe, a Windows platform with Micro Focus or a UNIX platform with Micro Focus. Provide for the conversion of file format, record format and record content changes. Convert between ASCII and EBCDIC encoded formats at the field level while maintaining numeric encoded fields (packed or binary). |
| 3. | Generate a COBOL program that will compare the contents of two files. |
| 4. | Read an ASCII/Text file and create an EBCDIC, 80-byte, fixed record length file. |
| 5. | Read an EBCDIC, 80-byte, fixed record length file and create an ASCII/Text file. |
| 6. | Read an ASCII file of mixed case and create an ASCII file of all upper case. |
| 7. | Read an ASCII file of mixed case and create an ASCII file of all lower case. |
| 8. | Read a COBOL source program and create a new file with case formatting. |
| 9. | Read an ASCII/Text file and create a new ASCII/Text file allowing include, omit and global changes to the individual records. |
In most cases SimoZAPS does not change the input file. It creates a copy of the file that contains the modifications. The PATCH function of HEXCESS makes changes directly to the specified file name.
SimoZAPS does not actually do the data conversion or comparison, it generates COBOL source code (or programs) that will be used to do the data conversion or comparison. This technique has two advantages.
1. The COBOL source code may be compiled and executed on a Windows or
UNIX platform using Micro Focus COBOL or on the mainframe using IBM COBOL/2 or
a later version.
2. The generated COBOL source code may be changed to meet
unique or specialized processing requirements.
SimoZAPS requires approximately 1.1M of disk space. Windows/2000, Windows/NT or Windows/98 is the required operating system. The SimoZAPS program, this documentation, the Installation Verification Procedures (IVP's) and examples are provided in a zip'ed file. Additional information about acquiring SimoZAPS may be obtained from http://www.simotime.com/evaltek2.htm
To install SimoZAPS create a directory as follows.
C:\>md simolibr C:\>cd SimoLIBR C:\SIMOLIBR>md DataWrk1 C:\SIMOLIBR>md HTML C:\SIMOLIBR>md LOGS C:\SIMOLIBR>pkunzip simozaps.zip
Note: If the target install directory for SimoLIBR is changed it will be necessary to modify the ZAPSREC1.CMD, ZAPSREC2.CMD and the IVP.CMD's to access the new directory structure. Also, the modified SimoLIBR directory should be added to the path statement.
SimoZAPS contains a suite of Installation Verification Programs (IVP's). Their primary purpose is to verify that SimoZAPS has been properly installed. Their secondary purpose is to serve as sample programs.
The following is an overview of the IVP's.
| Program | Description |
| IVP4HEX1 | Use the HEXCESS VIEW function to display the contents of a file in Hexadecimal with an EBCDIC and ASCII interpretation. |
| IVP4HEX2 | Use the HEXCESS FIND function to find text strings within a file and display the contents of the matching segment in Hexadecimal with an EBCDIC and ASCII interpretation. |
| IVP4HEX3 | Use the HEXCESS PATCH function to patch a 1 to 32 byte area within a file. |
| IVP4GFC1 | Use the GENERATE function to read a
SEQUENTIAL, 80-byte, fixed, EBCDIC file and create an ASCII/CRLF, 80-byte,
variable, ASCII file. Note: this function does not do the actual conversion. This function generates (or creates) the COBOL source code for a program that will do the conversion. |
| IVP4GFC2 | Use the GENERATE function to read a
SEQUENTIAL, 80-byte, fixed, EBCDIC file and create an INDEXED, 256-byte,
variable, ASCII file with key position at 1 for a key length of 6. Note: this function does not do the actual conversion. This function generates (or creates) the COBOL source code for a program that will do the conversion. |
| IVP4GFC3 | Use the GENERATE function to read a
SEQUENTIAL, 80-byte, fixed, EBCDIC file and create a SEQUENTIAL, 80-byte,
fixed, ASCII file. Note: this function does not do the actual conversion. This function generates (or creates) the COBOL source code for a program that will do the conversion. |
| IVP4GFC4 | Use the GENERATE function to read an
ASCII/CRLF, 80-byte, variable, ASCII file and create an INDEXED, 80-byte,
variable, EBCDIC file. Note: this function does not do the actual conversion. This function generates (or creates) the COBOL source code for a program that will do the conversion. |
| IVP4ZAP1 | Use the MODIFY function to do a global replace of a text string in a single file or multiple files using a list of file names. |
| IVP4ZAP2 | Use the MODIFY function to create a batch file that will rename all the members in a directory using lower case characters. |
| IVP4ZAP3 | Use the FormatCOBOL function to format a COBOL source member. |
The following three procedures will demonstrate the uses of the View, Find and Patch functions of SimoZAPS.
The following command ( IVP4HEX1.CMD) will run the HEXCESS VIEW function to verify that SimoZAPS is installed and working.
C:\SIMOLIBR> ivp4hex1
The content of the IVP4HEX1.CMD file is as follows.
@echo OFF rem * rem * This procedure will read the HELLO.CBL file and produce rem * a SYSLOG.TXT file that contains hexadecimal display rem * information with an EBCDIC and ASCII translation when rem * possible. The information is also displayed on the screen. rem * echo * IVP4HEX1 Starting the VIEW function of HEXCESS set syslog=syslog.txt if exist syslog.txt erase syslog.txt SimoZAPS HEXCESS hello.cbl view=129 stop=256 echo * echo * IVP4HEX1 The SYSLOG is displayed in a separate window, echo * IVP4HEX1 to continue... close the SYSLOG window. notepad syslog.txt echo * IVP4HEX1 Thank you for using HEXCESS by SimoTime Enterprises
Refer to The HEXCESS View Function for a more detailed description of the preceding process.
The following command ( IVP4HEX2.CMD)will run the HEXCESS FIND function to verify that SimoZAPS is installed and working.
C:\SIMOLIBR> ivp4hex2
The content of the IVP4HEX2.CMD file is as follows.
@echo OFF rem * rem * This procedure will read the HELLO.CBL file and produce rem * a SYSLOG.TXT file that contains hexadecimal display rem * information with an EBCDIC and ASCII translation when rem * possible. The information is also displayed on the screen. rem * The information displayed is selected based on the search rem * argument of the FIND function. rem * echo * IVP4HEX2 Starting the FIND function of HEXCESS set syslog=syslog.txt if exist syslog.txt erase syslog.txt SimoZAPS HEXCESS hello.cbl find=1 len=8 ascii=division echo * echo * IVP4HEX2 The SYSLOG is displayed in a separate window, echo * IVP4HEX2 to continue... close the SYSLOG window. notepad syslog.txt echo * IVP4HEX2 Thank you for using HEXCESS by SimoTime Enterprises
Refer to The HEXCESS Find Function for a more detailed description of the preceding process.
The following command ( IVP4HEX3.CMD)will run the HEXCESS PATCH function to verify that SimoZAPS is installed and working.
C:\SIMOLIBR> ivp4hex3
The content of the IVP4HEX3.CMD file is as follows.
@echo OFF rem * rem * This procedure will read the HELLO.CBL file and modify or rem * patch the file directly. This is one of the functions that rem * does NOT create a new file. Therefore, make a backup copy rem * of the file prior to making any changes that use the rem * patch function. rem * echo * IVP4HEX3 Starting the PATCH function of HEXCESS set syslog=syslog.txt if exist syslog.txt erase syslog.txt SimoZAPS HEXCESS hello.cbl patch=1 len=6 hex=303132333435 echo * echo * IVP4HEX3 The SYSLOG is displayed in a separate window, echo * IVP4HEX3 to continue... close the SYSLOG window. notepad syslog.txt echo * IVP4HEX3 Thank you for using HEXCESS by SimoTime Enterprises
Refer to the The HEXCESS Patch Function for a more detailed description of the preceding process.
The GENERATE function will generate (or create) the source code for a program that will do a file conversion. The following four Installation Verification Procedures (IVP's) are provided to verify proper installation of SimoZAPS and the proper configuration for the GENERATE function. Detailed information about the IVP's is provided in the Using SimoZAPS section.
The following command ( Ivp4Gfc1.CMD) will run the GENERATE function to create the COBOL source code for doing a file conversion from an EBCDIC Sequential file to an ASCII Text file.
C:\SIMOLIBR> Ivp4Gfc1
Refer to Generate a File Conversion Program for a more detailed description of the preceding process.
The following command ( Ivp4Gfc2.CMD) will run the GENERATE function to create the COBOL source code for doing a file conversion from an EBCDIC Sequential file to an ASCII Indexed file.
C:\SIMOLIBR> ivp4gfc2
Refer to Generate a File Conversion Program for a more detailed description of the preceding process.
The following command ( Ivp4Gfc3.CMD) will run the GENERATE function to create the COBOL source code for doing a file conversion from an EBCDIC Sequential file to an ASCII Indexed file.
C:\SIMOLIBR> ivp4gfc3
Refer to Generate a File Conversion Program for a more detailed description of the preceding process.
The following command ( Ivp4Gfc4.CMD) will run the GENERATE function to create the COBOL source code for doing a file conversion from an ASCII Text file to an EBCDIC Indexed file.
C:\SIMOLIBR> ivp4gfc4
Refer to Generate a File Conversion Program for a more detailed description of the preceding process.
The following command ( Ivp4Gfc5.CMD) will run the GENERATE function to create the COBOL source code for doing a file conversion from an ASCII Text file to an EBCDIC Indexed file. This IVP uses a random add and update approach for adding or updating records to the output file.
C:\SIMOLIBR> ivp4gfc5
Refer to Generate a File Conversion Program for a more detailed description of the preceding process.
The GENERATE function will generate (or create) the source code for a program that will do a file comparison of two files at the record level. The following Installation Verification Procedure (IVP) is provided to verify proper installation of SimoZAPS and the proper configuration for the GENERATE function for Data File Comparison. Detailed information about the IVP's is provided in the Using SimoZAPS section. The following command will run the IVP for the Data File Compare function.
C:\SIMOLIBR> IvpZfcG1
The following is the Window's Commandl file (IvpZfcG1.CMD) that executes the IVP.
@echo OFF
setlocal
set PostNote=c:\SimoLIBR\LOGS\SimoTime.LOG
set JobStatus=0000
set ShowCode=SHOW
rem *
call :PostNote "************************************************************IvpZfcG1.CMD"
call :PostNote "Starting JobName IvpZfcG1, User is %USERNAME%"
echo ************************************************************
echo * This program is provided by: *
echo * SimoTime Enterprises, LLC *
echo * (C) Copyright 1987-2006 All Rights Reserved *
echo * Web Site URL: http://www.simotime.com *
echo * e-mail: helpdesk@simotime.com *
echo ************************************************************
echo * Text: Read a control file, Create a COBOL data file
echo * comparison program..
echo * Author: SimoTime Enterprises
echo * Version: 04.07.23
echo *
rem *
rem *
call :PostNote "************************************************************"
call :PostNote "* This step will create the HTML documentation based on *"
call :PostNote "* the copy file that defines the record structure. *"
rem *
call Rec1HTML c:\SimoLIBR\ITEMCB01.CPY c:\SimoLIBR\HTML\ITEMMAST.HTM IBM NOPAUSE
if ERRORLEVEL = 1 goto :EojNOK
call :PostNote "* The HTML document has been created. *"
rem *
call :PostNote "************************************************************"
call :PostNote "* This step will generate the COBOL program that compares *"
call :PostNote "* two data files. If a difference is encountered the delta *"
call :PostNote "* information will be displayed and written to a log file. *"
rem *
call ZapsCOMP c:\SimoLIBR\IvpZfcT1.txt c:\SimoLIBR\DataWrk1\IvpZcpC1.CBL
if ERRORLEVEL = 1 goto :EojNOK
call :PostNote "* The COBOL comparison program has been generated. *"
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
@echo OFF
echo %date% %time% %~1 >> %PostNote%
echo %~1
goto :EOF
rem * The preceding :EOF causes a return to caller within this CMD.
rem *
rem *********************************************************************
:EojNOK
call :PostNote "ABENDING JobName IvpZfcG1, User is %USERNAME%"
pause
rem *
rem *********************************************************************
:EojAOK
call :PostNote "Finished JobName IvpZfcG1, User is %USERNAME%"
echo * Thank you for using the GENERATE function by SimoTime Enterprises
pause
rem *
:End
The following command ( Ivp4Zap1.CMD) will run the MODIFY function to verify that SimoZAPS is installed and working.
C:\SIMOLIBR> ivp4zap1
Refer to The MODIFY Function, Changing a Text String for a more detailed description of the preceding process.
The following command ( Ivp4Zap2.CMD) will run the MODIFY function to verify that SimoZAPS is installed and working.
C:\SIMOLIBR> ivp4zap2
Refer to The MODIFY Function, Member Names in Lower Case for a more detailed description of the preceding process.
The following command ( Ivp4Zap3.CMD) will run the FormatCOBOL function to verify that SimoZAPS is installed and working.
C:\SIMOLIBR> ivp4zap3
Refer to The FormatCOBOL Function, Format a COBOL Program for Case Consistency for a more detailed description of the preceding process.
SimoZAPS is divided into five functional areas. The following table is a quick summary of the functional areas.
| Function | Description | ||||
| HexCess | This function will read a file and produce a new file containing hexadecimal dump information. The new file (SYSLOG) is ASCII/Text. In addition to the hexadecimal format the SYSLOG includes an EBCDIC and ASCII translation when possible. | ||||
| Generate |
|
||||
| Translate | This function provides for simple translation between ASCII/Text and EBCDIC/80-byte files. Both the content (ASCII or EBCDIC) and file format (variable-text and fixed-80-byte) are converted. | ||||
| Modify | This function provides the capability of copying an ASCII/Text file. The content of the output file may be modified in the process. Individual records may be included or deleted based on their content. Also, individual records that are being copied may be modified using such keywords as insert, append, replace and more. | ||||
| FormatCOBOL | This function simply provides a consistent use of upper and lower case for COBOL source code. Many times we work with COBOL code that has evolved over a number of years and the use of upper and lower case varies widely. With the consistent use of upper/lower case it makes the code easier to read and understand. |
The functions provided by SimoZAPS are described in more detail in the following sections.
The hexadecimal access function (HEXCESS) provides a "VIEW" capability (or hexadecimal dump) of a file in hexadecimal format. When possible the EBCDIC and ASCII characters are displayed. The hexadecimal view information is displayed and written to a SYSLOG file. The starting and stopping positions may be specified.
HEXCESS provides a "FIND" capability. A search argument may be specified and the input file is read until a data match is found. Once a data match is found the 128 byte section of the file containing the match is displayed and written to the SYSLOG file.
HEXCESS provides a "PATCH" capability. A data string of a maximum of thirty-two (32) bytes may be specified on the command line. This data string will be written at the position specified within the file.
The HEXCESS function of SimoZAPS is run from the command line as follows.
C:\> SIMOZAPS HEXCESS filename Keyword=parameter ...
VIEW=start-position STOP=stop-position
FIND=start-position LENGTH=nnn ASCII=xxx
EBCDIC=xxx
HEX=xxxx
PATCH=start-position LENGTH=nnn ASCII=xxx
EBCDIC=xxx
HEX=xxxx
The following is a summary of the keyword=parameters capabilities provided by SimoZAPS and the HEXCESS function.
|
|||||||||||||||||||||||||||||||||||||||||
HEXCESS includes three installation verification procedures (IVP's) that also serve as examples.
The IVP4HEX1.BAT does a simple hexadecimal view. The information is displayed to the screen and written to the SYSLOG file. The following shows the content of the batch file.
@echo OFF rem * rem * This procedure will read the HELLO.CBL file and produce rem * a SYSLOG.TXT file that contains hexadecimal display rem * information with an EBCDIC and ASCII translation when rem * possible. The information is also displayed on the screen. rem * echo * IVP4HEX1 Starting the VIEW function of HEXCESS set syslog=syslog.txt if exist syslog.txt erase syslog.txt SimoZAPS HEXCESS hello.cbl view=129 stop=256 echo * echo * IVP4HEX1 The SYSLOG is displayed in a separate window, echo * IVP4HEX1 to continue... close the SYSLOG window. notepad syslog.txt echo * IVP4HEX1 Thank you for using HEXCESS by SimoTime Enterprises
The following is the hexadecimal dump information that is displayed and written to the SYSLOG.
* Hexcess2 hello.cbl view 129 stop 256 * Hexcess2 Starting at 000000000129 * Hexcess2 Stopping at 000000000256 * Hexcess2 File size 000000002287 Position Hex..... ........ ........ ........ ebcdic.......... ascii........... 000000129 2A2A2A2A 2A2A2A2A 2A2A2A2A 2A2A2A2A ................ **************** 000000145 2A2A2A2A 2A2A2A2A 2A2A2A2A 2A2A2A2A ................ **************** 000000161 2A2A2A2A 2A2A2A2A 2A2A2A2A 2A2A0D0A ................ **************.. 000000177 20202020 20202A0D 0A202020 2020202A ................ *.. * 000000193 20534F55 52434520 4D4F4455 4C452048 ..|.....(|..<... SOURCE MODULE H 000000209 454C4C4F 2E43424C 0D0A2020 20202020 .<<|...<........ ELLO.CBL.. 000000225 2A0D0A20 20202020 202A2A2A 2A2A2A2A ................ *.. ******* 000000241 2A2A2A2A 2A2A2A2A 2A2A2A2A 2A2A2A2A ................ **************** * Hexcess2 Program-is-ENDING...
The IVP4HEX2.BAT does a find and dump when a match is found. The match process is not case sensitive. the the argument for the FIND is specified in upper case it will find text string matches that are upper. lower or mixed case. For example, a FIND argument of 'ABC' would find a match for 'ABC', 'abc', or 'aBc'.
The hexadecimal find information is displayed to the screen and written to the SYSLOG file. The following shows the content of the batch file.
@echo OFF rem * rem * This procedure will read the HELLO.CBL file and produce rem * a SYSLOG.TXT file that contains hexadecimal display rem * information with an EBCDIC and ASCII translation when rem * possible. The information is also displayed on the screen. rem * The information displayed is selected based on the search rem * argument of the FIND function. rem * echo * IVP4HEX2 Starting the FIND function of HEXCESS set syslog=syslog.txt if exist syslog.txt erase syslog.txt SimoZAPS HEXCESS hello.cbl find=1 len=8 ascii=division echo * echo * IVP4HEX2 The SYSLOG is displayed in a separate window, echo * IVP4HEX2 to continue... close the SYSLOG window. notepad syslog.txt echo * IVP4HEX2 Thank you for using HEXCESS by SimoTime Enterprises
The following is the hexadecimal find information that is displayed and written to the SYSLOG.
* Hexcess2 hello.cbl find 1 length 8 ascii division * Hexcess2 Find from 000000000001 * Hexcess2 Length is 000000000008 * Hexcess2 Find ASCII division * Hexcess2 File size 000000002287 * Hexcess2 Hit Position 000000000023 * Hex-Find Starting... Dump Length = 0128 Position Hex..... ........ ........ ........ ebcdic.......... ascii........... 000000007 20494445 4E544946 49434154 494F4E20 ....+........|+. IDENTIFICATION 000000023 44495649 53494F4E 2E0D0A20 20202020 ......|+........ DIVISION... 000000039 20205052 4F475241 4D2D4944 2E202020 ..&.|...(....... PROGRAM-ID. 000000055 2048454C 4C4F2E0D 0A202020 20202020 ...<<|.......... HELLO... 000000071 41555448 4F522E20 20202020 2020204D ....|..........( AUTHOR. M 000000087 49434841 454C2053 494D4D4F 4E532E0D .....<...((|+... ICHAEL SIMMONS.. 000000103 0A202020 2020202A 2A2A2A2A 2A2A2A2A ................ . ********* 000000119 2A2A2A2A 2A2A2A2A 2A2A2A2A 2A2A2A2A ................ **************** * Hex-Find Complete... Dump Length = 0128 * Hexcess2 Hit Position 000000000825 * Hex-Find Starting... Dump Length = 0128 Position Hex..... ........ ........ ........ ebcdic.......... ascii........... 000000809 20202020 454E5649 524F4E4D 454E5420 .....+...|+(.+.. ENVIRONMENT 000000825 44495649 53494F4E 2E0D0A20 20202020 ......|+........ DIVISION... 000000841 202A2A2A 2A2A2A2A 2A2A2A2A 2A2A2A2A ................ *************** 000000857 2A2A2A2A 2A2A2A2A 2A2A2A2A 2A2A2A2A ................ **************** 000000873 2A2A2A2A 2A2A2A2A 2A2A2A2A 2A2A2A2A ................ **************** 000000889 2A2A2A2A 2A2A2A2A 2A2A2A2A 2A2A2A2A ................ **************** 000000905 2A2A0D0A 20202020 20202A0D 0A202020 ................ **.. *.. 000000921 20202020 44415441 20444956 4953494F ...............| DATA DIVISIO * Hex-Find Complete... Dump Length = 0128 * Hexcess2 Hit Position 000000000930 * Hex-Find Starting... Dump Length = 0128 Position Hex..... ........ ........ ........ ebcdic.......... ascii........... 000000914 202A0D0A 20202020 20202044 41544120 ................ *.. DATA 000000930 44495649 53494F4E 2E0D0A20 20202020 ......|+........ DIVISION... 000000946 2020574F 524B494E 472D5354 4F524147 ...|...+....|... WORKING-STORAG 000000962 45205345 4354494F 4E2E0D0A 20202020 .......|+....... E SECTION... 000000978 20202A2A 2A2A2A2A 2A2A2A2A 2A2A2A2A ................ ************** 000000994 2A2A2A2A 2A2A2A2A 2A2A2A2A 2A2A2A20 ................ *************** 000001010 20202020 20202020 20202020 20202020 ................ 000001026 20202020 20202020 20202020 20202020 ................ * Hex-Find Complete... Dump Length = 0128 * Hexcess2 Hit Position 000000001777 * Hex-Find Starting... Dump Length = 0128 Position Hex..... ........ ........ ........ ebcdic.......... ascii........... 000001761 20202020 20205052 4F434544 55524520 ......&.|....... PROCEDURE 000001777 44495649 53494F4E 2E0D0A0D 0A202020 ......|+........ DIVISION..... 000001793 20202020 20202020 50655266 4F724D20 ........&...|.(. PeRfOrM 000001809 506F5374 2D436F50 79526947 68542E0D &?....?&`....... PoSt-CoPyRiGhT.. 000001825 0A0D0A20 20202020 20202020 20207045 ................ ... pE 000001841 72466F52 6D204469 53704C61 592D4865 ..?._.....</.... rFoRm DiSpLaY-He 000001857 4C6C4F2D 576F526C 442E0D0A 0D0A2020 >%|..?.%........ LlO-WoRlD..... 000001873 20202020 20202020 20474F42 41434B2E ..........|..... GOBACK. * Hex-Find Complete... Dump Length = 0128 * Hexcess2 Find Count 000000000004 * Hexcess2 Program-is-ENDING...
The IVP4HEX3.BAT does a patch and dump using the specified data string from the command line. The hexadecimal dump information is displayed to the screen and written to the SYSLOG file. The following shows the content of the batch file.
Please note: The hexadecimal values specified by the HEX keyword will need to match with the output
@echo OFF rem * rem * This procedure will read the HELLO.CBL file and modify or rem * patch the file directly. This is one of the functions that rem * does NOT create a new file. Therefore, make a backup copy rem * of the file prior to making any changes that use the rem * patch function. rem * echo * IVP4HEX3 Starting the PATCH function of HEXCESS set syslog=syslog.txt if exist syslog.txt erase syslog.txt SimoZAPS HEXCESS hello.cbl patch=1 len=6 hex=303132333435 echo * echo * IVP4HEX3 The SYSLOG is displayed in a separate window, echo * IVP4HEX3 to continue... close the SYSLOG window. notepad syslog.txt echo * IVP4HEX3 Thank you for using HEXCESS by SimoTime Enterprises
The following is the hexadecimal dump information that is displayed and written to the SYSLOG.
* Hexcess2 hello.cbl patch 1 length 6 hex 303132333435 * Hexcess2 Patching at 000000000001 * Hexcess2 Length is 000000000006 * Hexcess2 Patch HEX 303132333435 * Hexcess2 File size 000000002287 * HexPatch Starting... Dump Length = 0128 Position Hex..... ........ ........ ........ ebcdic.......... ascii........... 000000001 30313233 34352049 44454E54 49464943 ..........+..... 012345 IDENTIFIC 000000017 4154494F 4E204449 56495349 4F4E2E0D ...|+.......|+.. ATION DIVISION.. 000000033 0A202020 20202020 50524F47 52414D2D ........&.|...(. . PROGRAM- 000000049 49442E20 20202048 454C4C4F 2E0D0A20 .........<<|.... ID. HELLO... 000000065 20202020 20204155 54484F52 2E202020 ..........|..... AUTHOR. 000000081 20202020 204D4943 4841454C 2053494D .....(.....<...( MICHAEL SIM 000000097 4D4F4E53 2E0D0A20 20202020 202A2A2A (|+............. MONS... *** 000000113 2A2A2A2A 2A2A2A2A 2A2A2A2A 2A2A2A2A ................ **************** * HexPatch Complete... Dump Length = 0128 * Hexcess2 Program-is-ENDING...
The Mainframe Express (MFE) and Net Express products from Micro Focus offer excellent program development environments that run on the PC. Both products have an "Options" capability that provides for the integration of programs and other development tools. This section describes how to integrate the Hex-Dump capabilities of SimoZAPS into either the MFE or Net Express desktop. It is assumed that SimoZAPS has been installed in the C:\SIMOLIBR directory.
If all you want to do is a Hex-Dump of PC files the SIMOZAPS.EXE member is all that is needed. It was originally designed to run from a PC Command Line as a batch process. Using the ZAPSHEX1.CMD file makes it a simple process to add the Hex-Dump capability to the MFE or Net Express toolbar.
The following shows the content of the ZAPSHEX1.CMD file.
@echo OFF
set JobStatus=0000
set SYSLOG=c:\SimoLIBR\LOGS\ZapsDump.LOG
rem *
call SimoNote "*******************************************************ZapsHex1"
call SimoNote "Starting JobName ZapsHex1"
rem *
simozaps hexcess %1 view=%2 stop=%3
if errorlevel = 1 set JobStatus=0001
if not "%JobStatus%" == "0000" goto :EojNOK
rem *
echo * ZapsHex1 The HexDump Information is displayed in separate window using Notepad,
echo * ZapsHex1 please close the separate Notepad window to end the task.
START notepad %SYSLOG%
rem *
:EojAOK
call SimoNote "Finished JobName ZapsHex1"
goto :End
:EojNOK
call SimoNote "ABENDING JobName ZapsHex1"
call SimoNote "ABENDING Message JobStatus %JobStatus%"
goto :End
:End
if not "%4" == "nopause" pause
Note: depending on the version of Windows you are running the pause statement may or may-not be required.
From the toolbar of the desktop for MFE or Net Express select Options, then select Customize IDE from the drop-down menu and a new window will be displayed.
From the "Customize IDE" window select the Tools Tab, then select New Tool.
Enter the following for the Enter menu text prompt.
HexCess 1st 1K, highlight a file
Now enter the following values
| Command: | c:\SIMOLIBR\ZAPSHEX1.CMD |
| Arguments: | $(FileSel) 1 1024 nopause |
| Start in: | c:\simolibr |
Note: The $(FileSel) will substitute the name of the high-lighted member when executing ZAPS4MFE.BAT from the MFE or Net Express Tool bar.
Click OK and this will complete the process of integrating the Hex-Dump function of SimoZAPS.
From the MFE or Net Express desktop (either the source member list or the catalog for MFE) select a member or simple high-light a member name.
Select the Tools option from the MFE or Net Express Tool bar, then select the HexCess 1st 1K, highlight a file from the drop-down menu.
Note: The dump information will scroll in a window and the dump information will be written to the ZAPSDUMP.LOGfile. Notepad will be used to view the dump file.
SimoZAPS does not actually do the Data File Conversion or Comparison. It generates COBOL source code that does the actual conversion or comaprison. This COBOL source code may be compiled and executed on a mainframe (z/OS or VSE), a Personal Computer (Micro Focus COBOL) or a UNIX platform (Micro Focus COBOL). The following sections describe the Data File Conversion and Comparison processes in more detail.
This function will generate the COBOL source code for a file conversion program. This file conversion program (SYSCOBOL) will read an input file (SYSUT1) and create a new output file (SYSUT2). The format of SYSUT1 and SYSUT2 is specified by records contained in a control or specifications file (SYSCNTL).
|
Start the process | |||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
|
Determine if a CONVERT request and call SimoCNVT. | |||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
|
|
|
|
|
Read the specifications from SYSCNTL and use SYSMODEL as a template to create SYSCOBOL.CBL. | |||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||
|
End-of-Job | |||||||||||||||||||||||||||
The following is an example of a batch file that will generate the source code for a file conversion program.
@echo OFF rem * rem * The process will read the SYSCNTL1.TXT file and create the rem * ZAP001C1.CBL file using the SYSMASK1.TXT as a mask. rem * The SYSCNTL1.TXT file is expected to contains the specifications rem * for reading a sequential, 80-byte, fixed, EBCDIC file and creating rem * an ASCII/CRLF, 80-byte, variable, ASCII file that uses a rem * carriage-return and line-feed as a record separator. rem * echo * IVP4GFC1 Starting the GENERATE function of SimoZAPS set syscntl=syscntl1.txt set sysmodel=sysmask1.txt set syscobol=zap001c1.cbl type %syscntl% simozaps generate echo * IVP4GFC1 SYSCNTL is %syscntl% echo * IVP4GFC1 SYSCOBOL is %syscntl% echo * IVP4GFC1 The SYSCOBOL is displayed in a separate window, echo * IVP4GFC1 to continue... close the SYSCOBOL window. notepad %syscobol% echo * IVP4GFC1 Thank you for using the GENERATE function by SimoTime Enterprises
The following is an example of a SYSCNTL file.
*********************************************************************** * SYSUT1 should be a sequential, 80-byte, fixed, ebcdic file. * * SYSUT2 should be a ASCII/CRLF, 80-byte, variable, ascii file. * * * * The DIALECT statement specifies the use of COBOL/2 compliant code * * for the generated conversion program. * * * * The TransLATE statement will move the input record of SYSUT1 to the * * output record of SYSUT2 and then translate the output record of * * SYSUT2 from EBCDIC to ASCII based on the parameter specified in the * * TransMODE Statement (E2A). * *********************************************************************** /DIALECT C2 /PROGID ZAP001C1 /SYSUT1 org=SEQUENTIAL recfm=FIXED rlen=80 /SYSUT2 org=ASCII/CRLF recfm=VARIABLE rlen=80 * /TRANSMODE E2A /TRANSLATE from POS 1 LEN 80 to POS 1 LEN 80 * /END
The following is a description of the statements (or record types) contained in the control file (SYSCNTL).
| The following keyword/parameters are used for file and translate definitions. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|