Variable Length Records Micro Focus COBOL & File Formats |
The SimoTime Home Page |
This suite of programs provides examples that will create, access and convert sequential files that use variable-length-records.
| ||||||
File Types with Transfer and Convert Description |
In the preceding table the use of the CHARSET(EBCDIC) directive with IBMCOMP and NOTRUNC directives are referenced as requirements. The scope of effort required to translate the records between EBCDIC and ASCII is directly proportional to the number and location of the Signed-Numeric, Packed and Binary fields. Additional complexities are introduced if "REDEFINES" and "OCCURS DEPENDING ON" capabilities are used. With the CHARSET(EBCDIC) directive it is not necessary to do ASCII/EBCDIC translation.
The source code for the COBOL programs is written to be compiled in a Micro Focus environment on a Windows platform. Windows Command (.CMD) files are provided to run the jobs on a PC with Micro Focus Net Express.
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-2025
SimoTime Technologies and Services
All Rights Reserved
The following is a list of the functions provided in this example.
| ||||||||||||
Describe Various File Access Methods and Data Conversion Techniques |
The primary input data is created by executing the CRTALFE1.cmd Windows command file. Next, a multi-step job is used to describe and demonstrate various file conversions of sequential files with variable length records. The output of one step becomes the input to the next step. The sequence of file conversion steps will eventually create a file that should be equal in content and format as the primary input file. The two files are compared and this should produce an equal result.
This suite of samples programs will run on the following platforms.
| ||||||
Operating Systems and Supporting Software for Program Execution |
The following diagram is an overview of how the demonstration programs fit into the example.
Color Associations: The The Command FilesThis example has three (3) Windows Command Files. The 1st CMD File is used to create the three (3) files used as a base for the conversion and comparison examples. The 2nd CMD File does a number of file format and file content conversions. File compares are done at the end of the conversion steps. The 3rd CMD File is used to view the contents of the ZOS formatted file in a hexadecimal dump format. Create the ALPHA Test FilesThe following is the Windows Command file (CRTALFE1.cmd) required to create the three primary files used in this example. @echo OFF rem * ******************************************************************* rem * CRTALFE1.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 a Sequential Data Set on disk using ECHO function. rem * Author - SimoTime Technologies rem * Date - January 24, 1996 rem * rem * The 1st step will delete any previously created file. rem * rem * The 2nd step will created a new TEXT file. This step will use the rem * Windows ECHO with instream data. rem * rem * The 3rd step will read the text file and convert to a Record rem * sequential file of ASCII-encoded, fixed-length, eighty-byte records. rem * A COBOL program is used to do the File Format conversion. rem * rem * The 4th step will read the text file and convert to a Record rem * sequential file of EBCDIC-encoded, fixed-length, eighty-byte records. rem * A COBOL program is used to do the File Format and File Content rem * conversion. rem * rem * This set of programs will run on a Personal Computer with rem * Windows and Micro Focus Net Express. rem * ******************************************************************** rem * Step 1 of 2 Set the global environment variables, rem * Delete any previously created file... rem * call ..\Env1BASE if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG set TaskName=CRTALFE1 rem * call SimoNOTE "*--------------------------------------------------------------*%TaskName%" call SimoNOTE "Starting TaskName %TaskName%" call SimoNOTE "Identify TaskStep DeleteAsciiText" set ALPHALS1=%BaseLib1%\DATA\Wrk1\SIMOTIME.DATA.ALPHALS1.TXT if exist %ALPHALS1% del %ALPHALS1% rem * rem * ******************************************************************* rem * Step 2 of 2 Create and populate a new TEXT file... rem * :CreateAsciiText call SimoNOTE "Identify TaskStep CreateAsciiText" rem *...:....1....:....2....:....3....:....4....:....5....:....6....:....7....:....8 echo 000000000001 A>>%ALPHALS1% echo 000000000002 AB>>%ALPHALS1% echo 000000000003 ABC>>%ALPHALS1% echo 000000000004 ABCD>>%ALPHALS1% echo 000000000005 ABCDE>>%ALPHALS1% echo 000000000006 ABCDEF>>%ALPHALS1% echo 000000000007 ABCDEFG>>%ALPHALS1% echo 000000000008 ABCDEFGH>>%ALPHALS1% echo 000000000009 ABCDEFGHI>>%ALPHALS1% echo 000000000010 ABCDEFGHIJ>>%ALPHALS1% echo 000000000011 ABCDEFGHIJK>>%ALPHALS1% echo 000000000012 ABCDEFGHIJKL>>%ALPHALS1% echo 000000000013 ABCDEFGHIJKLM>>%ALPHALS1% echo 000000000014 ABCDEFGHIJKLMN>>%ALPHALS1% echo 000000000015 ABCDEFGHIJKLMNO>>%ALPHALS1% echo 000000000016 ABCDEFGHIJKLMNOP>>%ALPHALS1% echo 000000000017 ABCDEFGHIJKLMNOPR>>%ALPHALS1% echo 000000000018 ABCDEFGHIJKLMNOPQR>>%ALPHALS1% echo 000000000019 ABCDEFGHIJKLMNOPQRS>>%ALPHALS1% echo 000000000020 ABCDEFGHIJKLMNOPQRST>>%ALPHALS1% echo 000000000021 ABCDEFGHIJKLMNOPQRSTU>>%ALPHALS1% echo 000000000022 ABCDEFGHIJKLMNOPQRSTUV>>%ALPHALS1% echo 000000000023 ABCDEFGHIJKLMNOPQRSTUVW>>%ALPHALS1% echo 000000000024 ABCDEFGHIJKLMNOPQRSTUVWX>>%ALPHALS1% echo 000000000025 ABCDEFGHIJKLMNOPQRSTUVWXY>>%ALPHALS1% echo 000000000026 ABCDEFGHIJKLMNOPQRSTUVWXYZ>>%ALPHALS1% echo 000000000027 ABCDEFGHIJKLMNOPQRSTUVWZXZabcdefghijklmnopqrstuvwxtz1234567890>>%ALPHALS1% echo 000000000028 ABCDEFGHIJKLMNOPQRSTUVWXYZ>>%ALPHALS1% echo 000000000029 ABCDEFGHIJKLMNOPQRSTUVWXY>>%ALPHALS1% echo 000000000030 ABCDEFGHIJKLMNOPQRSTUVWX>>%ALPHALS1% echo 000000000031 ABCDEFGHIJKLMNOPQRSTUVW>>%ALPHALS1% echo 000000000032 ABCDEFGHIJKLMNOPQRSTUV>>%ALPHALS1% echo 000000000033 ABCDEFGHIJKLMNOPQRSTU>>%ALPHALS1% echo 000000000034 ABCDEFGHIJKLMNOPQRST>>%ALPHALS1% echo 000000000035 ABCDEFGHIJKLMNOPQRS>>%ALPHALS1% echo 000000000036 ABCDEFGHIJKLMNOPQR>>%ALPHALS1% echo 000000000037 ABCDEFGHIJKLMNOPQ>>%ALPHALS1% echo 000000000038 ABCDEFGHIJKLMNOR>>%ALPHALS1% echo 000000000039 ABCDEFGHIJKLMNO>>%ALPHALS1% echo 000000000040 ABCDEFGHIJKLMN>>%ALPHALS1% echo 000000000041 ABCDEFGHIJKLM>>%ALPHALS1% echo 000000000042 ABCDEFGHIJKL>>%ALPHALS1% echo 000000000043 ABCDEFGHIJK>>%ALPHALS1% echo 000000000044 ABCDEFGHIJ>>%ALPHALS1% echo 000000000045 ABCDEFGHI>>%ALPHALS1% echo 000000000046 ABCDEFGH>>%ALPHALS1% echo 000000000047 ABCDEFG>>%ALPHALS1% echo 000000000048 ABCDEF>>%ALPHALS1% echo 000000000049 ABCDE>>%ALPHALS1% echo 000000000050 ABCD>>%ALPHALS1% echo 000000000051 ABC>>%ALPHALS1% echo 000000000052 AB>>%ALPHALS1% echo 000000000053 A>>%ALPHALS1% echo 000000000054 a>>%ALPHALS1% echo 000000000055 ab>>%ALPHALS1% echo 000000000056 abc>>%ALPHALS1% echo 000000000057 abcd>>%ALPHALS1% echo 000000000058 abcde>>%ALPHALS1% echo 000000000059 abcdef>>%ALPHALS1% echo 000000000060 abcdefg>>%ALPHALS1% echo 000000000061 abcdefgh>>%ALPHALS1% echo 000000000062 abcdefghi>>%ALPHALS1% echo 000000000063 abcdefghij>>%ALPHALS1% echo 000000000064 abcdefghijk>>%ALPHALS1% echo 000000000065 abcdefghijkl>>%ALPHALS1% echo 000000000066 abcdefghijklm>>%ALPHALS1% echo 000000000067 abcdefghijklmn>>%ALPHALS1% echo 000000000068 abcdefghijklmno>>%ALPHALS1% echo 000000000069 abcdefghijklmnop>>%ALPHALS1% echo 000000000070 abcdefghijklmnopr>>%ALPHALS1% echo 000000000071 abcdefghijklmnopqr>>%ALPHALS1% echo 000000000072 abcdefghijklmnopqrs>>%ALPHALS1% echo 000000000073 abcdefghijklmnopqrst>>%ALPHALS1% echo 000000000074 abcdefghijklmnopqrstu>>%ALPHALS1% echo 000000000075 abcdefghijklmnopqrstuv>>%ALPHALS1% echo 000000000076 abcdefghijklmnopqrstuvw>>%ALPHALS1% echo 000000000077 abcdefghijklmnopqrstuvwx>>%ALPHALS1% echo 000000000078 abcdefghijklmnopqrstuvwxy>>%ALPHALS1% echo 000000000079 abcdefghijklmnopqrstuvwxyz>>%ALPHALS1% echo 000000000080 abcdefghijklmnopqrstuvwzxz0123456789>>%ALPHALS1% echo 000000000081 abcdefghijklmnopqrstuvwxyz>>%ALPHALS1% echo 000000000082 abcdefghijklmnopqrstuvwxy>>%ALPHALS1% echo 000000000083 abcdefghijklmnopqrstuvwx>>%ALPHALS1% echo 000000000084 abcdefghijklmnopqrstuvw>>%ALPHALS1% echo 000000000085 abcdefghijklmnopqrstuv>>%ALPHALS1% echo 000000000086 abcdefghijklmnopqrstu>>%ALPHALS1% echo 000000000087 abcdefghijklmnopqrst>>%ALPHALS1% echo 000000000088 abcdefghijklmnopqrs>>%ALPHALS1% echo 000000000089 abcdefghijklmnopqr>>%ALPHALS1% echo 000000000090 abcdefghijklmnopq>>%ALPHALS1% echo 000000000091 abcdefghijklmnor>>%ALPHALS1% echo 000000000092 abcdefghijklmno>>%ALPHALS1% echo 000000000093 abcdefghijklmn>>%ALPHALS1% echo 000000000094 abcdefghijklm>>%ALPHALS1% echo 000000000095 abcdefghijkl>>%ALPHALS1% echo 000000000096 abcdefghijk>>%ALPHALS1% echo 000000000097 abcdefghij>>%ALPHALS1% echo 000000000098 abcdefghi>>%ALPHALS1% echo 000000000099 abcdefgh>>%ALPHALS1% echo 000000000100 abcdefg>>%ALPHALS1% echo 000000000101 abcdef>>%ALPHALS1% echo 000000000102 abcde>>%ALPHALS1% echo 000000000103 abcd>>%ALPHALS1% echo 000000000104 abc>>%ALPHALS1% echo 000000000105 ab>>%ALPHALS1% echo 000000000106 a>>%ALPHALS1% if not exist %ALPHALS1% set JobStatus=0020 if not "%JobStatus%" == "0000" goto EojNok call SimoNOTE "DataMake ALPHALS1=%ALPHALS1%" rem * :ConvertLSEQtoRSEQasc rem * rem * ******************************************************************* rem * Step 3, Read the previously created Line Sequential File (LSEQ) rem * and write a Record Sequential File (RSEQ) with 80-byte, rem * ASCII-encoded records. rem * call SimoNOTE "Identify TaskStep ConvertLSEQtoRSEQasc" set GETLS080=%ALPHALS1% set PUTRS080=%BaseLib1%\DATA\Wrk1\SIMOTIME.DATA.ALPHARSA.DAT if exist %PUTRS080% del %PUTRS080% run CV80ALAR if not exist %PUTRS080% set JobStatus=0030 if not "%JobStatus%" == "0000" goto EojNok call SimoNOTE "DataTake GETLS080=%GETLS080%" call SimoNOTE "DataMake PUTRS080=%PUTRS080%" rem * :ConvertLSEQtoRSEQebc rem * rem * ******************************************************************* rem * Step 4, Read the previously created Line Sequential File (LSEQ) rem * and write a Record Sequential File (RSEQ) with 80-byte, rem * EBCDIC-encoded records. rem * call SimoNOTE "Identify TaskStep ConvertLSEQtoRSEQebc" set GETLS080=%ALPHALS1% set PUTRS080=%BaseLib1%\DATA\Wrk1\SIMOTIME.DATA.ALPHARSE.DAT if exist %PUTRS080% del %PUTRS080% run CV80ALER if not exist %PUTRS080% set JobStatus=0040 if not "%JobStatus%" == "0000" goto EojNok call SimoNOTE "DataTake GETLS080=%GETLS080%" call SimoNOTE "DataMake PUTRS080=%PUTRS080%" :EojAok call SimoNOTE "Finished TaskName %TaskName%, Job Status is %JobStatus%" goto :End :EojNok call SimoNOTE "ABENDING TaskName %TaskName%, Job Status is %JobStatus%" :End call SimoNOTE "Conclude SysLog is %SYSLOG%" if not "%1" == "nopause" pause File Format & Content ConversionsThe following is the command file (CBLVLRE1.cmd) that is used to do the various file conversions and comparisons. @echo OFF rem * ******************************************************************* rem * CBLVLRE1.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 - Data File Conversion, Variable Length Records rem * Author - SimoTime Technologies rem * Date - May 04, 2004 rem * Version - 04.03.12 rem * rem * This set of programs illustrate how to port a file with variable rem * length records to a Micro Focus platform using Net Express. rem * rem * When running with Net Express the IBMCOMP an NOTRUNC directives rem * will be required to maintain compatability with the mainframe rem * format and field sizes for binary fields. rem * rem * This set of programs will run on a Personal Computer with Windows rem * and Micro Focus Net Express. rem * rem * With two eceptions the files are processed using the standard COBOL rem * coding techniques with the SELECT and FD statements. The two rem * exceptions are the mainframe image files (FTEDBV01 and FTEDBV02) rem * files that are variable length records. These files are processed rem * using the Micro Focus Byte-Stream-Input-Output (BSIO) access method. rem * The mainframe image files may also be downloaded from the mainframe rem * using FTP and MODE BINARY. rem * rem * ******************************************************************** rem * Step 1 of 10, Set the common environment variables... rem * if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG set CmdName=CblVlrE1 call ..\Env1BASE rem * call SimoNOTE "**********************************************************************%CmdName%" call SimoNOTE "Starting CmdName %CmdName%" rem * ******************************************************************** rem * Step 2 of 10, Create the ALPHA Files... rem * call SimoNOTE "Identify JobStep Create the Alpha Files" call CrtAlfE1 nopause rem * ******************************************************************** rem * Step 3 of 10, Read RSEQ, EBCDIC, 80 and write ZOS Variable 4-32760 rem * call SimoNOTE "*--------------------------------------------------------------------*" call SimoNOTE "Annotate Read RSEQ, EBCDIC, Fixed-80 and write ZOS Variable 4-32760" set ALPHARSE=%BaseLib1%\DATA\Wrk1\SIMOTIME.DATA.ALPHARSE.DAT set BSIODSN1=%BaseLib1%\DATA\Wrk1\SIMOTIME.DATA.ALPHAZ01.ZOS set BSIOFMT1=V run CblVlrC2 if ERRORLEVEL = 1 set JobStatus=0030 if not "%JobStatus%" == "0000" goto :EojNOK call SimoNOTE "DataTake ALPHARSE=%ALPHARSE%" call SimoNOTE "DataMake BSIODSN1=%BSIODSN1%" rem * ******************************************************************** rem * Step 4 of 10 Read ZOS Variable and write MF Variable... rem * call SimoNOTE "*--------------------------------------------------------------------*" call SimoNOTE "Annotate Read ZOS Variable 4-32760 and write MF Variable 4-32760" set BSIODSN1=%BaseLib1%\DATA\Wrk1\SIMOTIME.DATA.ALPHAZ01.ZOS set ALPHAV01=%BaseLib1%\DATA\Wrk1\SIMOTIME.DATA.ALPHAV01.DAT run CblVlrC3 if ERRORLEVEL = 1 set JobStatus=0040 if not "%JobStatus%" == "0000" goto :EojNOK call SimoNOTE "DataTake BSIODSN1=%BSIODSN1%" call SimoNOTE "DataMake ALPHAV01=%ALPHAV01%" rem * ******************************************************************** rem * Step 5 of 10 Read MF Variable and write ZOS Variable... rem * call SimoNOTE "*--------------------------------------------------------------------*" call SimoNOTE "Annotate Read MF Variable 4-32760 and write ZOS Variable 4-32760" set ALPHAV01=%BaseLib1%\DATA\Wrk1\SIMOTIME.DATA.ALPHAV01.DAT set BSIODSN2=%BaseLib1%\DATA\Wrk1\SIMOTIME.DATA.ALPHAZ02.ZOS set BSIOFMT1=V run CblVlrC4 if ERRORLEVEL = 1 set JobStatus=0050 if not "%JobStatus%" == "0000" goto :EojNOK call SimoNOTE "DataTake ALPHAV01=%ALPHAV01%" call SimoNOTE "DataMake BSIODSN2=%BSIODSN2%" rem * ******************************************************************** rem * Step 6 of 10 Read ZOS Variable and write SEQUENTIAL Fixed... rem * call SimoNOTE "*--------------------------------------------------------------------*" call SimoNOTE "Annotate Read ZOS Variable 4-32760 and write RSEQ EBCDIC Fixed-80" set BSIODSN2=%BaseLib1%\DATA\Wrk1\SIMOTIME.DATA.ALPHAZ02.ZOS set ALPHARS2=%BaseLib1%\DATA\Wrk1\SIMOTIME.DATA.ALPHARS2.DAT run CblVlrC5 if ERRORLEVEL = 1 set JobStatus=0060 if not "%JobStatus%" == "0000" goto :EojNOK call SimoNOTE "DataTake BSIODSN2=%BSIODSN2%" call SimoNOTE "DataMake ALPHARS2=%ALPHARS2%" rem * ******************************************************************** rem * Step 7 of 10 Read SEQUENTIAL-FIXED and write ASCII/Text... rem * call SimoNOTE "*--------------------------------------------------------------------*" call SimoNOTE "Annotate Read RSEQ EBCDIC Fixed-80 and write LSEQ ASCII Variable" set ALPHARS2=%BaseLib1%\DATA\Wrk1\SIMOTIME.DATA.ALPHARS2.DAT set ALPHALS2=%BaseLib1%\DATA\Wrk1\SIMOTIME.DATA.ALPHALS2.TXT run CblVlrC6 if ERRORLEVEL = 1 set JobStatus=0070 if not "%JobStatus%" == "0000" goto :EojNOK call SimoNOTE "DataTake ALPHARS2=%ALPHARS2%" call SimoNOTE "DataMake ALPHALS2=%ALPHALS2%" rem * ******************************************************************** rem * Step 8 of 10 Compare ASCII/Text Files... rem * call SimoNOTE "*--------------------------------------------------------------------*" call SimoNOTE "Annotate Compare ASCII/Text Files..." set LS80UT01=%BaseLib1%\DATA\Wrk1\SIMOTIME.DATA.ALPHALS1.TXT set LS80UT02=%BaseLib1%\DATA\Wrk1\SIMOTIME.DATA.ALPHALS2.TXT run CBLVLRC1 if ERRORLEVEL = 1 set JobStatus=0080 if not "%JobStatus%" == "0000" goto :EojNOK call SimoNOTE "DataTake LS80UT01=%LS80UT01%" call SimoNOTE "DataTake LS80UT02=%LS80UT02%" rem * ******************************************************************** rem * Step 9 of 10 Read MF-VARABLE-EBCDIC and write ASCII/Text... rem * call SimoNOTE "*--------------------------------------------------------------------*" call SimoNOTE "Annotate Read RSEQ EBCDIC Variable 4-32760, write LSEQ ASCII Variable" set ALPHAV01=%BaseLib1%\DATA\Wrk1\SIMOTIME.DATA.ALPHAV01.DAT set ALPHALS3=%BaseLib1%\DATA\Wrk1\SIMOTIME.DATA.ALPHALS3.TXT run CblVlrC7 if ERRORLEVEL = 1 set JobStatus=0090 if not "%JobStatus%" == "0000" goto :EojNOK call SimoNOTE "DataTake ALPHAV01=%ALPHAV01%" call SimoNOTE "DataMake ALPHALS3=%ALPHALS3%" rem * ******************************************************************** rem * Step 10 of 10 Compare ASCII/Text Files... rem * call SimoNOTE "*--------------------------------------------------------------------*" call SimoNOTE "Annotate Compare ASCII/Text Files..." set LS80UT01=%BaseLib1%\DATA\Wrk1\SIMOTIME.DATA.ALPHALS1.TXT set LS80UT02=%BaseLib1%\DATA\Wrk1\SIMOTIME.DATA.ALPHALS3.TXT run CBLVLRC1 if ERRORLEVEL = 1 set JobStatus=0100 if not "%JobStatus%" == "0000" goto :EojNOK call SimoNOTE "DataTake LS80UT01=%LS80UT01%" call SimoNOTE "DataTake LS80UT02=%LS80UT02%" :EojAOK call SimoNOTE "*--------------------------------------------------------------------*" call SimoNOTE "Finished CmdName %CmdName%, Job Status is %JobStatus%" goto :End :EojNOK call SimoNOTE "*--------------------------------------------------------------------*" call SimoNOTE "ABENDING CmdName %CmdName%, Job Status is %JobStatus%" goto :End :End call SimoNOTE "Conclude SysLog is %SYSLOG%" if not "%1" == "nopause" pause Hex Dump Utility for a ZOS/V FileThe following is the command file (CBLVLRX3.cmd) that is used to dump the first 10,000 bytes a ZOS formatted sequential file with variable length records with the size varying from 4 to 32,760 bytes. @echo OFF rem * ******************************************************************* rem * CBLVLRX3.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 - Hex Dump of 1st 10,000 bytes of a file. rem * Author - SimoTime Technologies rem * Date - May 04, 2004 rem * Version - 04.03.12 rem * rem * This set of programs illustrate how to provide a hexdump rem * display of a file. rem * rem * This job uses the SIMOZAPS Utility program and the SIMOMODS rem * callable programs to dump the contents of file in a hexadecimal rem * format with possible ASCII and EBCDIC interpretations. rem * rem * The installation of the SimoTime Technologies will be required rem * to run this job. rem * rem * ******************************************************************** rem * Step 1 of 3, Set the common environment variables... rem * if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG set CmdName=CblVlrX3 call ..\Env1BASE rem * Override SYSLOG for Hex Dump... set SYSLOG=%BASESYS%\LOGS\SYSLOG_HEXDUMP.TXT if exist %SYSLOG% erase %SYSLOG% rem * call SimoNOTE "*******************************************************%CmdName%" call SimoNOTE "Starting CmdName %CmdName%" rem * ******************************************************************** rem * Step 2 of 3, Hex-Dump of file... rem * call SimoNOTE "Identify JobStep Hex-Dump of file" set BSIODSN1=%BaseLib1%\DATA\Wrk1\SIMOTIME.DATA.ALPHAZ01.ZOS run SIMOZAPS HEXCESS %BSIODSN1% View=1 stop=10000 if ERRORLEVEL = 1 set JobStatus=0020 if not "%JobStatus%" == "0000" goto :EojNOK call SimoNOTE "DataTake BSIODSN1=%BSIODSN1%" call SimoNOTE "DataMake SYSLOG=%SYSLOG%" rem * ******************************************************************** rem * Step 3 of 3, Use NotePAD to display Hex-Dump of file... rem * if exist %SYSLOG% start NotePAD %SYSLOG% :EojAOK call SimoNOTE "*------------------------------------------------------" call SimoNOTE "Finished CmdName %CmdName%, Job Status is %JobStatus%" goto :End :EojNOK call SimoNOTE "*------------------------------------------------------" call SimoNOTE "ABENDING CmdName %CmdName%, Job Status is %JobStatus%" goto :End :End call SimoNOTE "Conclude SysLog is %SYSLOG%" if not "%1" == "nopause" pause The COBOL ProgramsThis suite of programs has seven (7) COBOL programs. One program is used to compare the ASCII/Text files and the remaining six programs do the various data file conversions. This suite of programs will make calls to common utility programs and callable routines that are available from SimoTime. Therefore, the "SIMOMODS Technologies" or the SimoTime "Enterprise Application Support and Data Management Technologies" will be required. The following abbreviations are used to reference certain file types.
Compare the FilesThe COBOL source code (CBLVLRC1.cbl) for the program that compares two ASCII/Text files is available in a separate document. Review the COBOL Source Code for the program that compares two data files. Convert the FilesThe following six programs will perform various file format and record content conversions. Fixed/80 RSEQ to Variable z4-32760The COBOL source code (CBLVLRC2.cbl) for the program that converts a record sequential file with 80 bytes fixed length records to a mainframe (or ZOS) formatted sequential file with variable length records with the size varying from 4 to 32,760 bytes is available in a separate document. Review the COBOL Source Code for this conversion program. Variable z4-32760 to Variable v4-32760The COBOL source code (CBLVLRC3.cbl) for the program that converts a Mainframe (or ZOS) formatted sequential file with variable length records with the size varying from 4 to 32,760 bytes to a Micro Focus Sequential file with variable length records with the size varying from 4 to 32,760 bytes. Review the COBOL Source Code for this conversion program. Variable v4-32760 to Variable z4-32760/EBCThe COBOL source code (CBLVLRC4.cbl) for the program that converts a Micro Focus formatted sequential file with variable length records with the size varying from 4 to 32,760 bytes to a Mainframe (or ZOS) Sequential file with variable length records with the size varying from 4 to 32,760 bytes. Review the COBOL Source Code for this conversion program. Variable z4-32760 to Fixed/80 RSEQThe COBOL source code (CBLVLRC5.cbl) for the program that converts a Mainframe (or ZOS) formatted sequential file with variable length records with the size varying from 4 to 32,760 bytes to a Micro Focus Record Sequential file with fixed length records with a record size of 80 bytes. Review the COBOL Source Code for this conversion program. Fixed/80 RSEQ to ASCII/TextThe COBOL source code (CBLVLRC6.cbl) for the program that converts a Record Sequential file formatted with fixed length 80 byte records to a Micro Focus Line Sequential (or ASCII/Text) file with fixed length records with a record size of 80 bytes. Review the COBOL Source Code for this conversion program. Variable v4-32760 to ASCII/TextThe COBOL source code (CBLVLRC7.cbl) for the program that converts a Micro Focus formatted sequential file with variable length records with the size varying from 4 to 32,760 bytes to a Micro Focus Line Sequential (or ASCII/Text) file with a maximum record size of 80 bytes. Review the COBOL Source Code for this conversion program. SummaryThis 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 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 Contact or Feedback section of this document.
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. Downloads and LinksThis section includes links to documents with additional information that are beyond the scope and purpose of this document. The first sub-section requires an Internet connection, the second sub-section references locally available documents. Note: A SIMOTIME License is required for the items to be made available on a local server. Current Server or Internet AccessThe following links may be to the current server or to the Internet. Explore How to access and process Record Sequential files with variable length records. The processing techniques include file create, convert, compare and view in a Hex Dump format. Explore How to FTP (using BINARY mode) a File with Variable Length Records from a Mainframe System to a Windows System and then convert the Mainframe format to a Micro Focus format. The mainline program will call the SIMOVREC and SIMOBSIO modules that are available from SimoTime in a separate package. 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 that are used to interpret the results of accessing VSAM data sets and/or QSAM files. Explore the File Formats and various Numeric Formats being used in a multi-system complex consisting of Mainframe (z/OS), Linux, UNIX or Windows systems. Internet Access RequiredThe following links will require an Internet connect. This suite of programs and documentation is available for download. Link to an Evaluation zPAK Option that includes the program members, documentation and control files. Explore The Micro Focus Web Site for more information about products (including Micro Focus COBOL) and services available from Micro Focus. This link requires an Internet Connection. 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 Glossary of TermsExplore the Glossary of Terms for a list of terms and definitions used in this suite of documents and white papers. Contact or FeedbackThis document was created and is maintained by SimoTime Technologies. If you have any questions, suggestions, comments or feedback please use the following contact information.
We appreciate hearing from you. Company OverviewSimoTime 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
|