|
|||||
|
SimoREC1 (a COBOL Record Layout and Content Conversion Utility Program) is currently available as a Controlled Release Option (CRO). CRO's provide a process for SimoTime to deliver technology that is used by our consultants in the field but has not been productized. A CRO has been field tested through actual use for a minimum of six months and is subjected to a suite of regression tests prior to release. SimoTime's intent is to productize this CRO and make it generally available with appropriate documentation. SimoTime reserves the right to change a CRO during the productizing process. This may require a user to make changes pertaining to the CRO usage and interfaces.
The SimoTime Record Layout and Content Conversion Utility Program (SimoREC1) reads a COBOL Copy FIle and produces various outputs for reference material, documentation and data file conversion. For reference or documentation purposes SimoREC1 creates an ASCII/Text file and an HTML document from a COBOL copy file. The utility provides the length of a field and the position of the start of the field within a record. Also, the actual physical length for group items, packed fields, binary fields and tables will be calculated. This information is provided by the SimoTime Record Layout utility program within a text file and an HTML document.
Once this information has been calculated SimoREC1 has the capability of creating the source code for a callable COBOL program that will do the conversion between EBCDIC and ASCII at the field level. The SimoREC1 utility used in conjunction with the SimoZAPS utility has the capability of generating a set of programs that will read a file containing EBCDIC encoding and write a new file containing ASCII encoding. The numeric encoding used by the IBM Mainframe or Micro Focus is maintained.
Some of the information about a record structure may be found by compiling a program that references the copy file and then analysing the listing. For example, with Micro Focus COBOL using the DATAMAP option will produce a listing file with useful information about the fields in working storage.
For more information about this program or if you have any questions, suggestions or comments please call or send an e-mail to: helpdesk@simotime.com.
SimoREC1 will scan a COBOL copy file and produce the following information.
| 1. | Show an example of Scanning a COBOL copy file and determining the actual Data Structure.. | ||||||||||||
|
|||||||||||||
| 2. | Create HTML documentation from the COBOL copy file information. | ||||||||||||
| 3. | Create a COBOL callable routine that converts between EBCDIC and ASCII at the field level. | ||||||||||||
| 4. | Integrate the COBOL Copy File Analysis Function into Micro Focus Mainframe Express or Net Express as a tool bar item. |
The following shows a couple of examples of using COBOL copy files as input and producing HTML documents as output.
The following is a simple example of a COBOL copy file. Without a utility program the length of VKSD-NAME must be manually calculated. The VKSD-CREDIT-LIMIT field is nine (9) digits and appears to be nine (9) bytes in length. However, the use of the COMP-3 will make it a packed field and the length will be five (5) bytes. The following HTML document quickly provides this information.
*****************************************************************
* Copy File for the VSAM Data Set used for the Demo programs. *
*****************************************************************
* Copyright (C) 1987-2003 SimoTime Enterprises *
* All Rights Reserved *
*****************************************************************
* Provided by SimoTime Enterprises *
* Our e-mail address is: helpdesk@simotime.com *
* Also, visit our Web Site at http://www.simotime.com *
*****************************************************************
01 VKSD-RECORD.
05 VKSD-KEY PIC X(12).
05 VKSD-NAME.
10 VKSD-LAST-NAME PIC X(28).
10 VKSD-FIRST-NAME PIC X(18).
05 VKSD-ADDRESS-1 PIC X(48).
05 VKSD-ADDRESS-2 PIC X(48).
05 VKSD-CITY PIC X(18).
05 VKSD-STATE PIC X(18).
05 VKSD-POSTAL-CODE PIC X(12).
05 VKSD-CREDIT-LIMIT PIC S9(7)V9(2) COMP-3.
05 VKSD-FILLER PIC X(305).
*! KSDCPYB2 - End-of-Copy File...
The following is a simple example of the HTML documentation created from the preceding COBOL copy file.
| Level | Field/Redefines Name | Field Type | Relative Position |
Whole Numbers |
Decimal Positions |
Logical Size |
Physical Size |
Table Size |
Table Cells |
| 01 | VKSD-RECORD | Group Item | 1 | 0 | 0 | 512 | 0 | 0 | 0 |
| 05 | VKSD-KEY | Alphameric | 1 | 0 | 0 | 12 | 0 | 0 | 0 |
| 05 | VKSD-NAME | Group Item | 13 | 0 | 0 | 46 | 0 | 0 | 0 |
| 10 | VKSD-LAST-NAME | Alphameric | 13 | 0 | 0 | 28 | 0 | 0 | 0 |
| 10 | VKSD-FIRST-NAME | Alphameric | 41 | 0 | 0 | 18 | 0 | 0 | 0 |
| 05 | VKSD-ADDRESS-1 | Alphameric | 59 | 0 | 0 | 48 | 0 | 0 | 0 |
| 05 | VKSD-ADDRESS-2 | Alphameric | 107 | 0 | 0 | 48 | 0 | 0 | 0 |
| 05 | VKSD-CITY | Alphameric | 155 | 0 | 0 | 18 | 0 | 0 | 0 |
| 05 | VKSD-STATE | Alphameric | 173 | 0 | 0 | 18 | 0 | 0 | 0 |
| 05 | VKSD-POSTAL-CODE | Alphameric | 191 | 0 | 0 | 12 | 0 | 0 | 0 |
| 05 | VKSD-CREDIT-LIMIT | Numeric/Signed COMP-3 |
203 | 7 | 2 | 9 | 5 | 0 | 0 |
| 05 | VKSD-FILLER | Alphameric | 208 | 0 | 0 | 305 | 0 | 0 | 0 |
| Level | Field/Redefines Name | Field Type | Relative Position |
Whole Numbers |
Decimal Positions |
Logical Size |
Physical Size |
Table Size |
Table Cells |
The following is a challenging example of a COBOL copy file. The length of KSE00256-REC must be manually calculated and this can be a bit more challenging than the previous example. The length of P-TABLE-09S-10E appears to be nine (9) bytes. However, the use of the COMP-3 will make it a packed field and the length will be five (5) bytes. Furthermore, the OCCURS clause makes it a table of ten (10) elements so the length is of P-TABLE-09S-10E is actually fifty (50) bytes. Also, note the use of REDEFINES and REDEFINES with the redefinition being shorter than the primary field. This is a legitimate coding technique but the length of the primary field must be used when calculating the total length of the record. The following HTML document quickly provides this information.
*****************************************************************
* Record layout for testing SimoREC1 *
*****************************************************************
* *----------------------------------------------------------*
* 1. Create a group item
* 2. What is the Length?
01 KSE00256-REC.
* *----------------------------------------------------------*
* 1. Create a simple numeric field.
* 2. What is the relative position within the record layout?
05 KSE00256-KEY-01 pic 9(6).
* *----------------------------------------------------------*
* 1. Create a group item.
* 2. Create two alphameric fields within the group item.
* 3. What is the length of the group item?
05 X-ALHPAMERIC-FIELDS.
10 X-FIELD-08 pic X(8).
10 X-FIELD-32 pic X(32).
* *----------------------------------------------------------*
* 1. Create a group item.
* 2. Create various fields within the group item.
* 3. What is the length of the group item?
05 VARIOUS-FORMATS.
10 PIC-XXX pic XXX.
10 PIC-999 pic 999.
10 PIC-99V999 pic 99V999.
10 PIC-99V9P3P pic 99V9(3).
10 PIC-9P2PV999 pic 9(2)V999.
10 PIC-S999 pic S999.
10 PIC-S99V999 pic S99V999.
10 PIC-S99V9P3P pic S99V9(3).
10 PIC-S9P2PV999 pic S9(2)V999.
* *----------------------------------------------------------*
* 1. Create a group item.
* 2. Create two numeric fields within the group item.
* 3. What is the length of the group item?
05 N-NUMERIC.
10 N-07-UNSIGN pic 9(7)V9(2).
10 N-07-SIGNED pic S9(7)V9(2).
* *----------------------------------------------------------*
* 1. Create a group item.
* 2. Create two packed, numeric fields within the group item.
* 3. What is the length of the group item?
05 P-NUMERIC.
10 P-09-UNSIGN pic 9(7)V9(2) COMP-3.
10 P-09-SIGNED pic S9(7)V9(2) COMP-3.
* *----------------------------------------------------------*
* 1. Create a group item.
* 2. Create two binary, numeric fields within the group item.
* 3. What is the length of the group item?
05 B-NUMERIC.
10 B-09-UNSIGN pic 9(7)V9(2) COMP.
10 B-09-SIGNED pic S9(7)V9(2) BINARY.
* *----------------------------------------------------------*
* 1. Create a group item.
* 2. Create two leading, signed fields within the group item.
* 3. What is the length of the group item?
05 LN-SIGNED.
10 LN-09-SIGNED pic S9(7)V9(2) SIGN LEADING.
10 LN-09-SIGNED-S pic S9(7)V9(2)
SIGN LEADING SEPARATE.
* *----------------------------------------------------------*
* 1. Create a group item.
* 2. Create two trailing, signed fields within the group item.
* 3. What is the length of the group item?
05 TN-SIGNED.
10 TN-09-SIGNED pic S9(7)V9(2) SIGN TRAILING.
10 TN-09-SIGNED-S pic S9(7)V9(2)
SIGN TRAILING SEPARATE.
* *----------------------------------------------------------*
* 1. Create a group item.
* 2. Create a table or array within the group item.
* 3. What is the length of the group item?
05 P-TABLE-09S-10E.
10 PT-09S-CELL pic S9(9) COMP-3
OCCURS 10 TIMES.
* *----------------------------------------------------------*
* 1. Create a group item.
* 2. Create a table or array within the group item.
* 3. What is the length of the group item?
05 TABLE-NO-PIC OCCURS 15 TIMES.
10 TABLE-NO-PIC-XX pic XX.
10 TABLE-NO-PIC-3 pic X(3).
* *----------------------------------------------------------*
* 1. Create a four-byte alphameric field.
* 2. Create a redefined group item.
* 3. Create four fields within the redefined group item.
05 RED-01-PRIME pic X(4).
05 RED-01-AGAIN REDEFINES RED-01-PRIME.
10 RED-01-BYTE-01 pic X.
10 RED-01-BYTE-02 pic X.
10 RED-01-BYTE-03 pic X.
10 RED-01-BYTE-04 pic X.
* *----------------------------------------------------------*
* 1. Create a four-byte alphameric field.
* 2. Create a redefined group item.
* 3. Create two fields within the redefined group item.
* 4. What is the length of the redefined group item?
05 BLUE-01-PRIME pic X(4).
05 BLUE-01-SHORT REDEFINES BLUE-01-PRIME.
10 BLUE-01-BYTE-01 pic X.
10 BLUE-01-BYTE-02 pic X.
* *----------------------------------------------------------*
* 1. Create a four-byte alphameric field.
* 2. Create a redefined four-byte, numeric field.
05 FOUR-BYTES-PRIME pic X(4).
05 FOUR-BYTES-VALUE REDEFINES FOUR-BYTES-PRIME
pic 9(4).
* *----------------------------------------------------------*
* 1. Create a six-byte alphameric field.
* 2. Create a short-redefine as a four-byte, numeric field.
05 SIX-BYTES-PRIME pic X(6).
05 SIX-BYTES-SHORT REDEFINES SIX-BYTES-PRIME
pic 9(4).
* *----------------------------------------------------------*
* 1. Create a nine-byte, alphameric field.
* 2. Create a short-redefine as a packed, five-digit,
* three-byte field.
* 3. Create a nested redefine as a three-byte, alphameric
* field.
05 NINE-PRIME pic X(9).
05 NINE-AGAIN REDEFINES NINE-PRIME.
10 NINE-AGAIN-05 pic 9(5) COMP-3.
10 NINE-AGAIN-05-R REDEFINES NINE-AGAIN-05
pic X(3).
* *----------------------------------------------------------*
* 1. Create a one-byte, alphameric field.
05 ONE-BYTE pic X value '*'.
* *----------------------------------------------------------*
* 1. Create a two-hundred-byte, alphameric field.
05 FILLER pic X(200).
The following is a challenging example of the HTML documentation created from the preceding COBOL copy file.
| Level | Field/Redefines Name | Field Type | Relative Position |
Whole Numbers |
Decimal Positions |
Logical Size |
Physical Size |
Table Size |
Table Cells |
| 01 | KSE00256-REC | Group Item | 1 | 0 | 0 | 256 | 0 | 0 | 0 |
| 05 | KSE00256-KEY-01 | Numeric/Unsign | 1 | 6 | 0 | 6 | 0 | 0 | 0 |
| 05 | X-ALHPAMERIC-FIELDS | Group Item | 7 | 0 | 0 | 40 | 0 | 0 | 0 |
| 10 | X-FIELD-08 | Alphameric | 7 | 0 | 0 | 8 | 0 | 0 | 0 |
| 10 | X-FIELD-32 | Alphameric | 15 | 0 | 0 | 32 | 0 | 0 | 0 |
| 05 | N-NUMERIC | Group Item | 47 | 0 | 0 | 18 | 0 | 0 | 0 |
| 10 | N-07-UNSIGN | Numeric/Unsign | 47 | 7 | 2 | 9 | 0 | 0 | 0 |
| 10 | N-07-SIGNED | Numeric/Signed | 56 | 7 | 2 | 9 | 0 | 0 | 0 |
| 05 | P-NUMERIC | Group Item | 65 | 0 | 0 | 10 | 0 | 0 | 0 |
| 10 | P-09-UNSIGN | Numeric/Unsign COMP-3 |
65 | 7 | 2 | 9 | 5 | 0 | 0 |
| 10 | P-09-SIGNED | Numeric/Signed COMP-3 |
70 | 7 | 2 | 9 | 5 | 0 | 0 |
| 05 | B-NUMERIC | Group Item | 75 | 0 | 0 | 8 | 0 | 0 | 0 |
| 10 | B-09-UNSIGN | Numeric/Unsign BINARY |
75 | 7 | 2 | 9 | 4 | 0 | 0 |
| 10 | B-09-SIGNED | Numeric/Signed BINARY |
79 | 7 | 2 | 9 | 4 | 0 | 0 |
| 05 | LN-SIGNED | Group Item | 83 | 0 | 0 | 19 | 0 | 0 | 0 |
| 10 | LN-09-SIGNED | Numeric/Signed SIGN/LEADING |
83 | 7 | 2 | 9 | 0 | 0 | 0 |
| 10 | LN-09-SIGNED-S | Numeric/Signed SIGN/LEADING SEPARATE |
92 | 7 | 2 | 10 | 0 | 0 | 0 |
| 05 | TN-SIGNED | Group Item | 102 | 0 | 0 | 19 | 0 | 0 | 0 |
| 10 | TN-09-SIGNED | Numeric/Signed SIGN/TRAILING |
102 | 7 | 2 | 9 | 0 | 0 | 0 |
| 10 | TN-09-SIGNED-S | Numeric/Signed SIGN/TRAILING SEPARATE |
111 | 7 | 2 | 10 | 0 | 0 | 0 |
| 05 | P-TABLE-09S-10E | Group Item | 121 | 0 | 0 | 50 | 0 | 0 | 0 |
| 10 | PT-09S-CELL | TABLE Numeric/Signed COMP-3 |
121 | 9 | 0 | 9 | 5 | 50 | 10 |
| 05 | RED-01-PRIME | Alphameric | 171 | 0 | 0 | 4 | 0 | 0 | 0 |
| 05 | RED-01-AGAIN RED-01-PRIME |
Group Item REDEFINES |
1 | 0 | 0 | 4 | 0 | 0 | 0 |
| 10 | RED-01-BYTE-01 | Alphameric | 1 | 0 | 0 | 1 | 0 | 0 | 0 |
| 10 | RED-01-BYTE-02 | Alphameric | 2 | 0 | 0 | 1 | 0 | 0 | 0 |
| 10 | RED-01-BYTE-03 | Alphameric | 3 | 0 | 0 | 1 | 0 | 0 | 0 |
| 10 | RED-01-BYTE-04 | Alphameric | 4 | 0 | 0 | 1 | 0 | 0 | 0 |
| 05 | BLUE-01-PRIME | Alphameric | 175 | 0 | 0 | 4 | 0 | 0 | 0 |
| 05 | BLUE-01-SHORT BLUE-01-PRIME |
Group Item REDEFINES Size Variation |
5 | 0 | 0 | 2 | 0 | 0 | 0 |
| 10 | BLUE-01-BYTE-01 | Alphameric | 5 | 0 | 0 | 1 | 0 | 0 | 0 |
| 10 | BLUE-01-BYTE-02 | Alphameric | 6 | 0 | 0 | 1 | 0 | 0 | 0 |
| 05 | FOUR-BYTES-PRIME | Alphameric | 179 | 0 | 0 | 4 | 0 | 0 | 0 |
| 05 | FOUR-BYTES-VALUE FOUR-BYTES-PRIME |
Numeric/Unsign REDEFINES |
7 | 4 | 0 | 4 | 0 | 0 | 0 |
| 05 | SIX-BYTES-PRIME | Alphameric | 183 | 0 | 0 | 6 | 0 | 0 | 0 |
| 05 | SIX-BYTES-SHORT SIX-BYTES-PRIME |
Numeric/Unsign REDEFINES Size Variation |
7 | 4 | 0 | 4 | 0 | 0 | 0 |
| 05 | NINE-PRIME | Alphameric | 189 | 0 | 0 | 9 | 0 | 0 | 0 |
| 05 | NINE-AGAIN NINE-PRIME |
Group Item REDEFINES Size Variation |
7 | 0 | 0 | 3 | 0 | 0 | 0 |
| 10 | NINE-AGAIN-05 | Numeric/Unsign COMP-3 |
7 | 5 | 0 | 5 | 3 | 0 | 0 |
| 10 | NINE-AGAIN-05-R NINE-AGAIN-05 |
Alphameric REDEFINES |
10 | 0 | 0 | 3 | 0 | 0 | 0 |
| 05 | ONE-BYTE | Alphameric | 198 | 0 | 0 | 1 | 0 | 0 | 0 |
| 05 | FILLER | Alphameric | 199 | 0 | 0 | 58 | 0 | 0 | 0 |
| Level | Field/Redefines Name | Field Type | Relative Position |
Whole Numbers |
Decimal Positions |
Logical Size |
Physical Size |
Table Size |
Table Cells |
The SimoREC1 Record Layout and Content Conversion Utility Program requires about 1 meg of disk space to install. SimoREC1 requires very little resources to execute. The Micro Focus COBOL suite of products will usually determine the minimum hardware configuration. A typical configuration to run the SimoTime technologies, the Micro Focus COBOL oriented technologies and application components are 20 megabytes of disk and 256 meg of memory. SimoREC1 will run in the following environments.
| 1. | Executes on Windows/2000, Windows/NT and Windows/XP using Micro Focus Net Express and the CMD files provided. |
| 2. | This example will also run with Micro Focus Mainframe Express. |
| 3. | The Copy File Analysis Function that creates HTML documentation may be integrated into Net Express or Mainframe Express as a tool bar item using the REC1MFO1.CMD file. Refer to the Integrating with Micro Focus COBOL Desktop Environments section of this document for more information. |
| 4. | The Copy File Analysis Function that creates HTML documentation may be executed from a Windows command line using the REC1HTML.CMD file. Refer to the Create HTML Documentation section of this document for more information. |
| 5. | The Copy File Analysis Function that creates a callable COBOL source member for conversion between EBCDIC and ASCII may be executed from a Windows command line using the REC1CALL.CMD file. Refer to the Create a Callable COBOL Conversion Routine section of this document for more information. |
To install the SimoREC1 Record Layout and Content Conversion Utility Program run the SETUP.EXE from the Compact Disk. This utility program will install into the C:\SimoLIBR directory by default. We recommend this not be changed because the samples and the IVP's (Installation Verification Procedures) expect this configuration.
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.
This section provides information on how to quickly start the process of creating the data file conversion programs using SimoREC1 once the Installation is complete. This section will provide "quick start" informaion for the following four items.
| 1. | Read the COBOL copy file that defines the record layout and create an HTML document. |
| 2. | Create the COBOL source code for a callable routine that will do the conversion between EBCDIC and ESCII based in the record layout information provided in the COBOL copy file. |
| 3. | Create the COBOL source code for a
program that will do file I/O to read a file and write a new file based on the
specifications provided in a control file. This I/O program will call the
routine to convert the record contents between EBCDIC and ESCII. The I/O program will read and write the files sequentially. If the output file is a keyed indexed file the input file must be in sequence by the key field. |
| 4. | Create the COBOL source code for a
program that will do file I/O to read a file and write a new file based on the
specifications provided in a control file. This I/O program will call the
routine to convert the record contents between EBCDIC and ESCII. The I/O program will read the input file sequentially and write or rewrite to the output file randomly. If the output file is a keyed indexed file the sequence of the records within the input file do not need to be in sequence by the key field. This approach is slower than the process described in item 3 but will add new records to the output file without dependencies on the sequencing. If a record is read from the input file that has the same key as an existing record in the output file the record in the output file will be updated with the new information. |
The following descriptions assume that SimoZAPS and SimoREC1 are installed in the C:\SimoLIBR directory and this directory is on the Windows PATH.
The following command (REC1HTML.CMD) may be used to generate HTML documentation from a COBOL copy file.
| C:\> REC1HTML copyfilename.CPY HTMLname.HTM IBM or MF |
The 1st parameter copyfilename must be the name of a COBOL copy file.
The 2nd parameter HTMLname must be the name of the HTML document to be created.
The 3rd parameter IBM or MF must be "IBM" or "MF".
The "IBM" keyword will cause the record structure (position and length of fields) to be calculated based on the size of COMP or BINARY fields used on the mainframe (i.e. binary fields are 2, 4 or 8 bytes only).
The "MF" keyword will cause the record structure (position and length of fields) to be calculated based on the size of COMP or BINARY fields used on the Wintel or UNIX platforms (i.e. binary fields are based on the number of digit in the picture clause and may be 1, 2, 3, 4 , 5, 6, 7 or 8 bytes).
For a more detailed description of creating HTML documentation refer to the Create HTML Documentation, System Description section of this document.
The following command (REC1CALL.CMD) may be used to generate the COBOL source code for a callable conversion routine from a COBOL copy file.
| C:\> REC1CALL copyfilename.CPY routinename.CBL |
The 1st parameter copyfilename must be the name of a COBOL copy file.
The 2nd parameter routinename must be the name of the callable COBOL routine to be created.
For a more detailed description of creating a callable conversion routine refer to the Create a Callable Data Conversion Routine section of this document.
The section will describe how to read a file, convert the content of the individual records and write a new file. Two approaches are discussed. The first approach will read the input file sequentially and write the output file sequentially. This appraoch is the fastest and will work for most situations. A problem arises when doing content conversion between ASCII and EBCDIC and if the output file has a VSAM, Keyed Sequential Data Set (KSDS) or Micro Focus Keyed-Indexed file with an alpha-numeric key. Since the collating sequences are differnt for ASCII and EBCDIC (for example, the numbers come before the letters in ASCII and the number come after the letters in EBCDIC) this could result in trying to add a record out of sequence. Therefore, a second approach is provided that does a random update or add to the output file.
The File I/O program is actually created using the SimoZAPS utility. For a more detailed description refer to the documentation for SimoZAPS in the "Generate Function, The Control File" section on the SimoTime Web Site.
The following command (ZapsRec1.CMD) may be used to generate the COBOL source code for a file I/O program. This requires a minimum amount of specifications to be defined in a control file. This command will generate the COBOL source code to read and write files by processing in a sequential order.
| C:\> ZAPSREC1 controlfilename.TXT programname.CBL |
The 1st parameter controlfilename must be the name of a control file with a minimum amount of file definition specifications.
The 2nd parameter programname must be the name of the callable COBOL program to be created.
The following shows the contents of a control file for sequential processing.
/Dialect C2 /progid ITKEKAC1 /sysut1 name=ITMGETDE org=Indexed recfm=variable rlen=512 klen=12 kpos=1 /sysut2 name=ITMPUTDA org=Indexed recfm=variable rlen=512 klen=12 kpos=1 * /transmode E2A /transcall ITME2AR1 * /END
The following command (ZapsRec2.CMD) may be used to generate HTML documentation from a COBOL copy file.
The following command (ZapsRec2.CMD) may be used to generate the COBOL source code for a file I/O program. This requires a minimum amount of specifications to be defined in a control file. This command will generate the COBOL source code to read the records from the input file in sequential order and write or rewrite the records to the output file in a random order.
| C:\> ZAPSREC2 controlfilename.TXT programname.CBL |
The 1st parameter controlfilename must be the name of a control file with a minimum amount of file definition specifications.
The 2nd parameter programname must be the name of the callable COBOL program to be created.
The following shows the contents of a control file for random processing.
/Dialect C2 /progid ITKEKAC1 /VSAMLOAD RANDOM /sysut1 name=ITMGETDE org=Indexed recfm=variable rlen=512 klen=12 kpos=1 /sysut2 name=ITMPUTDA org=Indexed recfm=variable rlen=512 klen=12 kpos=1 * /transmode E2A /transcall ITME2AR1 * /END
This section describes the Installation Verification Procedures (IVP's) provided in the Z-Pack for SimoREC1. The IVP's are a suite of Windows Command Files and sample copy files that validate the correct installation and system configuration while demonstrating some of the capabilites of SimoREC1. The IVP,s may also serve as examples or models and may be copied and then modified to generate conversion programs or documentation based on user-defined copy files.
The following section will refer to the IBM or MF (i.e. Micro Focus) format. On an IBM mainframe numeric fields that are BINARY (or COMP) are always 2, 4 or multiple of 8 bytes. In the Micro Focus environment it is possible to have a 1, 3, 5,6 or 7 byte BINARY field. Depending on the copy file this could generate a different record length and different offsets of fields within the record. SimoREC1 is capable of generating HTML documentation and conversion programs based on either format.
The first IVP (IvpRec11.CMD) shows the generation of a single HTML document using a very simple COBOL copy file. This command will call Rec1HTML.CMD and pass it three (3) parameters. The HTML document will be created based on the IBM fomat for BINARY, numeric fields.
Refer to the comments (or remarks) in the following command file for additional information.
@echo OFF
set JobStatus=0000
setlocal
if "%SimoLIBR%" == "" set SimoLIBR=c:\SimoLIBR
set PostNote=%SimoLIBR%\LOGS\SimoTIME.LOG
set IvpName=IvpRec11
call :PostNote "************************************************************%IvpName%"
call :PostNote "Starting JobName %IvpName%"
echo ************************************************************
echo * This program is provided by: *
echo * SimoTime Enterprises, LLC *
echo * (C) Copyright 1987-2008 All Rights Reserved *
echo * Web Site URL: http://www.simotime.com *
echo * e-mail: helpdesk@simotime.com *
echo ************************************************************
echo * Text: Scan a Copy file, Create a TEXT and HTML file.
echo * Author: SimoTime Enterprises
echo * Version: 07.11.01
echo *
call :PostNote "Annotate Show logical and physical field lengths."
call :PostNote "Annotate Show the field positions within the record."
call :PostNote "Annotate This is a very simple HTML Generation."
rem *
rem ****************************************************************
rem * Do the Scan, create the TEXT, DAT/IDX and HTML files...
rem * Use the IBM format for BINARY or COMP Fields.
rem *
rem * The following call to Rec1HTML requires three parameters.
rem * 1. The fully qualified name for the COBOL copy file for input
rem * 2. The fully qualified name for the HTML file to be created
rem * 3. The literal "IBM" or "MF" to determne the size of BINARY
rem * fields.
rem *
call Rec1HTML %SimoLIBR%\test0001.cpy %SimoLIBR%\HTML\test0001.htm IBM
if ERRORLEVEL = 1 set JobStatus=0010
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
@echo OFF
echo %date% %time% %~1 >> %PostNote%
echo * %IvpName% %~1
goto :EOF
rem * The preceding :EOF causes a return to caller within this CMD.
rem *
rem ****************************************************************
:EojNok
call :PostNote "ABENDING JobName %IvpName% - Job Status is %JobStatus%"
goto :End
rem *
:EojAok
call :PostNote "Produced %SimoLIBR%\HTML\test0001.htm"
call :PostNote "Finished JobName %IvpName% - Job Status is %JobStatus%"
endlocal
:End
pause
This IVP (IvpRec12.CMD) shows the generation of a single HTML document using a COBOL copy file with various numeric formats. This command will call Rec1HTML.CMD and pass it three (3) parameters. The HTML document will be created based on the Micro Focus fomat for BINARY, numeric fields.
Refer to the comments (or remarks) in the following command file for additional information.
@echo OFF
set JobStatus=0000
setlocal
if "%SimoLIBR%" == "" set SimoLIBR=c:\SimoLIBR
set PostNote=%SimoLIBR%\LOGS\SimoTIME.LOG
set IvpName=IvpRec12
call :PostNote "************************************************************%IvpName%"
call :PostNote "Starting JobName %IvpName%"
echo ************************************************************
echo * This program is provided by: *
echo * SimoTime Enterprises, LLC *
echo * (C) Copyright 1987-2008 All Rights Reserved *
echo * Web Site URL: http://www.simotime.com *
echo * e-mail: helpdesk@simotime.com *
echo ************************************************************
echo * Text: Scan a Copy file, Create a TEXT and HTML file
echo *
echo * Version: 07.11.01
call :PostNote "Annotate Shows various numeric formats."
call :PostNote "Annotate This is a moderate HTML Generation."
rem *
rem ****************************************************************
rem * Do the Scan, create the TEXT, DAT/IDX and HTML files...
rem * Use the Micro Focus (or MF) format for BINARY Fields
rem *
rem * The following call to Rec1HTML requires three parameters.
rem * 1. The fully qualified name for the COBOL copy file for input
rem * 2. The