SIMOZAPS, a Utility File Convert, Compare or Hex-View |
The SimoTime Home Page |
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 System, an Application Server, a Windows System, a UNIX System or a Linux System. 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, UNIX, Linux or Mainframe System.
SimoZAPS is a collection of utility programs that are designed to fill this niche. SimoZAPS provides the following capabilities.
| ||||||||||||||||||||
Overview of Functions provided by SIMOZAPS |
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.
| ||||||
Advantages of Generated COBOL Code for Data File Conversion or Comparison |
We have made a significant effort to ensure the documents and software technologies are correct and accurate. We reserve the right to make changes without notice at any time. The function delivered in this version is based upon the enhancement requests from a specific group of users. The intent is to provide changes as the need arises and in a timeframe that is dependent upon the availability of resources.
Copyright © 1987-2019
SimoTime Technologies and Services
All Rights Reserved
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.
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.
| ||||||||||||||||||||||
Hexadecimal File Access - HEXCESS |
The following three procedures will demonstrate the uses of the View, Find and Patch functions of SimoZAPS.
The following command 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 * IVP4HEX1.CMD - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * 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 run 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. start notepad syslog.txt echo * IVP4HEX1 Thank you for using HEXCESS by SimoTime Technologies
Refer to the HEXCESS, Example of a Simple Hex-View section of this document for a more detailed description of the preceding process.
The following command 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 * IVP4HEX2.CMD - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * 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 run 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. start notepad syslog.txt echo * IVP4HEX2 Thank you for using HEXCESS by SimoTime Technologies
Refer to the HEXCESS, Example of the FIND Function section of this document for a more detailed description of the preceding process.
The following command 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 * IVP4HEX3.CMD - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * 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 run 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 Technologies
Refer to the HEXCESS, Example of the PATCH Function section of this document 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 GENERATE function will generate (or create) the source code for a program that will do a file conversion. The following five 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, Generate a Data File Conversion Program section of this document for a more detailed description of the preceding process.
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 the Data File Conversion, EBCDIC Sequential to ASCI I Text section of this document 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
Note: This program is intended for use when populating a new, empty file. The access mode is sequential and the input file must be in sequence according to the key field.
Refer to the Data File Conversion, EBCDIC Sequential to ASCI I Indexed (Sequential-Add) section of this document 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 the Data File Conversion, EBCDIC Sequential to ASCII Sequential section of this document 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 the Data File Conversion, ASCII Text to EBCDIC Indexed (Sequential-Add) section of this document 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 the Data File Conversion, ASCII Text to EBCDIC Indexed (Random-Add) section of this document 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, Generate a Data File Comparison Program section of this document for a more detailed description of the preceding process.
C:\SIMOLIBR> IVPZFCG1
The following is the Window's Command file (IVPZFCG1.cmd) that executes the IVP.
@echo OFF rem * ******************************************************************* rem * IVPZFCG1.CMD - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* 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%" 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 Technologies pause rem * :End
The following command (IVP4ZAP1.cmd) will run the MODIFY function to verify that SimoZAPS is installed and working. This IVP will do a "search and replace" function.
C:\SIMOLIBR> IVP4ZAP1
Refer to The MODIFY Function, Changing a Text String section of this document 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. This IVP will do case conversion on a list of file names.
C:\SIMOLIBR> IVP4ZAP2
Refer to The MODIFY Function, Member Names in Lower Case section of this document 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 Format a COBOL Program for Case Consistency section of this document 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.
| ||||||||||||||||
Brief Description of the Five Function provided by SIMOZAPS |
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 (HEXDUMP). When possible the EBCDIC and ASCII characters are displayed. The HEXDUMP 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:\> run SIMOZAPS HEXCESS filename Keyword=parameter . . . VIEW=start-position STOP=stop-position DUMP=BOTH DUMP=FILE DUMP=SHOW FIND=start-position LENGTH=nnn ASCII=xxx EBCDIC=xxxx HEX=xxxx PATCH=start-position LENGTH=nnn ASCII=xxx EBCDIC=xxxx HEX=xxxx
The following is a summary of the keyword=parameters capabilities provided by SimoZAPS and the HEXCESS function.
Run | Function | filename | keyword=parameter keyword=parameter etc... | |||||||||
SIMOZAPS | HEXCESS | filename |
|
|||||||||
SIMOZAPS | HEXCESS | filename |
|
|||||||||
SIMOZAPS | HEXCESS | filename |
|
HEXCESS includes three installation verification procedures (IVP's) that also serve as examples.
The following command (IVP4HEX1.cmd) 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 command file.
@echo OFF rem * ******************************************************************* rem * IVP4HEX1.CMD - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * 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 run 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. start notepad syslog.txt echo * IVP4HEX1 Thank you for using HEXCESS by SimoTime Technologies
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.CMD does a find and dump when a match is found. The match process is not case sensitive. 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 command (IVP4HEX2.cmd) shows the content of the command file.
@echo OFF rem * ******************************************************************* rem * IVP4HEX2.CMD - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * 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 run 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. start notepad syslog.txt echo * IVP4HEX2 Thank you for using HEXCESS by SimoTime Technologies
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 following command (IVP4HEX3.cmd) 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.
@echo OFF rem * ******************************************************************* rem * IVP4HEX3.CMD - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * 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 run 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 Technologies
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 rem * ******************************************************************* rem * ZAPSHEX1.CMD - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2018 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * rem * Text - Provide a single point to set common environment variables. rem * Author - SimoTime Technologies rem * Date - January 24, 1996 rem * rem * Set the commonly used environment variables. This is used to provide rem * a single point for managing the commonly used environment variables. rem * set JobStatus=0000 if "%SimoLIBR%" == "" set SimoLIBR=c:\SimoLIBR set SYSLOG=%SimoLIBR%\LOGS\ZapsDump.LOG set ZapsView=1 set ZapsStop=20480 if not "%2" == "" set ZapsView=%2 if not "%3" == "" set ZapsStop=%3 rem * call SimoNote "************************************************************ZapsHex1" call SimoNote "Starting JobName ZapsHex1, User is %USERNAME%" rem * if exist %SYSLOG% erase %SYSLOG% run simozaps hexcess %1 view=%zapsview% stop=%zapsstop% 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" if not "%4" == "nopause" pause goto :End :EojNOK call SimoNote "ABENDING JobName ZapsHex1" call SimoNote "ABENDING Message JobStatus %JobStatus%" pause goto :End :End
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 ZAPS4HEX1 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.LOG file. 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 comparison. This COBOL source code may be compiled and executed on a Mainframe System (z/OS or VSE) or a Linux, UNIX or Windows System with 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).
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Generate a Data File Conversion Program |
The following (IVP4GFC1.cmd) is an example of a batch file that will generate the source code for a file conversion program.
@echo OFF set UtlName=IVP4GFC1 rem * ******************************************************************* rem * IVP4GFC1.cmd - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * This 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 setlocal call EZMFPATH set SYSOUT=SYSOUT_%UtlName%.txt set JobStatus=0000 set SimoNote=c:\SimoLIBR\LOGS\SimoTIME.LOG call :PostNote "************************************************************%UtlName%" call :PostNote "Starting JobName %UtlName%, User is %USERNAME%" set SYSCNTL=SYSCNTL1.pcf set SYSMODEL=SYSMASK1.txt set SYSCOBOL=DATAWRK1\ZAP001C1.cbl call :PostNote "SYSCNTL is %SYSCNTL%" call :PostNote "SYSMODEL is %SYSMODEL%" call :PostNote "SYSCOBOL is %SYSCOBOL%" type %syscntl% run SIMOZAPS generate if ERRORLEVEL = 1 set JobStatus=0020 if not "%JobStatus%" == "0000" goto EojNok 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 * Ivp4Gfc1 %~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 ****************************************************************************** :EojNok call :PostNote "ABENDING JobName %UtlName%, Job Status is %JobStatus%..." goto :End :EojAok call :PostNote "Finished JobName %UtlName%, Job Status is %JobStatus%..." echo * %UtlName% SYSCOBOL source is displayed in a separate window using NotePAD. echo * %UtlName% Thank you for using the GENERATE function by SimoTime Technologies if "%1" == "NOSHOW" goto :End start notepad %syscobol% goto :End :End pause
The following (SYSCNTL1.pcf) is an example of a SYSCNTL file (also referred to as a Process Control File or PCF).
*********************************************************************** * SYSCNTL1.pcf - Process Control File, Input Specifications * * This is an example of the convert specifications to generate a * * Data File Conversion Program. This is used by SimoZAPS * * SimoTime Technologies * * (C) Copyright 1987-2019 All Rights Reserved * * Web Site URL: http://www.simotime.com * * e-mail: helpdesk@simotime.com * *********************************************************************** * 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 *HEAD34 ....:....1....:....2....:....3.... /HEAD34 EBC to ASC, Sequential to Text /PROGID ZAP001C1 /SYSUT1 name=ZAP001D1 org=SEQUENTIAL recfm=FIXED rlen=80 /SYSUT2 name=ZAP001D2 org=ASCII/CRLF recfm=VARIABLE rlen=80 * /TRANSMODE E2A /TRANSINIT X'20' /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) that is ued to generate a Data File Convert Program.
The following keyword/parameters are used for file and translate definitions. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The following keyword/parameters are used for data transfer/manipulation within a record. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The following command member (ASCEBCB1.cpy) is the source code (or COBOL copy file) for the ASCII - EBCDIC conversion tables.
***************************************************************** * AE9437B1.cpy - a COBOL Copy File * * Copyright (C) 1987-2018 SimoTime Technologies * * All Rights Reserved * * Provided by SimoTime Technologies * * Our e-mail address is: helpdesk@simotime.com * * Also, visit our Web Site at http://www.simotime.com * ***************************************************************** * The following tables are used by the INSPECT statement to do * * the conversion between EBCDIC and ASCII. * * * * inspect FIELD-NAME converting EBCDIC-INFO to ASCII-INFO * * inspect FIELD-NAME converting ASCII-INFO to EBCDIC-INFO * * * * The tables include the alphabet for upper and lower case, the * * digits 0-9, the special characters (US) and the alternate * * codes for A, E, I, O, and U with the appropriate acute, * * grave, umlaut, circumflex and tilde. * * To display the alternate codes the Courier New (Fixed) or * * Times New Roman (Proportional) font should be used. * * * * SimoZAPS contains four tables that may be used for various * * Upper/Lower Case or EBCDIC/ASCII conversion requirements. * * ASCEBCB1.CPY - includes a full character set for the alphabet * * (upper/lower case), digit, special characters * * and alternate codes for characters with the * * acute, grave, umlaut, tilde and circumflex. * * Caution: this table does not convert the Y * * characters with an umlat. * * ASCEBCB2.CPY - includes the character set for the translation * * between EBCDIC/ASCII of signed/unsigned, * * zoned-decimal, numeric fields. * * ASCEBCB3.CPY - includes the character set for the alternate * * codes with the acute, grave, umlaut, tilde and * * circumflex. This is primarily used for case * * conversion. * * Note: this table converts the Y characters * * with an umlat, this will convert high-values * * X'FF' to X'DF' * * ASCEBCB4.CPY - includes the character set for the alphabet * * (upper/lower case), digit, special characters. * * This is primarily used in the US where the * * alternate codes may not be required. * * ASCEBCB5.CPY - includes a full character set for the alphabet * * (upper/lower case), digit, special characters * * and alternate codes for characters with the * * acute, grave, umlaut, tilde and circumflex. * * Caution: this table will convert the Y * * characters with an umlat. * ***************************************************************** * * ------------------------------------------------------------ 01 EBCDIC-DATA. 05 FILLER pic X(16) value X'000102030405060708090A0B0C0D0E0F'. 000-015 05 FILLER pic X(16) value X'101112131415161718191A1B1C1D1E1F'. 016-031 05 FILLER pic X(16) value X'202122232425262728292A2B2C2D2E2F'. 032-047 05 FILLER pic X(16) value X'303132333435363738393A3B3C3D3E3F'. 048-063 05 FILLER pic X(16) value X'404142434445464748494A4B4C4D4E4F'. 064-079 05 FILLER pic X(16) value X'505152535455565758595A5B5C5D5E5F'. 080=095 05 FILLER pic X(16) value X'606162636465666768696A6B6C6D6E6F'. 096-111 05 FILLER pic X(16) value X'707172737475767778797A7B7C7D7E7F'. 112-127 05 FILLER pic X(16) value X'808182838485868788898A8B8C8D8E8F'. 128-143 05 FILLER pic X(16) value X'909192939495969798999A9B9C9D9E9F'. 144-159 05 FILLER pic X(16) value X'A0A1A2A3A4A5A6A7A8A9AAABACADAEAF'. 160-175 05 FILLER pic X(16) value X'B0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF'. 176-191 05 FILLER pic X(16) value X'C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF'. 192-207 05 FILLER pic X(16) value X'D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF'. 208-223 05 FILLER pic X(16) value X'E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF'. 224-239 05 FILLER pic X(16) value X'F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF'. 240-255 01 E-INFO redefines EBCDIC-DATA pic X(256). 01 EBCDIC-TABLE redefines EBCDIC-DATA. 05 EBCDIC-BYTE pic X occurs 256 times. * * ------------------------------------------------------------ 01 ASCII-DATA. 05 FILLER pic X(16) value X'000102039C09867F978D8E0B0C0D0E0F'. 000-015 05 FILLER pic X(16) value X'101112139D8508871819928F1C1D1E1F'. 016-031 05 FILLER pic X(16) value X'80818283840A171B88898A8B8C050607'. 032-047 05 FILLER pic X(16) value X'909116939495960498999A9B14159E1A'. 048-063 05 FILLER pic X(16) value X'20A0E2E4E0E1E3E5E7F1A22E3C282B7C'. 064-079 05 FILLER pic X(16) value X'26E9EAEBE8EDEEEFECDF21242A293BAC'. 080=095 05 FILLER pic X(16) value X'2D2FC2C4C0C1C3C5C7D1A62C255F3E3F'. 096-111 05 FILLER pic X(16) value X'F8C9CACBC8CDCECFCC603A2340273D22'. 112-127 05 FILLER pic X(16) value X'D8616263646566676869ABBBF0FDFEB1'. 128-143 05 FILLER pic X(16) value X'B06A6B6C6D6E6F707172AABAE6B8C6A4'. 144-159 05 FILLER pic X(16) value X'B57E737475767778797AA1BFD0DDDEAE'. 160-175 05 FILLER pic X(16) value X'5EA3A5B7A9A7B6BCBDBE5B5DAFA8B4D7'. 176-191 05 FILLER pic X(16) value X'7B414243444546474849ADF4F6F2F3F5'. 192-207 05 FILLER pic X(16) value X'7D4A4B4C4D4E4F505152B9FBFCF9FAFF'. 208-223 05 FILLER pic X(16) value X'5CF7535455565758595AB2D4D6D2D3D5'. 224-239 05 FILLER pic X(16) value X'30313233343536373839B3DBDCD9DAFF'. 240-255 01 A-INFO redefines ASCII-DATA pic X(256). 01 ASCII-TABLE redefines ASCII-DATA. 05 ASCII-BYTE pic X occurs 256 times. * *** AE0437B1 - End-of-Copy File - - - - - - - - - - - AE0437B1 * ***************************************************************** *
The GENERATE Function includes two COBOL source code templates or masks. The first mask (SYSMASK1.TXT} provides the COBOL source code for sequential processing and should be used when the SYSCOBOL or output file is not an indexed file or when the output is an indexed file and the records are written sequentially by key.
The second mask file (SYSMASK2.TXT) should be used when the output file will be an indexed file and the records are written and the keys may not be in sequential order.
The format of the records in the mask file are as follows.
| ||||||||
The Format of the Records in the Mask (or Template) File |
Columns 1-6 of each record within each of the records in the SYSMASK file should be spaces or a valid keyword. If Columns 1-6 contains a valid keyword then the statement is processed according to the keyword. Otherwise, the statement is simply copied from the SYSMASK file to the SYSCOBOL file.
The following (SYSMASK1.txt) is the source code for the mask that does sequential output.
***************************************************************** * This program was created with the SYSMASK1.TXT file as input. * * The SYSMASK1 provides for the sequential reading of the input * * file and the sequential writing of the output file. * * * * If the output file is indexed then the input file must be in * * sequence by the field that will be used to provide the key * * for the output file. This is a sequential load process. * * * * If the key field is not in sequence then refer to SYSMASK2 * * to provide for a random add or update of the indexed file. * * * * This program mask will have the ASCII/EBCDIC table inserted * * for use by the /TRANSLATE function of SimoZAPS. * * * * For more information or questions please contact SimoTime * * Technologies. The version control number is 16.01.01 * * * * Our e-mail address is: helpdesk@simotime.com * * Also, visit our Web Site at http://www.simotime.com * ***************************************************************** WORKING-STORAGE SECTION. 01 SIM-TITLE. PROGID 05 T1 pic X(11) value '* &&&&&&&& '. HEAD34 05 T2 pic X(34) value '&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'. 05 T3 pic X(10) value ' v16.01.01'. 05 T4 pic X(24) value ' helpdesk@simotime.com'. 01 SIM-COPYRIGHT. PROGID 05 C1 pic X(11) value '* &&&&&&&& '. 05 C2 pic X(32) value 'This Data File Convert Member wa'. 05 C3 pic X(32) value 's generated by SimoTime Technolo'. 05 C4 pic X(04) value 'gies'. 01 SYSUT1-STATUS. 05 SYSUT1-STATUS-L pic X. 05 SYSUT1-STATUS-R pic X. 01 SYSUT1-EOF pic X value 'N'. 01 SYSUT1-OPEN-FLAG pic X value 'C'. RRDS01 01 SYSUT1-RELATIVE-KEY pic 9(9) value 0. 01 SYSUT2-STATUS. 05 SYSUT2-STATUS-L pic X. 05 SYSUT2-STATUS-R pic X. 01 SYSUT2-EOF pic X value 'N'. 01 SYSUT2-OPEN-FLAG pic X value 'C'. RRDS02 01 SYSUT2-RELATIVE-KEY pic 9(9) value 0. RLEN1 01 SYSUT1-LRECL pic 9(5) value &&&&&. RLEN2 01 SYSUT2-LRECL pic 9(5) value &&&&&. RLEN1 01 SYSUT1-LRECL-MAX pic 9(5) value &&&&&. ***************************************************************** * The following buffers are used to create a four-byte status * * code that may be displayed. * ***************************************************************** 01 IO-STATUS. 05 IO-STAT1 pic X. 05 IO-STAT2 pic X. 01 IO-STATUS-04. 05 IO-STATUS-0401 pic 9 value 0. 05 IO-STATUS-0403 pic 999 value 0. 01 TWO-BYTES-BINARY pic 9(4) BINARY. 01 TWO-BYTES-ALPHA redefines TWO-BYTES-BINARY. 05 TWO-BYTES-LEFT pic X. 05 TWO-BYTES-RIGHT pic X. ***************************************************************** * Message Buffer used by the Z-DISPLAY-MESSAGE-TEXT routine. * ***************************************************************** 01 MESSAGE-BUFFER. PROGID 05 MESSAGE-HEADER pic X(11) value '* &&&&&&&& '. 05 MESSAGE-TEXT. 10 MESSAGE-TEXT-1 pic X(68) value SPACES. 10 MESSAGE-TEXT-2 pic X(188) value SPACES. ***************************************************************** PROGID 01 PROGRAM-NAME pic X(8) value '&&&&&&&&'. 01 INFO-STATEMENT. 05 INFO-SHORT. 10 INFO-ID pic X(8) value 'Starting'. 10 filler pic X(2) value ', '. 10 filler pic X(34) HEAD34 value '&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'. 05 filler pic X(24) value ' http://www.SimoTime.com'. 01 APPL-RESULT pic S9(9) comp. 88 APPL-AOK value 0. 88 APPL-EOF value 16. 01 WRITE-FLAG pic X value 'Y'. 01 SYSUT1-TOTAL. 05 SYSUT1-RDR pic 9(9) value 0. 05 filler pic X(3) value ' - '. SYSUT1 05 filler pic X(23) value 'Line count for &&&&&&&&'. 01 SYSUT2-TOTAL. 05 SYSUT2-ADD pic 9(9) value 0. 05 filler pic X(3) value ' - '. SYSUT2 05 filler pic X(23) value 'Line count for &&&&&&&&'. TABAE * This statement will be replaced by SimoZAPS. USRDEF* This statement will be replaced by User Definitions. ZADDWS* This statement will be replaced by User Definitions. ***************************************************************** PROCEDURE DIVISION. move all '*' to MESSAGE-TEXT-1 perform Z-DISPLAY-MESSAGE-TEXT move INFO-STATEMENT to MESSAGE-TEXT-1 perform Z-DISPLAY-MESSAGE-TEXT move all '*' to MESSAGE-TEXT-1 perform Z-DISPLAY-MESSAGE-TEXT perform Z-POST-COPYRIGHT perform SYSUT1-OPEN perform SYSUT2-OPEN perform until SYSUT1-STATUS not = '00' perform SYSUT1-READ if SYSUT1-STATUS = '00' add 1 to SYSUT1-RDR perform BUILD-OUTPUT-RECORD if WRITE-FLAG = 'Y' perform SYSUT2-WRITE if SYSUT2-STATUS = '00' add 1 to SYSUT2-ADD end-if end-if end-if end-perform USREOJ* This statement will be replaced by User Logic for EOJ move SYSUT1-TOTAL to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move SYSUT2-TOTAL to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT if APPL-EOF move 'Complete' to INFO-ID else move 'ABENDING' to INFO-ID end-if move INFO-STATEMENT to MESSAGE-TEXT(1:79) perform Z-DISPLAY-MESSAGE-TEXT perform SYSUT2-CLOSE perform SYSUT1-CLOSE GOBACK. CNVRT * This statement will be replaced by SimoZAPS. ***************************************************************** * I/O Routines for the INPUT File... * ***************************************************************** SYSUT1-CLOSE. add 8 to ZERO giving APPL-RESULT. close SYSUT1-FILE if SYSUT1-STATUS = '00' subtract APPL-RESULT from APPL-RESULT else add 12 to ZERO giving APPL-RESULT end-if if APPL-AOK CONTINUE else SYSUT1 move 'CLOSE Failure with &&&&&&&&' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move SYSUT1-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. *---------------------------------------------------------------* SYSUT1-READ. read SYSUT1-FILE if SYSUT1-STATUS = '00' subtract APPL-RESULT from APPL-RESULT else if SYSUT1-STATUS = '10' add 16 to ZERO giving APPL-RESULT else add 12 to ZERO giving APPL-RESULT end-if end-if if APPL-AOK CONTINUE else if APPL-EOF move 'Y' to SYSUT1-EOF else SYSUT1 move 'READ Failure with &&&&&&&&' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move SYSUT1-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if end-if exit. *---------------------------------------------------------------* SYSUT1-OPEN. add 8 to ZERO giving APPL-RESULT. open input SYSUT1-FILE if SYSUT1-STATUS = '00' subtract APPL-RESULT from APPL-RESULT move 'O' to SYSUT1-OPEN-FLAG else add 12 to ZERO giving APPL-RESULT end-if if APPL-AOK CONTINUE else SYSUT1 move 'OPEN Failure with &&&&&&&&' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move SYSUT1-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. ***************************************************************** * I/O Routines for the OUTPUT File... * ***************************************************************** SYSUT2-WRITE. if SYSUT2-OPEN-FLAG = 'C' perform SYSUT2-OPEN end-if write SYSUT2-REC if SYSUT2-STATUS = '00' subtract APPL-RESULT from APPL-RESULT else if SYSUT2-STATUS = '10' add 16 to ZERO giving APPL-RESULT else add 12 to ZERO giving APPL-RESULT end-if end-if. if APPL-AOK CONTINUE else SYSUT2 move 'WRITE Failure with &&&&&&&&' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move SYSUT2-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. *---------------------------------------------------------------* SYSUT2-OPEN. add 8 to ZERO giving APPL-RESULT. OPEN2 open &&&&&& SYSUT2-FILE if SYSUT2-STATUS = '00' subtract APPL-RESULT from APPL-RESULT move 'O' to SYSUT2-OPEN-FLAG else add 12 to ZERO giving APPL-RESULT end-if if APPL-AOK CONTINUE else SYSUT2 move 'OPEN Failure with &&&&&&&&' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move SYSUT2-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. *---------------------------------------------------------------* SYSUT2-CLOSE. add 8 to ZERO giving APPL-RESULT. close SYSUT2-FILE if SYSUT2-STATUS = '00' subtract APPL-RESULT from APPL-RESULT move 'C' to SYSUT2-OPEN-FLAG else add 12 to ZERO giving APPL-RESULT end-if if APPL-AOK CONTINUE else SYSUT2 move 'CLOSE Failure with &&&&&&&&' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move SYSUT2-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. ***************************************************************** * The following Z-ROUTINES provide administrative functions * * for this program. * ***************************************************************** * ABEND the program, post a message to the console and issue * * a STOP RUN. * ***************************************************************** Z-ABEND-PROGRAM. if MESSAGE-TEXT not = SPACES perform Z-DISPLAY-MESSAGE-TEXT end-if move 'PROGRAM-IS-ABENDING...' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT add 12 to ZERO giving RETURN-CODE STOP RUN. * exit. ***************************************************************** * Display CONSOLE messages... * ***************************************************************** Z-DISPLAY-MESSAGE-TEXT. if MESSAGE-TEXT-2 = SPACES display MESSAGE-BUFFER(1:79) else display MESSAGE-BUFFER end-if move all SPACES to MESSAGE-TEXT exit. ***************************************************************** * Display the file status bytes. This routine will display as * * four digits. If the full two byte file status is numeric it * * will display as 00nn. If the 1st byte is a numeric nine (9) * * the second byte will be treated as a binary number and will * * display as 9nnn. * ***************************************************************** Z-DISPLAY-IO-STATUS. if IO-STATUS not NUMERIC or IO-STAT1 = '9' move IO-STAT1 to IO-STATUS-04(1:1) subtract TWO-BYTES-BINARY from TWO-BYTES-BINARY move IO-STAT2 to TWO-BYTES-RIGHT add TWO-BYTES-BINARY to ZERO giving IO-STATUS-0403 move 'File Status is: nnnn' to MESSAGE-TEXT move IO-STATUS-04 to MESSAGE-TEXT(17:4) perform Z-DISPLAY-MESSAGE-TEXT else move '0000' to IO-STATUS-04 move IO-STATUS to IO-STATUS-04(3:2) move 'File Status is: nnnn' to MESSAGE-TEXT move IO-STATUS-04 to MESSAGE-TEXT(17:4) perform Z-DISPLAY-MESSAGE-TEXT end-if exit. ***************************************************************** Z-POST-COPYRIGHT. display SIM-TITLE display SIM-COPYRIGHT exit.
The following (SYSMASK2.txt) is the mask that does output to an indexed file when the keys are not in sequence. This code will do an add of new records and an update of existing records.
***************************************************************** * This program was created with the SYSMASK2.TXT file as input. * * * * The SYSMASK2 provides for the sequential reading of the input * * file and the random writing of the output file. * * * * If the output file is indexed then the input file does not * * need to be in sequence by the field that will be used to * * provide the key for the output file. This is a random add or * * update process. * * * * New records will be added and existing records will be * * updated. If duplicate keys are provided from the input file * * then only the information from the last duplicate key record * * of the input file will be reflected in the output file. * * * * This program mask will have the ASCII/EBCDIC table inserted * * for use by the /TRANSLATE function of SimoZAPS. * * * * For more information or questions please contact SimoTime * * Technologies. The version control number is 16.01.01 * * * * Our e-mail address is: helpdesk@simotime.com * * Also, visit our Web Site at http://www.simotime.com * ***************************************************************** WORKING-STORAGE SECTION. 01 SIM-TITLE. PROGID 05 T1 pic X(11) value '* &&&&&&&& '. HEAD34 05 T2 pic X(34) value '&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'. 05 T3 pic X(10) value ' v16.01.01'. 05 T4 pic X(24) value ' helpdesk@simotime.com'. 01 SIM-COPYRIGHT. PROGID 05 C1 pic X(11) value '* &&&&&&&& '. 05 C2 pic X(32) value 'This Data File Convert Member wa'. 05 C3 pic X(32) value 's generated by SimoTime Technolo'. 05 C4 pic X(04) value 'gies'. 01 SYSUT1-STATUS. 05 SYSUT1-STATUS-L pic X. 05 SYSUT1-STATUS-R pic X. 01 SYSUT1-EOF pic X value 'N'. 01 SYSUT1-OPEN-FLAG pic X value 'C'. 01 SYSUT1-RECORD-FOUND pic X value 'N'. RRDS01 01 SYSUT1-RELATIVE-KEY pic 9(9) value 0. 01 SYSUT2-STATUS. 05 SYSUT2-STATUS-L pic X. 05 SYSUT2-STATUS-R pic X. 01 SYSUT2-EOF pic X value 'N'. 01 SYSUT2-OPEN-FLAG pic X value 'C'. 01 SYSUT2-RECORD-FOUND pic X value 'N'. RRDS02 01 SYSUT2-RELATIVE-KEY pic 9(9) value 0. RLEN1 01 SYSUT1-LRECL pic 9(5) value &&&&&. RLEN2 01 SYSUT2-LRECL pic 9(5) value &&&&&. ***************************************************************** * The following buffers are used to create a four-byte status * * code that may be displayed. * ***************************************************************** 01 IO-STATUS. 05 IO-STAT1 pic X. 05 IO-STAT2 pic X. 01 IO-STATUS-04. 05 IO-STATUS-0401 pic 9 value 0. 05 IO-STATUS-0403 pic 999 value 0. 01 TWO-BYTES-BINARY pic 9(4) BINARY. 01 TWO-BYTES-ALPHA redefines TWO-BYTES-BINARY. 05 TWO-BYTES-LEFT pic X. 05 TWO-BYTES-RIGHT pic X. ***************************************************************** * Message Buffer used by the Z-DISPLAY-MESSAGE-TEXT routine. * ***************************************************************** 01 MESSAGE-BUFFER. PROGID 05 MESSAGE-HEADER pic X(11) value '* &&&&&&&& '. 05 MESSAGE-TEXT. 10 MESSAGE-TEXT-1 pic X(68) value SPACES. 10 MESSAGE-TEXT-2 pic X(188) value SPACES. ***************************************************************** 01 INFO-STATEMENT. 05 INFO-SHORT. 10 INFO-ID pic X(8) value 'Starting'. 10 filler pic X(2) value ', '. 10 filler pic X(34) HEAD34 value '&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'. 05 filler pic X(24) value ' http://www.SimoTime.com'. 01 APPL-RESULT pic S9(9) comp. 88 APPL-AOK value 0. 88 APPL-EOF value 16. 01 SYSUT1-TOTAL. 05 SYSUT1-RDR pic 9(9) value 0. 05 filler pic X(3) value ' - '. SYSUT1 05 filler pic X(23) value 'Read count for &&&&&&&&'. 01 SYSUT2-TOTAL-ADDS. 05 SYSUT2-ADD pic 9(9) value 0. 05 filler pic X(3) value ' - '. SYSUT2 05 filler pic X(17) value 'Adds for &&&&&&&&'. 01 SYSUT2-TOTAL-UPDATES. 05 SYSUT2-UPD pic 9(9) value 0. 05 filler pic X(3) value ' - '. SYSUT2 05 filler pic X(20) value 'Updates for &&&&&&&&'. TABAE * This statement will be replaced by SimoZAPS. ***************************************************************** PROCEDURE DIVISION. move all '*' to MESSAGE-TEXT-1 perform Z-DISPLAY-MESSAGE-TEXT move INFO-STATEMENT to MESSAGE-TEXT-1 perform Z-DISPLAY-MESSAGE-TEXT move all '*' to MESSAGE-TEXT-1 perform Z-DISPLAY-MESSAGE-TEXT perform Z-POST-COPYRIGHT perform SYSUT1-OPEN perform SYSUT2-OPEN perform UNTIL SYSUT1-EOF = 'Y' if SYSUT1-EOF = 'N' perform SYSUT1-READ if SYSUT1-EOF = 'N' add 1 to SYSUT1-RDR perform BUILD-OUTPUT-RECORD perform SYSUT2-READ perform BUILD-OUTPUT-RECORD if SYSUT2-RECORD-FOUND = 'Y' add 1 to SYSUT2-UPD perform SYSUT2-REWRITE else add 1 to SYSUT2-ADD perform SYSUT2-WRITE end-if end-if end-if end-perform. move SYSUT1-TOTAL to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move SYSUT2-TOTAL-ADDS to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move SYSUT2-TOTAL-UPDATES to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT if APPL-EOF move 'is Complete...' to MESSAGE-TEXT else move 'is ABENDING...' to MESSAGE-TEXT end-if perform Z-DISPLAY-MESSAGE-TEXT perform SYSUT2-CLOSE perform SYSUT1-CLOSE GOBACK. CNVRT * This statement will be replaced by SimoZAPS... ***************************************************************** * I/O Routines for the INPUT File... * ***************************************************************** SYSUT1-CLOSE. add 8 to ZERO giving APPL-RESULT. close SYSUT1-FILE if SYSUT1-STATUS = '00' subtract APPL-RESULT from APPL-RESULT else add 12 to ZERO giving APPL-RESULT end-if if APPL-AOK CONTINUE else SYSUT1 move 'CLOSE Failure with &&&&&&&&' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move SYSUT1-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. *---------------------------------------------------------------* SYSUT1-READ. read SYSUT1-FILE if SYSUT1-STATUS = '00' subtract APPL-RESULT from APPL-RESULT else if SYSUT1-STATUS = '10' add 16 to ZERO giving APPL-RESULT else add 12 to ZERO giving APPL-RESULT end-if end-if if APPL-AOK CONTINUE else if APPL-EOF move 'Y' to SYSUT1-EOF else SYSUT1 move 'READ Failure with &&&&&&&&' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move SYSUT1-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if end-if exit. *---------------------------------------------------------------* SYSUT1-OPEN. add 8 to ZERO giving APPL-RESULT. open input SYSUT1-FILE if SYSUT1-STATUS = '00' subtract APPL-RESULT from APPL-RESULT move 'O' to SYSUT1-OPEN-FLAG else add 12 to ZERO giving APPL-RESULT end-if if APPL-AOK CONTINUE else SYSUT1 move 'OPEN Failure with &&&&&&&&' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move SYSUT1-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. ***************************************************************** * I/O Routines for the OUTPUT File... * ***************************************************************** SYSUT2-WRITE. if SYSUT2-OPEN-FLAG = 'C' perform SYSUT2-OPEN end-if write SYSUT2-REC if SYSUT2-STATUS = '00' subtract APPL-RESULT from APPL-RESULT else if SYSUT2-STATUS = '10' add 16 to ZERO giving APPL-RESULT else add 12 to ZERO giving APPL-RESULT end-if end-if. if APPL-AOK CONTINUE else SYSUT2 move 'WRITE Failure with &&&&&&&&' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move SYSUT2-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. *---------------------------------------------------------------* SYSUT2-REWRITE. if SYSUT2-OPEN-FLAG = 'C' perform SYSUT2-OPEN end-if rewrite SYSUT2-REC if SYSUT2-STATUS = '00' subtract APPL-RESULT from APPL-RESULT else if SYSUT2-STATUS = '10' add 16 to ZERO giving APPL-RESULT else add 12 to ZERO giving APPL-RESULT end-if end-if. if APPL-AOK CONTINUE else SYSUT2 move 'REWRITE Failure with &&&&&&&&' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move SYSUT2-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. *---------------------------------------------------------------* SYSUT2-OPEN. add 8 to ZERO giving APPL-RESULT. open I-O SYSUT2-FILE if SYSUT2-STATUS = '00' subtract APPL-RESULT from APPL-RESULT move 'O' to SYSUT2-OPEN-FLAG else add 12 to ZERO giving APPL-RESULT end-if if APPL-AOK CONTINUE else SYSUT2 move 'OPEN Failure with &&&&&&&&' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move SYSUT2-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. *---------------------------------------------------------------* SYSUT2-READ. move 'N' to SYSUT2-RECORD-FOUND move 'N' to SYSUT2-EOF add 12 to ZERO giving APPL-RESULT read SYSUT2-FILE evaluate SYSUT2-STATUS when '00' move 'Y' to SYSUT2-RECORD-FOUND subtract APPL-RESULT from APPL-RESULT when '23' move 'N' to SYSUT2-RECORD-FOUND subtract APPL-RESULT from APPL-RESULT when '10' move 'N' to SYSUT2-RECORD-FOUND move 'Y' to SYSUT2-EOF subtract APPL-RESULT from APPL-RESULT end-evaluate. if APPL-AOK CONTINUE else SYSUT2 move 'READ Failure with &&&&&&&&' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move SYSUT2-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. *---------------------------------------------------------------* SYSUT2-CLOSE. add 8 to ZERO giving APPL-RESULT. close SYSUT2-FILE if SYSUT2-STATUS = '00' subtract APPL-RESULT from APPL-RESULT move 'C' to SYSUT2-OPEN-FLAG else add 12 to ZERO giving APPL-RESULT end-if if APPL-AOK CONTINUE else SYSUT2 move 'CLOSE Failure with &&&&&&&&' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move SYSUT2-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. ***************************************************************** * The following Z-ROUTINES provide administrative functions * * for this program. * ***************************************************************** * ABEND the program, post a message to the console and issue * * a STOP RUN. * ***************************************************************** Z-ABEND-PROGRAM. if MESSAGE-TEXT not = SPACES perform Z-DISPLAY-MESSAGE-TEXT end-if move 'PROGRAM-IS-ABENDING...' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT add 12 to ZERO giving RETURN-CODE STOP RUN. * exit. ***************************************************************** * Display CONSOLE messages... * ***************************************************************** Z-DISPLAY-MESSAGE-TEXT. if MESSAGE-TEXT-2 = SPACES display MESSAGE-BUFFER(1:79) else display MESSAGE-BUFFER end-if move all SPACES to MESSAGE-TEXT exit. ***************************************************************** * Display the file status bytes. This routine will display as * * four digits. If the full two byte file status is numeric it * * will display as 00nn. If the 1st byte is a numeric nine (9) * * the second byte will be treated as a binary number and will * * display as 9nnn. * ***************************************************************** Z-DISPLAY-IO-STATUS. if IO-STATUS not NUMERIC or IO-STAT1 = '9' move IO-STAT1 to IO-STATUS-04(1:1) subtract TWO-BYTES-BINARY from TWO-BYTES-BINARY move IO-STAT2 to TWO-BYTES-RIGHT add TWO-BYTES-BINARY to ZERO giving IO-STATUS-0403 move 'File Status is: nnnn' to MESSAGE-TEXT move IO-STATUS-04 to MESSAGE-TEXT(17:4) perform Z-DISPLAY-MESSAGE-TEXT else move '0000' to IO-STATUS-04 move IO-STATUS to IO-STATUS-04(3:2) move 'File Status is: nnnn' to MESSAGE-TEXT move IO-STATUS-04 to MESSAGE-TEXT(17:4) perform Z-DISPLAY-MESSAGE-TEXT end-if exit. ***************************************************************** Z-POST-COPYRIGHT. display SIM-TITLE display SIM-COPYRIGHT exit.
Consecutive access of a file will maintain the sequence of the physical records in a file. The file access (reads and writes) can be buffered or cached for faster processing. This is the preferred method of processing if the logical sequence of the output file is not dependent on a key field with an alpha-numeric format that is being converted between ASCII and EBCDIC encoding.
The following (IVP4GFC1.cmd) is the Windows Command file that is used to generate a program that read an EBCDIC Sequential file and creates an ASCII Text file.
@echo OFF set UtlName=IVP4GFC1 rem * ******************************************************************* rem * IVP4GFC1.cmd - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * This 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 setlocal call EZMFPATH set SYSOUT=SYSOUT_%UtlName%.txt set JobStatus=0000 set SimoNote=c:\SimoLIBR\LOGS\SimoTIME.LOG call :PostNote "************************************************************%UtlName%" call :PostNote "Starting JobName %UtlName%, User is %USERNAME%" set SYSCNTL=SYSCNTL1.pcf set SYSMODEL=SYSMASK1.txt set SYSCOBOL=DATAWRK1\ZAP001C1.cbl call :PostNote "SYSCNTL is %SYSCNTL%" call :PostNote "SYSMODEL is %SYSMODEL%" call :PostNote "SYSCOBOL is %SYSCOBOL%" type %syscntl% run SIMOZAPS generate if ERRORLEVEL = 1 set JobStatus=0020 if not "%JobStatus%" == "0000" goto EojNok 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 * Ivp4Gfc1 %~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 ****************************************************************************** :EojNok call :PostNote "ABENDING JobName %UtlName%, Job Status is %JobStatus%..." goto :End :EojAok call :PostNote "Finished JobName %UtlName%, Job Status is %JobStatus%..." echo * %UtlName% SYSCOBOL source is displayed in a separate window using NotePAD. echo * %UtlName% Thank you for using the GENERATE function by SimoTime Technologies if "%1" == "NOSHOW" goto :End start notepad %syscobol% goto :End :End pause
This example uses the following process control file (SYSCNTL1.pcf) to generate the COBOL source code that does the data file conversion.
*********************************************************************** * SYSCNTL1.pcf - Process Control File, Input Specifications * * This is an example of the convert specifications to generate a * * Data File Conversion Program. This is used by SimoZAPS * * SimoTime Technologies * * (C) Copyright 1987-2019 All Rights Reserved * * Web Site URL: http://www.simotime.com * * e-mail: helpdesk@simotime.com * *********************************************************************** * 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 *HEAD34 ....:....1....:....2....:....3.... /HEAD34 EBC to ASC, Sequential to Text /PROGID ZAP001C1 /SYSUT1 name=ZAP001D1 org=SEQUENTIAL recfm=FIXED rlen=80 /SYSUT2 name=ZAP001D2 org=ASCII/CRLF recfm=VARIABLE rlen=80 * /TRANSMODE E2A /TRANSINIT X'20' /TRANSLATE from POS 1 LEN 80 to POS 1 LEN 80 * /END
You may view the COBOL source code that is generated from the information in the control file (SYSCNTL1.pcf) and the mask file (SYSMASK1.TXT).
The following (IVP4GFC2.cmd) is the Windows Command file that is used to generate a program that reads an EBCDIC Sequential file and creates an ASCII Indexed file.
@echo OFF set UtlName=IVP4GFC2 rem * ******************************************************************* rem * IVP4GFC2.cmd - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * This process will read the SYSCNTL2.TXT file and create the rem * ZAP001C1.CBL file using the SYSMASK1.TXT as a mask. rem * The SYSCNTL2.TXT file is expected to contains the specifications rem * for reading a sequential, 80-byte, fixed, EBCDIC file and creating rem * an INDEXED, 256-byte maximum record length, variable, ASCII file rem * with the key position at 1 for a key length of 6. rem * echo * %UtlName% Starting the GENERATE function of SimoZAPS call EZMFPATH set SYSOUT=SYSOUT_%UtlName%.txt set SYSCNTL=SYSCNTL2.pcf set SYSMODEL=SYSMASK1.txt set SYSCOBOL=DATAWRK1\ZAP002C1.cbl type %syscntl% run simozaps GENERATE echo * %UtlName% SYSCOBOL is %syscobol% echo * %UtlName% SYSCNTL is %syscntl% echo * %UtlName% Finished the GENERATE function of SimoZAPS if "%1" == "NOSHOW" goto :End echo * %UtlName% SYSCOBOL source is displayed in a separate window using NotePAD. start notepad %syscobol% goto :End 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 * %UtlName% %~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 ****************************************************************************** :End echo * %UtlName% Thank you for using the GENERATE function by SimoTime Technologies pause
This example uses the following control file (SYSCNTL2.pcf) to generate the COBOL source code that does the data file conversion.
*********************************************************************** * SYSCNTL2.pcf - Process Control File, Input Specifications * * This is an example of the convert specifications to generate a * * Data File Conversion Program. This is used by SimoZAPS * * SimoTime Technologies * * (C) Copyright 1987-2019 All Rights Reserved * * Web Site URL: http://www.simotime.com * * e-mail: helpdesk@simotime.com * *********************************************************************** * SYSUT1 should be a sequential, 80-byte, fixed, ebcdic file. * * SYSUT2 should be an INDEXED, 256-byte, variable, ascii file * * with key position at 1 for a key length of 6. * * * * The DIALECT statement specifies the use of COBOL/2 compliant code * * for the generated conversion program. * * * * The TransINIT statement will initialize the SYSUT2 record to X'20' * * or an ASCII SPACE character. This is especially useful when the * * output record length for SYSUT2 is greater than the input record * * length of SYSUT1. The hex value is used since the generated program * * could run on the PC or the mainframe. * * * * The VSAMLOAD statement specifies a sequential load or add of * * records to the indexed (i.e VSAM KSDS) file. If the input records * * (from SYSUT1) do not provide records in sequence by the key then a * * write error will occur when an attempt is made to write the record * * to SYSUT2. The IVP4GFC5.BAT provides an example of an unordered or * * random load or update of a VSAM Keyed Sequential Data Set. * *********************************************************************** /Dialect C2 /VSAMload Sequential /progid ZAP002C1 /sysut1 name=ZAP002D1 org=sequential recfm=fixed rlen=80 /sysut2 name=ZAP002D2 org=indexed recfm=variable rlen=256 klen=6 kpos=1 * /transmode E2A /transinit X'20' /translate From pos 1 len 80 To pos 1 len 80 * /END
You may view the COBOL source code that is generated from the information in the control file (SYSCNTL2.pcf) and the mask file (SYSMASK1.TXT).
The following (IVP4GFC3.cmd) is the Windows Command file that is used to generate a program to read an EBCDIC Sequential file and create an ASCII Record Sequential file.
@echo OFF set UtlName=IVP4GFC3 rem * ******************************************************************* rem * IVP4GFC3.cmd - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * This process will read the SYSCNTL3.TXT file and create the rem * ZAP003C1.CBL file using the SYSMASK1.TXT as a mask. rem * The SYSCNTL3.TXT file is expected to contains the specifications rem * for reading a sequential, 80-byte, fixed, EBCDIC file and creating rem * a sequential, 80-byte, fixed, ascii file. rem * This example does a simple copy of an EBCDIC sequential file to an rem * ASCII sequential file of the same record length. rem * echo * %UtlName% Starting the GENERATE function of SimoZAPS call EZMFPATH set SYSOUT=SYSOUT_%UtlName%.txt set SYSCNTL=SYSCNTL3.pcf set SYSMODEL=SYSMASK1.txt set SYSCOBOL=DATAWRK1\ZAP003C1.cbl type %syscntl% run SIMOZAPS GENERATE echo * %UtlName% SYSCOBOL is %syscobol% echo * %UtlName% SYSCNTL is %syscntl% echo * %UtlName% Finished the GENERATE function of SimoZAPS if "%1" == "NOSHOW" goto :End echo * %UtlName% SYSCOBOL source is displayed in a separate window using NotePAD. start notepad %syscobol% :End echo * %UtlName% Thank you for using the GENERATE function by SimoTime Technologies pause
This example uses the following control file (SYSCNTL3.pcf) to generate the COBOL source code that does the data file conversion.
*********************************************************************** * SYSCNTL3.pcf - Process Control File, Input Specifications * * This is an example of the convert specifications to generate a * * Data File Conversion Program. This is used by SimoZAPS * * SimoTime Technologies * * (C) Copyright 1987-2019 All Rights Reserved * * Web Site URL: http://www.simotime.com * * e-mail: helpdesk@simotime.com * *********************************************************************** * SYSUT1 should be a sequential, 80-byte, fixed, ebcdic file. * * SYSUT2 should be a sequential, 80-byte, fixed, ascii file. * * This example does a simple copy of an EBCDIC sequential file to * * an ASCII sequential file of the same record length. * *********************************************************************** /DIALECT C2 /PROGID ZAP003C1 /SYSUT1 name=ZAP003D1 org=SEQUENTIAL recfm=FIXED rlen=80 block=800 /SYSUT2 name=ZAP003D2 org=SEQUENTIAL recfm=FIXED rlen=80 block=800 * /TRANSMODE E2A /TRANSINIT X'20' /TRANSLATE FROM pos 1 len 80 TO pos 1 len 80 * /END
You may view the COBOL source code that is generated from the information in the control file (SYSCNTL3.pcf) and the mask file (SYSMASK1.TXT).
The following (IVP4GFC4.cmd) is the Windows Command file that is used to generate a program to read an ASCII/Text file and create an ASCII Indexed file or Key-Sequenced-Data-Set (KSDS).
@echo OFF set UtlName=IVP4GFC4 rem * ******************************************************************* rem * IVP4GFC4.cmd - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * SYSUT1 should be a ASCII/CRLF, 80-byte, variable, ascii file. rem * SYSUT2 should be a indexed, 80-byte, variable, ebcdic file. rem * This example does a copy of an ASCII text file with carriage return rem * and line feed characters used as record separators to an indexed rem * file of EBCDIC records. The maximum record length is 80 and the key rem * position is one with a key length of 6. rem * echo * %UtlName% Starting the GENERATE function of SimoZAPS call EZMFPATH set SYSOUT=SYSOUT_%UtlName%.txt set SYSCNTL=SYSCNTL4.pcf set SYSMODEL=SYSMASK1.txt set SYSCOBOL=DATAWRK1\ZAP004C1.cbl type %syscntl% run SIMOZAPS GENERATE echo * %UtlName% SYSCOBOL is %syscobol% echo * %UtlName% SYSCNTL is %syscntl% echo * %UtlName% Finished the GENERATE function of SimoZAPS if "%1" == "NOSHOW" goto :End echo * %UtlName% SYSCOBOL source is displayed in a separate window using NotePAD. start notepad %syscobol% :End echo * %UtlName% Thank you for using the GENERATE function by SimoTime Technologies pause
This example uses the following control file (SYSCNTL4.pcf) to generate the COBOL source code that does the data file conversion.
*********************************************************************** * SYSCNTL4.pcf - Process Control File, Input Specifications * * This is an example of the convert specifications to generate a * * Data File Conversion Program. This is used by SimoZAPS * * SimoTime Technologies * * (C) Copyright 1987-2019 All Rights Reserved * * Web Site URL: http://www.simotime.com * * e-mail: helpdesk@simotime.com * *********************************************************************** * SYSUT1 should be a ASCII/CRLF, 80-byte, variable, ascii file. * * SYSUT2 should be a indexed, 80-byte, variable, ebcdic file. * * This example does a copy of an ASCII text file with carriage return * * and line feed characters used as record separators to an indexed * * file of EBCDIC records. The maximum record length is 80 and the key * * position is one with a key length of 6. * *********************************************************************** /DIALECT C2 /PROGID ZAP004C1 /SYSUT1 name=ZAP004D1 ORG=ASCII/CRLF RECFM=VARIABLE RLEN=80 /SYSUT2 name=ZAP004D2 ORG=INDEXED RECFM=VARIABLE RLEN=80 KPOS=1 KLEN=6 * /TRANSMODE A2E /TRANSINIT X'40' /TRANSLATE FROM POS 1 LEN 80 to POS 1 LEN 80 * /END
You may view the COBOL source code that is generated from the information in the control file (SYSCNTL4.pcf) and the mask file (SYSMASK1.TXT).
WIP
The following (IVP4GFC5.cmd) is the Windows Command file that is used to generate a program that will read an ASCII/Text file and access an existing ASCII Indexed file or Key-Sequenced-Data-Set (KSDS) to randomly add new records or update existing records.
@echo OFF rem * ******************************************************************* rem * IVP4GFC5.cmd - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * This process will read the SYSCNTL5.TXT file and create the rem * ZAP005C1.CBL file using the SYSMASK2.TXT as a mask. rem * The SYSCNTL5.TXT file is expected to contains the specifications rem * for reading a sequential, 80-byte, fixed, EBCDIC file and creating rem * an INDEXED, 256-byte maximum record length, variable, ASCII file rem * with the key position at 1 for a key length of 6. This program rem * will do an unordered or random add to the Indexed file. The keys rem * do not need to be in sequence. rem * set UtlName=IVP4GFC5 echo * %UtlName% Starting the GENERATE function of SimoZAPS call EZMFPATH set SYSOUT=SYSOUT_%UtlName%.txt set SYSCNTL=SYSCNTL5.pcf set SYSMODEL=SYSMASK2.txt set SYSCOBOL=DATAWRK1\ZAP005C1.cbl echo * %UtlName% SYSCOBOL is %syscobol% type %SYSCNTL% run SIMOZAPS generate echo * %UtlName% SYSCOBOL is %syscobol% echo * %UtlName% SYSCNTL is %syscntl% echo * %UtlName% Finished the GENERATE function of SimoZAPS if "%1" == "NOSHOW" goto :End echo * %UtlName% SYSCOBOL source is displayed in a separate window using NotePAD. start notepad %syscobol% :End echo * %UtlName% Thank you for using the GENERATE function by SimoTime Technologies pause
This example uses the following control file (SYSCNTL5.pcf) to generate the COBOL source code that does the data file conversion.
*********************************************************************** * SYSCNTL5.pcf - Process Control File, Input Specifications * * This is an example of the convert specifications to generate a * * Data File Conversion Program. This is used by SimoZAPS * * SimoTime Technologies * * (C) Copyright 1987-2019 All Rights Reserved * * Web Site URL: http://www.simotime.com * * e-mail: helpdesk@simotime.com * *********************************************************************** * SYSUT1 should be an ASCII-Text, 80-byte, variable, ascii file. * * SYSUT2 should be a INDEXED, 256-byte, variable, ebcdic file * * with key position at 1 for a key length of 6. * * * * The VSAMLOAD statement specifies a random load (add or update) of * * records to the indexed (i.e VSAM KSDS) file. The input records from * * SYSUT1 do not need to be in sequence by the key. * *********************************************************************** /dialect C2 /progid ZAP005C1 /vsamload random /sysut1 name=ZAP005D1 org=ASCII/CRLF recfm=VARIABLE rlen=80 /sysut2 name=ZAP005D2 org=indexed recfm=variable rlen=256 klen=6 kpos=1 * /transMODE A2E * /transinit X'40' /translate from pos 1 len 80 to pos 1 len 80 * /END
You may view the COBOL source code that is generated from the information in the control file (SYSCNTL5.pcf) and the mask file (SYSMASK2.TXT).
This function will generate the COBOL source code for a file comparison program. This generated file comparison program (SYSCOBOL) will read two files (SYSUT1) and (SYSUT2). The format of the two input files (SYSUT1 and SYSUT2) is specified by records contained in a control or specifications file (SYSCNTL).
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Generate a Data File Comparison Program |
A Window's Command (.CMD) file is provided for easy execution of SimoZAPS and the "Generate a Comparison Program" function.
C:\SIMOLIBR> ZAPSCOMP name-of-control-file.txt name-of-generated-cobol.cbl SYSUT3
The preceding statement will run SimoZAPS and create a COBOL source member that will do a file comparison. The first parameter is the fully-qualified file name for the control file. The second parameter is the name of the COBOL program to be generated. The third parameter is optional and SYSUT3 will cause a COBOL program to be generated that will read a control file (containing /COMPARE statements) at execution time.
SimoZAPS has the ability to generate two types of compare programs. One type determines the positions to be compared at compiled time and the other determines the positions to be compared at execution time. This is covered in more detail in the following sections.
The reading and comparing of the two files are the easy parts. What to compare in each record is determined by the use of a /COMPARE statement in the control file (SYSCNTL for compile time or SYSUT3 for execution time). Multiple /COMPARE statements may be specified in the control files. The following is an example of a /COMPARE statement.
/COMPARE SYSUT1 POS nnnnn LEN nnnn SYSUT2 POS nnnnn LEN nnnn
The maximum length of a text string that may be compared is 1,024 bytes. If a record exceeds this length then multiple /COMPARE statements will be required. If more than 1.024 bytes needs to be compared then multiple "/COMPARE" statements will be required.
The first type of program will simple read two files and do the comparison of positions within the records base on hard-coded values in the generated program. This type of program has the /COMPARE statements in the same control file (SYSCNTL) that is used to generate the COBOL source code. The positions to be compared will be determined at compile time and become part of the generated source code. The advantage of using this approach is that fewer parameters are required at execution time. The disadvantage of using this approach is that it requires the program to be regenerated and compiled if a user wants to change the positions within the records to be compared.
The following is an example of a control file that will generate the COBOL source code that will compare the contents of two files based on the /COMPARE statements in a control file (SYSCNTL) used at compile time. The compare positions will be included in the generated COBOL source code.
*********************************************************************** * IVPZCPT1spec.CTL - Input Specifications * * This is an example of the compare specifications to generate a * * Data File Comparison Program. This is used by SimoZAPS * * SimoTime Enterprises * * (C) Copyright 1987-2012 All Rights Reserved * * Web Site URL: http://www.simotime.com * * e-mail: helpdesk@simotime.com * *********************************************************************** * Accepted - Specification File is IVPZCPT1spec.CTL * Accepted - Generation Date: 2012/04/10 Time: 22:06:42:86 * Accepted - HTML documentation will be created * Accepted - A Data File Compare Program will be created * Accepted - Compare positions defined at compile time * /SYSLOG ENABLE *HEAD34 ....:....1....:....2....:....3.... /HEAD34 Compare, ASCII/Text, 80 Bytes /PROGID CPLS80C1 /SYSUT1 name=LS0080D1 org=ASCII/Text recfm=FIXED rlen=80 /SYSUT2 name=LS0080D2 org=ASCII/Text recfm=FIXED rlen=80 /DELTAMAX 5 EOF /COMPARE PHYSICAL SYSUT1 pos 1 len 80 SYSUT2 pos 1 len 80 /DFORMAT ASC HEX EBC /DISPLAY SYSOUT /END
The following is the command to generate a compare program using the preceding control file.
C:\SIMOLIBR> ZAPSCOMP IVPZCPT1spec.CTL CPLS80C1.CBL
Once the COBOL source code has been generated it needs to be compiled. Since this example uses an ASCII/Text file for input (on the mainframe this would need to be a sequential file) we will use Micro Focus COBOL on a Windows platform to compile the program. We will compile to a .GNT for improved performance over .INT and use the ASSIGN(EXTERNAL) directive for mapping file names when we execute the program.
The following (CPLS80W1.cmd) is an example of a Windows command file (or batch file) that will set the environment and execute (or run) the program.
@echo OFF set CmdName=CPLS80W1 rem * ******************************************************************* rem * CPLS80W1.CMD - a Windows Command File * rem * This Job Script is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * rem * Text - Compare two line sequential files rem * Author - SimoTime Technologies rem * Date - January 24, 1996 rem * rem * This set of programs will run on a mainframe under MVS or on a rem * Personal Computer with Windows and Micro Focus Net Express. rem * rem * ************ rem * * CPLS80W1 * rem * ********cmd* rem * * rem * * rem * ************ ************ ************ rem * * SYSUT1 *-----* CPLS80C1 *-----* SYSLUSER * rem * *******lseq* * ********cbl* *******lseq* rem * * * rem * ************ * * rem * * SYSUT2 *--* * rem * *******lseq* * rem * * rem * ************ rem * * EOJ * rem * ************ rem * rem * ******************************************************************* rem * Step 1 of 2, Prepare the environment... rem * call ..\ENV1BASE %CmdName% set JobStatus=0000 if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG rem * call SimoNOTE "*******************************************************%CmdName%" call SimoNOTE "Starting CmdName %CmdName%" :PrepareQSAM call SimoNOTE "StepInfo Prepare the File Name Mapping" set SYSUT1=%BaseLib1%\DATA\APPL\SIMOTIME.TEST.CPLS80D1.TXT set SYSUT2=%BaseLib1%\DATA\APPL\SIMOTIME.TEST.CPLS80D2.TXT set SYSLUSER=%BaseLib1%\LOGS\SIMOTIME.SYSLUSER.CPLS80W1.txt rem * rem * ******************************************************************* rem * Step 2 of 2, Compare the two files... rem * :ExecuteCompareRoutine call SimoNOTE "StepInfo Execute the Compare Program" run CPLS80C1 if not "%ERRORLEVEL%" == "0" set JobStatus=0010 if not %JobStatus% == 0000 goto :EojNok call SimoNOTE "Compare-One is %SYSUT1%" call SimoNOTE "Compare-Two is %SYSUT2%" rem * rem * ******************************************************************* :EojAok call SimoNOTE "Finished JobName %CmdName%, Job Status is %JobStatus%" goto :End :EojNok call SimoNOTE "ABENDING JobName %CmdName%, Job Status is %JobStatus%" if not "%JobStatus%" == "0" start NotePad %SYSLUSER% :End if not "%SIMOGENS%" == "BATCH" pause exit /b
The second type file comparison program will read a control file (SYSUT3) containing /COMPARE statements at execution time and do positional comparisons within the records based on the /COMPARE statements submitted at execution time. The advantage of this approach is the compare positions are defined when the generated COBOL program is executed. The user may change the positions within the record to be compared without having to re-generate and compile the program. The disadvantage is that it is necessary to have a control file with compare statements at execution time.
The following is an example of a control file that will generate the COBOL source code that will compare the contents of two files based on the /COMPARE statements in a control file (SYSUT3) that will be processed when the generated program is executed.
*********************************************************************** * IVPZCPT2spec.CTL - Input Specifications * * This is an example of the compare specifications to generate a * * Data File Comparison Program. This is used by SimoZAPS * * SimoTime Enterprises * * (C) Copyright 1987-2012 All Rights Reserved * * Web Site URL: http://www.simotime.com * * e-mail: helpdesk@simotime.com * *********************************************************************** * Accepted - Specification File is IVPZCPT2spec.CTL * Accepted - Generation Date: 2012/04/10 Time: 22:06:42:86 * Accepted - HTML documentation will be created * Accepted - A Data File Compare Program will be created * Accepted - Compare positions defined at execution time * /SYSLOG ENABLE *HEAD34 ....:....1....:....2....:....3.... /HEAD34 Compare, ASCII/Text, 80 Bytes /PROGID CPLS80C2 /SYSUT1 name=LS0080D1 org=ASCII/Text recfm=FIXED rlen=80 /SYSUT2 name=LS0080D2 org=ASCII/Text recfm=FIXED rlen=80 /SYSUT3 name=LS0080D3 org=ASCII/Text recfm=FIXED rlen=80 /DELTAMAX 5 EOF /DFORMAT ASC HEX EBC /DISPLAY SYSOUT /END
The following is the command to generate a compare program using the preceding control file.
C:\SIMOLIBR> ZAPSCOMP IVPZCPT2spec.CTL CPLS80C2.CBL
Once the COBOL source code has been generated it needs to be compiled. Since this example uses an ASCII/Text file for input (on the mainframe this would need to be a sequential file) we will use Micro Focus COBOL on a Windows platform to compile the program. We will compile to a .GNT for improved performance over .INT and use the ASSIGN(EXTERNAL) directive for mapping file names when we execute the program.
The following (CPLS80W3.cmd) is an example of a Windows command file (or batch file) that will set the environment and execute (or run) the program.
@echo OFF rem * ******************************************************************* rem * CPLS80W3.CMD - a Windows Command File * rem * This Job Script is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * rem * Text - Compare two line sequential files rem * Author - SimoTime Technologies rem * Date - January 24, 1996 rem * rem * This set of programs will run on a on a Linux, UNIX or Windows rem * System using Micro Focus COBOL or GnuCOBOL. rem * rem * ************ rem * * CPLS80W3 * rem * ********cmd* rem * * rem * * rem * ************ ************ ************ rem * * SYSUT1 *-----* CPLS80C3 *-----* SYSLUSER * rem * *******lseq* * ********cbl* *******lseq* rem * * * rem * ************ * * rem * * SYSUT2 *--* * rem * *******lseq* * rem * * * rem * ************ * * rem * * SYSUT3 *--* * rem * *******lseq* * rem * * rem * ************ rem * * EOJ * rem * ************ rem * rem * ******************************************************************* rem * Step 1 of 2, Prepare the environment... rem * set CmdName=CPLS80W3 call ..\Env1BASE %CmdName% set JobStatus=00 if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG rem * call SimoNOTE "*******************************************************%CmdName%" call SimoNOTE "Starting CmdName %CmdName%" :PrepareQSAM call SimoNOTE "StepInfo Prepare the File Name Mapping" set SYSUT1=%BaseLib1%\DATA\APPL\SIMOTIME.TEST.CPLS80D1.TXT set SYSUT2=%BaseLib1%\DATA\APPL\SIMOTIME.TEST.CPLS80D2.TXT set SYSUT3=%BaseLib1%\PARMLIB\LSSYSUT3.ctl set SYSLUSER=%BaseLib1%\LOGS\SIMOTIME.SYSLUSER.CPLS80W3.txt rem * rem * ******************************************************************* rem * Step 2 of 2, Compare the two files... rem * :ExecuteCompareRoutine call SimoNOTE "StepInfo Execute the Compare Program" run CPLS80C3 if not "%ERRORLEVEL%" == "0" set JobStatus=0010 if not %JobStatus% == 0000 goto :EojNok call SimoNOTE "Compare-One is %SYSUT1%" call SimoNOTE "Compare-Two is %SYSUT2%" rem * rem * ******************************************************************* :EojAok call SimoNOTE "Finished JobName %CmdName%, Job Status is %JobStatus%" goto :End :EojNok call SimoNOTE "ABENDING JobName %CmdName%, Job Status is %JobStatus%" if not "%JobStatus%" == "0" start NotePad %SYSLUSER% :End if not "%SIMOGENS%" == "BATCH" pause exit /b
For this example the control file (SYSUT3) contains the following compare statement. Since the maximum record size for the file is 80 bytes this will compare the entire record content.
/COMPARE SYSUT1 pos 1 len 80 SYSUT2 pos 1 len 80
The following is an example of a control file that uses some of the advanced functions of the SIMOZAPS Compare capabilities.
*********************************************************************** * IVPZCPT3spec.CTL - Input Specifications * * This is an example of the compare specifications to generate a * * Data File Comparison Program. This is used by SimoZAPS * * SimoTime Enterprises * * (C) Copyright 1987-2012 All Rights Reserved * * Web Site URL: http://www.simotime.com * * e-mail: helpdesk@simotime.com * *********************************************************************** * Accepted - Specification File is ITP09401spec.TXT * Accepted - Generation Date: 2012/04/16 Time: 14:42:50:93 * Accepted - HTML documentation will be created * Accepted - A Data File Compare Program will be created * Accepted - Compare positions defined at compile time * /HEAD34 Compare, Indexed, Key & Positions /progid ITP094C1 /sysut1 name=ITCOMPD1 org=Indexed recfm=variable rlen=512 klen=12 kpos=1 /sysut2 name=ITCOMPD2 org=Indexed recfm=variable rlen=512 klen=12 kpos=1 /DELTAMAX 250 EOF /KEYFIELD SYSUT1 pos 1 len 12 SYSUT2 pos 1 len 12 /COMPARE SYSUT1 pos 1 len 94 SYSUT2 pos 1 len 94 /DELTAMAX 5 EOF /DFORMAT ASC HEX EBC /DISPLAY SYSOUT /SYSLOG DISABLE /END
The preceding example will generate a Compare Program that will compare the contents of two indexed files or VSAM, Key-Sequenced-Data-Sets (KSDS).
The use of the /KEYFIELD statement will generate program logic to test for missing records. Since this is an indexed file (VSAM, KSDS) and the records are processed sequentially by key then it is possible to check for inserted or deleted records when the compare program is executed.
What to do when a not equal condition occurs can be challenging on a single platform but in today's environment with multiple platforms and a mix of encoding schemes (such as EBCDIC and ASCII) and numeric formats (such as PACKED and BINARY) the task can become time consuming and difficult.
When a difference is found the type of display or logging information is defined by the use of a /DFORMAT statement in the control file. The following shows the format of the /DFORMAT statement.
/DFORMAT ASC HEX EBC
NOASC NOHEX NOEBC
SimoZAPS does not actually do the data file comparison but generates a COBOL program to do the comparison. This technique provides greater flexibility since the COBOL program may be compiled on an IBM mainframe (z/OS or VSE) and Windows or UNIX using Micro Focus. Also, unique comparison requirements may be addressed by simply modifying the generated COBOL program.
The generated comparison program provides support for Keyed data sets and Sequential files. For Keyed data sets support is included for inserted, added or deleted records. If Sequential files are in sequence by a certain field then support for inserted, added or deleted records is provided. For files not in sequence a record by record comparison is performed.
It is possible to compare parts or segments of a record.
When a not equal condition is encountered the following is displayed to the screen and written to a logging file. The RED shows the possible ASCII translation. The BLUE shows the possible EBCDIC translation. The BLACK shows the hexadecimal dump information on two lines (high nibble on line 1, low nibble on line 2). The GREEN shows reference information about each file. For example, the relative record number is displayed along with the position and length of the text string within the record that was compared. The MAROON row shows the positions that are equal (=) or not equal (#).
*** 2005/04/01 08:57:37:40 Starting - Data File Content Comparison by SimoTime Enterprises, LLC *** 2005/04/01 08:57:37:41 SYSUT1.....Record Number(position:length) 000000001(00001:00094) *** 2005/04/01 08:57:37:41 ....:....1....:....2....:....3....:....4....:....5....:....6....:....7....:....8....:....9.... *** 2005/04/01 08:57:37:42 000000000001Distributor Cap ........Each ...2....i. *** 2005/04/01 08:57:37:42 3333333333334677766776724672222222222222222222222222222222220000000046662222222222220003900068 *** 2005/04/01 08:57:37:42 000000000001493429254F203100000000000000000000000000000000000000000051380000000000000002C0009C *** 2005/04/01 08:57:37:42 .....................?.../.........................................../........................ *** 2005/04/01 08:57:37:43 SYSUT2.....Record Number(position:length) 000000001(00001:00094) *** 2005/04/01 08:57:37:43 ....:....1....:....2....:....3....:....4....:....5....:....6....:....7....:....8....:....9.... *** 2005/04/01 08:57:37:43 000000000001Distributor Cap ...$....Each ...2....i. *** 2005/04/01 08:57:37:43 3333333333334677766776724672222222222222222222222222222222220002000046662222222222220003900068 *** 2005/04/01 08:57:37:44 000000000001493429254F203100000000000000000000000000000000000004000C51380000000000000002C0009C *** 2005/04/01 08:57:37:44 .....................?.../.........................................../........................ *** 2005/04/01 08:57:37:44 ===============================================================#===#========================== *** 2005/04/01 08:57:37:45 * *** 2005/04/01 08:57:37:45 SYSUT1.....Record Number(position:length) 000000002(00001:00094) *** 2005/04/01 08:57:37:45 ....:....1....:....2....:....3....:....4....:....5....:....6....:....7....:....8....:....9.... *** 2005/04/01 08:57:37:45 000000000002Rotor ........Each ........)\ *** 2005/04/01 08:57:37:46 3333333333335676722222222222222222222222222222222222222222220000000046662222222222220000800025 *** 2005/04/01 08:57:37:47 0000000000022F4F200000000000000000000000000000000000000000000000000051380000000000000009C0009C *** 2005/04/01 08:57:37:47 .............?.?...................................................../.......................* *** 2005/04/01 08:57:37:48 SYSUT2.....Record Number(position:length) 000000002(00001:00094) *** 2005/04/01 08:57:37:48 ....:....1....:....2....:....3....:....4....:....5....:....6....:....7....:....8....:....9.... *** 2005/04/01 08:57:37:49 000000000002Rotor ...$....Each ........)\ *** 2005/04/01 08:57:37:49 3333333333335676722222222222222222222222222222222222222222220002000046662222222222220000800025 *** 2005/04/01 08:57:37:49 0000000000022F4F200000000000000000000000000000000000000000000004000C51380000000000000009C0009C *** 2005/04/01 08:57:37:50 .............?.?...................................................../.......................* *** 2005/04/01 08:57:37:51 ===============================================================#===#========================== *** 2005/04/01 08:57:37:52 * *** 2005/04/01 08:57:37:53 Summary - Data File Content Comparison *** 2005/04/01 08:57:37:53 000000005 - Record count for ITCOMPD1 *** 2005/04/01 08:57:37:54 000000005 - Record count for ITCOMPD2 *** 2005/04/01 08:57:37:55 000000002 - Unequal count *** 2005/04/01 08:57:37:55 Finished - Data File Content Comparison by SimoTime Enterprises, LLC
The summary information shows the record counts and the number of unequal compares by record count.
The following is a description of the statements (or record types) contained in the control file (SYSCNTL) that is used to generate a Data File Compare Program.
Keyword | Parameters | |||||||||||||||||||||||||||||||||
/DIALECT |
|
|||||||||||||||||||||||||||||||||
/PROGID |
|
|||||||||||||||||||||||||||||||||
/SYSUT1 | NAME=xxxxxxxx ORG=xxxxxxxxxx RECFM=xxxxxxxx rlen=nnnnn KLEN=nnnn KPOS=nnnn
|
|||||||||||||||||||||||||||||||||
/SYSUT2 | NAME=xxxxxxxx ORG=xxxxxxxxxx RECFM=xxxxxxxx rlen=nnnnn KLEN=nnnn KPOS=nnnn
|
|||||||||||||||||||||||||||||||||
/UT1OMIT | IF POS nnnn LEN nnnn EQ xxxx BYPASS RECORD +nnn
|
|||||||||||||||||||||||||||||||||
/UT2OMIT | IF POS nnnn LEN nnnn EQ xxxx BYPASS RECORD +nnn
|
|||||||||||||||||||||||||||||||||
/UT1CALL | The name of a callable translation routine to be executed immediatley after a read of a SYSUT1 record. | |||||||||||||||||||||||||||||||||
/UT2CALL | The name of a callable translation routine to be executed immediatley after a read of a SYSUT2 record. | |||||||||||||||||||||||||||||||||
/DELTAMAX |
|
|||||||||||||||||||||||||||||||||
/KEYFIELD | SYSUT1 POS nnnn LEN nnnn SYSUT2 POS nnnn LEN nnnn
|
|||||||||||||||||||||||||||||||||
/COMPARE | compare_type SYSUT1 POS nnnn LEN nnnn SYSUT2 POS nnnn LEN nnnn
Note: It is possible to have more than one compare statement. The maximum length for each compare string is 1,024 bytes. Therefore, if a record is longer that 1,024 bytes it will require multiple compare statements. |
|||||||||||||||||||||||||||||||||
/DFORMAT | ASC HEX EBC
|
|||||||||||||||||||||||||||||||||
/SYSLOG | ENABLE, DISABLE or SYSPROBE | |||||||||||||||||||||||||||||||||
/DISPLAY | NONE, SYSOUT or CONSOLE | |||||||||||||||||||||||||||||||||
/END | End of control statements, this statement is optional. |
The following (CPMK80W8.cmd) is an example of a Windows Command File that will create test data for the compare process of files with 80 byte records.
@echo OFF rem * ******************************************************************* rem * CPMK80W8.CMD - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * rem * Text - Create Sequential Data Sets on disk using IEBGENER. rem * Author - SimoTime Technologies rem * Date = January 24, 1996 rem * rem * The first job step (DeleteTEXT) will delete any previously created rem * files. rem * The second job step (CreateTEXT) will create a new ASCII/Text file. rem * The third step will convert the Line Sequential file to a Record rem * Sequential file. rem * rem * This set of programs will run on a Personal Computer with Windows rem * and Micro Focus Net Express. rem * set CmdName=CPMK80W8 call ..\Env1BASE %CmdName% if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG rem * call SimoNOTE "*******************************************************%CmdName%" call SimoNOTE "Starting CmdName %CmdName%, User is %USERNAME%" call SimoNOTE "StepInfo Delete previously created files" set CPLS80D1=%BaseLib1%\DATA\APPL\SIMOTIME.TEST.CPLS80D1.TXT set CPLS80D2=%BaseLib1%\DATA\APPL\SIMOTIME.TEST.CPLS80D2.TXT set CPLS80D3=%BaseLib1%\DATA\APPL\SIMOTIME.TEST.CPLS80D3.TXT rem * rem * ******************************************************************* rem * Step 1 of 6 Create and populate a new ASCII/TEXT file... rem * This step will create a sequential file with three records. The rem * length of the records is 80 bytes. rem * call SimoNOTE "StepInfo Create an ASCII/Text File" if exist %CPLS80D1% del %CPLS80D1% rem * ..1....:....2....:....3....:....4....:....5....:....6....:....7. echo Record 001, Text String 001...>%CPLS80D1% echo Record 002, Text String 002...>>%CPLS80D1% echo Record 003, Text String 003...>>%CPLS80D1% if exist %CPLS80D1% call SimoNOTE "DataMake %CPLS80D1%" if not exist %CPLS80D1% set JobStatus=9001 if not %JobStatus% == 0000 goto :EojNok rem * rem * ******************************************************************* rem * Step 2 of 6 Create and populate a new ASCII/TEXT file... rem * This step will create a sequential file with three records. The rem * length of the records is 80 bytes. rem * This file contains the same records as the file created in the rem * preceding job step. rem * call SimoNOTE "StepInfo Create an ASCII/Text File" if exist %CPLS80D2% del %CPLS80D2% rem * ..1....:....2....:....3....:....4....:....5....:....6....:....7. echo Record 001, Text String 001...>%CPLS80D2% echo Record 002, Text String 002...>>%CPLS80D2% echo Record 003, Text String 003...>>%CPLS80D2% if exist %CPLS80D2% call SimoNOTE "DataMake %CPLS80D2%" if not exist %CPLS80D2% set JobStatus=9001 if not %JobStatus% == 0000 goto :EojNok rem * rem * ******************************************************************* rem * Step 3 of 6 Create and populate a new ASCII/TEXT file... rem * This step will create a sequential file with three records. The rem * length of the records is 80 bytes. rem * This file contains similar records as the file created in the rem * preceding job step. However, the content of the second record rem * contains additional text. rem * call SimoNOTE "StepInfo Create an ASCII/Text File" if exist %CPLS80D3% del %CPLS80D3% rem * ..1....:....2....:....3....:....4....:....5....:....6....:....7. echo Record 001, Text String 001...>%CPLS80D3% echo Record 002, Text String 002... Catch me...>>%CPLS80D3% echo Record 003, Text String 003...>>%CPLS80D3% if exist %CPLS80D3% call SimoNOTE "DataMake %CPLS80D3%" if not exist %CPLS80D3% set JobStatus=9001 if not %JobStatus% == 0000 goto :EojNok rem * rem * ******************************************************************* rem * Step 4 of 6 Convert ASCII/TEXT file to ASCII RSEQ File... rem * call SimoNOTE "StepInfo Convert Line Sequential to Record Sequential" set GETLS080=%CPLS80D1% set PUTRS080=%BaseLib1%\DATA\APPL\SIMOTIME.TEST.RS80TT01.DAT if exist %PUTRS080% del %PUTRS080% run CV80ALAR if not ERRORLEVEL = 0 set JobStatus=0030 if not %JobStatus% == 0000 goto :EojNok call SimoNOTE "DataTake %GETLS080%" call SimoNOTE "DataMake %PUTRS080%" rem * rem * ******************************************************************* rem * Step 5 of 6 Convert ASCII/TEXT file to ASCII RSEQ File... rem * call SimoNOTE "StepInfo Convert Line Sequential to Record Sequential" set GETLS080=%CPLS80D2% set PUTRS080=%BaseLib1%\DATA\APPL\SIMOTIME.TEST.RS80TT02.DAT if exist %PUTRS080% del %PUTRS080% run CV80ALAR if not ERRORLEVEL = 0 set JobStatus=0030 if not %JobStatus% == 0000 goto :EojNok call SimoNOTE "DataTake %GETLS080%" call SimoNOTE "DataMake %PUTRS080%" rem * rem * ******************************************************************* rem * Step 4 of 6 Convert ASCII/TEXT file to ASCII RSEQ File... rem * call SimoNOTE "StepInfo Convert Line Sequential to Record Sequential" set GETLS080=%CPLS80D3% set PUTRS080=%BaseLib1%\DATA\APPL\SIMOTIME.TEST.RS80TT03.DAT if exist %PUTRS080% del %PUTRS080% run CV80ALAR if not ERRORLEVEL = 0 set JobStatus=0030 if not %JobStatus% == 0000 goto :EojNok call SimoNOTE "DataTake %GETLS080%" call SimoNOTE "DataMake %PUTRS080%" rem * :EojAok call SimoNOTE "Finished CmdName %CmdName%, Job Status is %JobStatus% " goto :End :EojNok call SimoNOTE "NOTE ABENDING CmdName %CmdName%, Job Status is %JobStatus% " :End if not "%1" == "nopause" pause
This procedure will read an ASCII/Text file and create an EBCDIC, 80-byte, fixed-record-length file. The intent of this function is to convert the many "control card" files used in a mainframe job stream. It is an 80/80 copy with conversion between EBCDIC and ASCII.
SIMOZAPS TRANSLATE sysin sysout ASCtoEBC NODISPLAY KEEPNULLS
EBCtoASC DISPLAY PADNULLS
The following is a summary of the parameters used by the Translate Function.
| ||||||||||||
Parameters used by the Translate 80/80 Function |
For additional file conversion capability refer to the Generate a Data File Conversion Program section of this document. This additional file convert function of SimoZAPS does not do the actual conversion of a file. It creates a COBOL source member that may be compiled and executed on a Mainframe System or a Windows, UNIX or Linux System with Micro Focus COBOL.
The MODIFY function of SimoZAPS provides the capability of copying an ASCII/Text file with include, omit or modify capability. As the SYSIN file is being read a record may be selected (included or omitted) based on content for writing to the SYSOUT file. Prior to writing a record to the SYSOUT file the record may be changed using the keyword/parameter combinations described below.
The following is the command line format for the MODIFY function of SimoZAPS.
SIMOZAPS MODIFY sysin sysout COMMAND keyword parameters
or
SIMOZAPS MODIFY sysin sysout LISTFILE filename.ext
Note: the COMMAND keyword may be abbreviated as CMD and the LISTFILE keyword may be abbreviated as LIST or FILE.
The following keyword/parameters are used to include or omit records.
| ||||||
Include and/or Omit Records based on a Positional Value |
The following keyword/parameters are used to format each record.
| ||||||||||||||||||||||||
Record Content Modification |
This section will describe how and when to use the SimoZAPS utility program. Practical examples will be used.
When specifying literals with leading, embedded or trailing spaces it will be necessary to place the literal within a pair of double-quotes. Since double-quotes are used to define the beginning and end of a literal then a literal that contains double-quotes cannot be specified.
When specifying values with the percent sign (%) the results may not be as anticipated if using the COMMAND function.
| ||||||
Considerations when using the Modify Function |
When multiple statements that use conditional arguments are specified then consideration should be given to the sequence of the statements with the longest search arguments being specified first if subsequent shorter search argument contain identical text strings. For example, changing the sequence of the following two statements would produce different results because in the first sequence the value "ABCDEF" would never to be found.
| ||||||
Considerations when using Multiple Condition Statements |
This section will describe how to use the MODIFY function of SimoZAPS to make a global change to a text string in an ASCII/Text file.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The Modify Function, Changing a Text String (Search, Replace, Insert and more) |
The IVP4ZAP1.cmd will execute the SimoZAPS program with the MODIFY function. The CMD parameter indicates the additional parameters are included in the command line. In this example the text string " zap " will be replaced with " " SimoZAP1 " when the file is copied.
@echo OFF rem * ******************************************************************* rem * IVP4ZAP1.CMD - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * Read the TXT4ZAP1.TXT file and create the TXT4ZAP1.NEW file. rem * Replace the word " zap " with " SimoZAP1 " rem * Notice the use of the double quotes for embedded spaces. rem * echo * IVP4ZAP1 is Starting... run simozaps MODIFY txt4zap1.txt txt4zap1.new CMD REPLACE VARIABLE " zap " WITH " SimoZAP1 " if ERRORLEVEL = 1 GOTO :ABEND01 echo * echo * IVP4ZAP1 TXT4ZAP1.TXT - original file is left unchanged... echo * type txt4zap1.txt echo * echo * IVP4ZAP1 TXT4ZAP1.NEW - the new file with modifications... echo * type txt4zap1.new echo * echo * IVP4ZAP1 End of Job... goto :END rem * :ABEND01 echo * IVP4ZAP1 is ABENDING !!! goto :END rem * :END
The following is the contents of the TXT4ZAP1.txt file.
The keyword is zap Repeat keyword is zap The keyword should be replaced with SimoZAP1. If successful the new keyword should be SimoZAP1.
After running IVP4ZAP1.cmd the new file (TXT4ZAP1.new) should have the text string " zap " replaced with " SimoZAP1 ".
One of the problems we encountered when building our Web site was the naming of the members within a directory. Windows is not case sensitive to member names but UNIX systems are case sensitive to member names. We developed the Web site on a Windows platform and everything worked fine. After uploading the files to the UNIX server we encountered many missing links even though the members were copied to the UNIX server. The missing links were due to the case sensitivity for member names.
The following is an example of using the MODIFY function of SimoZAPS to create a batch file to ensure the member names within our Web directory are all lower case. There are other ways to do this but the purpose here is to illustrate the capabilities of the SimoZAPS utility.
CAUTION!!! A back-up copy of the target directory should be created prior to executing this type of process.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changing Member Names into Lower Case |
The following is the IVP4ZAP2.cmd file referenced in the preceding figure.
@echo OFF rem * ******************************************************************* rem * IVP4ZAP2.CMD - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * Convert member names to lower case. rem * echo * IVP4ZAP2 is Starting... if exist SYSWORK2.TXT erase SYSWORK2.TXT echo * @echo ON dir *.*/on/b/a-d>syswork2.txt @echo OFF echo * The preceding DIR command will do the following. echo * The /on organizes the list by name. echo * The /b will cause the dir function to only list the file name.ext. echo * The /a-d will not include directory names in the list. echo * The piping will write the dir information to ivp4zap2.txt. echo * This file will be used by the following command. echo * if exist DOITONCE.CMD erase DOITONCE.CMD @echo ON run simozaps MODIFY SYSWORK2.TXT doitonce.cmd FILE TXT4ZAP2.TXT @echo OFF if ERRORLEVEL = 1 GOTO :ABEND01 echo * echo * The DOITONCE.CMD file has been created from SYSWORK2.TXT. echo * Please review the results and execute accordingly. echo * goto :END rem * :ABEND01 echo * IVP4ZAP2 is ABENDING !!! goto :END rem * :END
The following is the contents of the TXT4ZAP2.txt file used by the MODIFY function of SimoZAPS.
* * The following control statements will create a DOS * Command to rename a member using lower case. * omit if 1 eq * repeat from 1 to 12 at 14 toupper from 1 to 12 tolower from 14 to 25 * * The following statement may need to be modified to point * to the proper drive and directory. * insert "c:\simozaps\" at 1 * * The following statement is required to do the renaming * from mixed or upper case to all lower case. * insert "rename " at 1 *
In the preceding example the MODIFY function of SimoZAPS does not actually do the task of renaming the members in the directory to ensure a lower-case format. The MODIFY function of SimoZAPS is used to create the DOITONCE.CMD file that will do the actual task.
This program will read an ASCII/Text file of COBOL source code and format in UPPER/lower case. It will create a SYSOUT file in the new format, the original file is unchanged.
CAUTION!!! A back-up copy of the target directory should be created prior to executing this type of process.
SIMOZAPS FormatCOBOL sysin sysout Display CobolLower NamesUpper
NoDisplay CobolUpper NamesLower
| ||||||||||||||
Command Line Format and Parameter Descriptions |
This section will describe how to use the FormatCOBOL function of SimoZAPS to read a COBOL source member and create a new file with case consistency. The following shows the contents of the IVP4ZAP3.cmd file.
@echo OFF rem * ******************************************************************* rem * IVP4ZAP3.CMD - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * This program will read the HELLO.CBL COBOL source member that contains rem * an erratic use of upper and lower case. rem * rem * Create HELLO.NEW with a consistent use of upper and lower case. rem * echo * echo * IVP4ZAP3 - Installation Verification Program for the FormatCOBOL function. run simozaps FormatCOBOL hello.cbl hello.new nodisplay if ERRORLEVEL = 1 GOTO :ABEND01 echo * IVP4ZAP3 - The FormatCOBOL function is complete, echo * IVP4ZAP3 - Review the HELLO.CBL and HELLO.NEW files. echo * goto :END rem * :ABEND01 echo * IVP4ZAP1 is ABENDING !!! goto :END rem * :END
In the preceding example the FormatCOBOL function will read the HELLO.CBL member and create a new HELLO.NEW file with case consistency. The "nodisplay" option suppresses the scrolling of source code on the screen.
In the new COBOL.NEW file the COBOL verbs will be lower case and the user defined fields will be upper case.
The SIMOZAPS Utility Program is intended to assist programmers in performing a variety of utilitarian tasks when working with non-relational data structures. This document may be used to assist as a tutorial for new programmers or as a quick reference for experienced programmers.
In the world of programming there are many ways to solve a problem. This document and the links to other documents are intended to provide a greater awareness of the Data Management and Application Processing alternatives.
The documentation and software were developed and tested on systems that are configured for a SIMOTIME environment based on the hardware, operating systems, user requirements and security requirements. Therefore, adjustments may be needed to execute the jobs and programs when transferred to a system of a different architecture or configuration.
SIMOTIME Services has experience in moving or sharing data or application processing across a variety of systems. For additional information about SIMOTIME Services or Technologies please contact us using the information in the Comments or Feedback section of this document.
Software Agreement and Disclaimer
Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Technologies. Once the fee is received by SimoTime the latest version of the software, documentation or training material will be delivered and a license will be granted for use within an enterprise, provided the SimoTime copyright notice appear on all copies of the software. The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Technologies.
SimoTime Technologies makes no warranty or representations about the suitability of the software, documentation or learning material for any purpose. It is provided "AS IS" without any expressed or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement. SimoTime Technologies shall not be liable for any direct, indirect, special or consequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software, documentation or training material.
This section includes links to documents with additional information that are beyond the scope and purpose of this document. The first group of documents may be available from a local system or via an internet connection, the second group of documents will require an internet connection.
Note: A SimoTime License is required for the items to be made available on a local system or server.
The following links may be to the current server or to the Internet.
The SimoZAPS program, the documentation, the Installation Verification Procedures (IVP's) and examples are provided electronically or on a Compact Disk (CD) with a predefined SETUP procedure. Additional information about acquiring SimoZAPS may be obtained by contacting the helpdesk at SimoTime or refer to the Product Availability and Pricing document.
Explore the Principles of Data File Conversion. This link includes guidelines for defining requirements and determining the scope of effort for a data conversion effort.
Explore How to Generate a Data File Convert Program using simple specification statements in a Process Control File (PCF). This link to the User Guide includes the information necessary to create a Process Control File and generate the COBOL programs that will do the actual data file conversion. The User Guide contains a list of the PCF statements that are used for the data file convert process.
Explore the Principles of Data File Validation. This link includes guidelines for defining requirements and determining the scope of effort for a data validation effort. This effort includes a data file compare process, a technique for accumulating summary totals with a record count and a technique for reading a VSAM, KSDS and producing a hex-dump output based on a list of user-defined keys.
Explore How to Generate a Data File Compare, Validate or Hex-Dump Program using simple specification statements in a Process Control File (PCF). This link to the User Guide includes the information necessary to create a Process Control File and generate the COBOL programs that will do a data file compare, accumulate summary totals with a record count or produce a Hex-Dump of records in a VSAM, KSDS based on a list of user-defined keys. The User Guide contains a list of the PCF statements that are used for the data file compare, validate or dump process.
Explore the COBOL Connection for more examples of COBOL programming techniques and sample code.
Explore the non-Relational Data Connection for more examples of accessing methodologies and coding techniques for Data Files and VSAM Data Sets.
Explore The ASCII and EBCDIC Translation Tables. These tables are provided for individuals that need to better understand the bit structures and differences of the encoding formats.
Explore The File Status Return Codes to interpret the results of accessing VSAM data sets and/or QSAM files.
The following is a list of some of the conversion programs created by the GENERATE function of SimoZAPS. These are provided as programming examples for COBOL.
| ||||||||||||
A List of Sample Conversion Programs Generated by SIMOZAPS |
The following links will require an internet connect.
A good place to start is The SimoTime Home Page for access to white papers, program examples and product information. This link requires an Internet Connection
Explore The Micro Focus Web Site for more information about products and services available from Micro Focus. This link requires an Internet Connection.
Explore the GnuCOBOL Technologies available from SourceForge. SourceForge is an Open Source community resource dedicated to helping open source projects be as successful as possible. GnuCOBOL (formerly OpenCOBOL) is a COBOL compiler with run time support. The compiler (cobc) translates COBOL source to executable using intermediate C, designated C compiler and linker. This link will require an Internet Connection.
Explore the Glossary of Terms for a list of terms and definitions used in this suite of documents and white papers.
This document was created and is maintained by SimoTime Technologies. If you have any questions, suggestions, comments or feedback please use the following contact information.
1. | Send an e-mail to our helpdesk. |
1.1. | helpdesk@simotime.com. |
2. | Our telephone numbers are as follows. |
2.1. | 1 415 763-9430 office-helpdesk |
2.2. | 1 415 827-7045 mobile |
We appreciate hearing from you.
SimoTime Technologies was founded in 1987 and is a privately owned company. We specialize in the creation and deployment of business applications using new or existing technologies and services. We have a team of individuals that understand the broad range of technologies being used in today's environments. Our customers include small businesses using Internet technologies to corporations using very large mainframe systems.
Quite often, to reach larger markets or provide a higher level of service to existing customers it requires the newer Internet technologies to work in a complementary manner with existing corporate mainframe systems. We specialize in preparing applications and the associated data that are currently residing on a single platform to be distributed across a variety of platforms.
Preparing the application programs will require the transfer of source members that will be compiled and deployed on the target platform. The data will need to be transferred between the systems and may need to be converted and validated at various stages within the process. SimoTime has the technology, services and experience to assist in the application and data management tasks involved with doing business in a multi-system environment.
Whether you want to use the Internet to expand into new market segments or as a delivery vehicle for existing business functions simply give us a call or check the web site at http://www.simotime.com
Return-to-Top |
SimoZAPS - Data File Utility with Hex View, Convert between EBCDIC/ASCII or Compare Two Files |
Copyright © 1987-2019 SimoTime Technologies and Services All Rights Reserved |
When technology complements business |
http://www.simotime.com |