![]() |
The SimoCARD Series Processing Files with 80-Byte Records |
| When technology complements business | Copyright © 1987-2012 SimoTime Enterprises All Rights Reserved |
| The SimoTime Home Page |
On the mainframe it is a common practice to read a record sequential file of eighty (80) byte, fixed-length records to obtain information or specifications that will affect the behavior of program execution. The eighty (80) byte records are a carry-over from the days when eighty-column cards were used. Even today these files are referred to as card files. The technique for accessing these files varies and this suite of utility programs with examples will describe a few of the possible techniques.
In addition, when an application is moved between an EBCDIC-encoded Mainframe platform and a Linux, UNIX or Windows (LUW) platform with Micro Focus it may continue to run in an EBCDIC-encoded environment or be converted to run in an ASCII-encoded environment. Furthermore, the file format may continue to be eighty (80) byte, fixed record length, record sequential files (also referred to as RSEQ) or the files may be converted to ASCII/Text files (also referred to as Line Sequential or LSEQ). Adding to all this confusion the files may be stored as data files, members in a PDS or in stream data in a JCL or PROC member. This introduces a new set of challenges.
It is important to understand the details of what these individual programs do and how they work as singular entities. However, It is more important to understand the impact of the various files formats and their encoding schema of choice when integrated into the full application environment.
This suite of programs and documentation describes the techniques for simplifying this process by using utility programs, callable I/O modules and a callable conversion routine. The I/O modules provide for read and write access of both record and line sequential files The conversion routine will convert 80-byte text strings between EBCDIC-encoding and ASCII-encoding. This process is greatly simplified when using Micro Focus on the LUW platforms.
The suite of programs uses Micro Focus COBOL and Windows Command files. The programs are unit tested with Micro Focus Net Express, version 5.1. The COBOL source code is included with the software package and may be compiled and executed on other versions of Micro Focus COBOL running on LUW platforms. The full program or system testing is done on a Windows/XP system using Micro Focus Studio, Enterprise Edition. Many of the programs are deployed on various LUW platforms using Micro Focus Server, Enterprise Edition.
This section describes the Windows command files that are used to set the environment and execute the utility programs.
This section describes the Windows command files that are used to set the environment and execute the utility programs.
| ||||
| A List of Utility Programs to Compare Files with Eighty (80) Byte Records |
This section describes the Windows command files that are used to set the environment and execute the utility programs.
| ||||||||||||||
| A List of Utility Programs to Convert Files with Eighty (80) Byte Records |
This section describes the callable routines that are used to process files that contain records with eighty characters of information.
| ||||||||||||
| A List of Callable Routines to Process Files with Eighty (80) Byte Records |
The following is a Windows Command file (CV80DOIT.CMD) that shows how to use some of the sample programs that convert file formats with 80-byte records.
@echo OFF
rem * *******************************************************************
rem * CV80DOIT - A Windows Command File *
rem * This program is provided by SimoTime Enterprises *
rem * (C) Copyright 1987-2011 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 Enterprises
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 4, 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=CV80DOIT
rem *
call SimoNOTE "*--------------------------------------------------------------------*%TaskName%"
call SimoNOTE "Starting TaskName %TaskName%"
call SimoNOTE "Identify TaskStep DeleteAsciiText"
set ALPHALS1=%DATALIBR%\Wrk1\SIMOTIME.DATADOIT.LS80ASC.TXT
if exist %ALPHALS1% del %ALPHALS1%
rem *
rem * ********************************************************************
rem * Step 2 of 4, 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 of 4, 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=%DATALIBR%\Wrk1\SIMOTIME.DATADOIT.RS80ASC.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 of 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=%DATALIBR%\Wrk1\SIMOTIME.DATADOIT.RS80EBC.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
This section provides technical detail about the supporting scripts and programs used or called by the primary jobs.
A command file (Env1BASE.CMD) is called from other command files to set commonly used environment variables. This provides a single point of definition. The following is a listing of the contents of the command file.
rem * *******************************************************************
rem * This program is provided by: *
rem * SimoTime Enterprises *
rem * (C) Copyright 1987-2012 All Rights Reserved *
rem * Web Site URL: http://www.simotime.com *
rem * e-mail: helpdesk@simotime.com *
rem * *******************************************************************
rem *
rem * Text - Set commonly used environment variables.
rem * Author - SimoTime Enterprises
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 BaseLib1=c:\DevoTek1\UTIL
set BASEAPP=c:\DevoTek1\UTIL
set BASESYS=c:\DevoTek1\UTIL\SYS1
set DATALIBR=%BASEAPP%\DATALIBR
set SYSLOG=%BASEAPP%\LOGS\SYSLOG_USER.TXT
set SYSOUT=%BASEAPP%\LOGS\SYSOUT_USER.TXT
set SimoNOTE=%BASEAPP%\LOGS\SimoNOTE_USER.TXT
set MIFOBASE="C:\Program Files (x86)\Micro Focus\Studio Enterprise Edition 6.0\Base"
set MIFOBIN=%MIFOBASE%\bin
rem *
set MAINFRAME_FLOATING_POINT=true
set CobCpy=%BASEAPP%\CobCpy1;C:\DevoTEK1\MODS\CobCpy1;c:\SimoLIBR
rem *
if not "%Env1BASE%" == "Y" set path=%MIFOBASE%;%MIFOBIN%;%PATH%;
set Env1BASE=Y
set COBPATH=.;%BASEAPP%\LOADLIB;c:\SimoLIBR
set JobStatus=0000
call SimoNOTE "* Settings CmdName Env1BASE.CMD"
The following (SimoNOTE.CMD) is a listing of the contents of the SimoNOTE.CMD command file.
@echo OFF rem * ******************************************************************* rem * This program is provided by SimoTime Enterprises * rem * (C) Copyright 1987-2012 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * rem * Text - Display message on screen and write to a log file. rem * Author - SimoTime Enterprises rem * rem * This script may be called from other scripts and expects a single rem * parameter enclosed in double quotes. The double quotes will be rem * removed. Before writing to the log file a date and time stamp rem * will be inserted in front of the message text. rem * rem * Note: The tilde (~) removes leading/trailing double-quotes. rem * if "%SimoNOTE%" == "" set SimoNOTE=c:\SimoLIBR\LOGS\SimoTime.LOG echo %date% %time% %~1>> %SimoNOTE% echo %~1
The purpose of this document is to provide information about the possible challenges of managing card image data when moving an application between a Mainframe System and a Linux, UNIX or Windows System running Micro Focus. This document may be used 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 documents and the links to other documents are intended to provide a choice of alternatives.
Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Enterprises. 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 Enterprises.
SimoTime Enterprises 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 Enterprises shall not be liable for any direct, indirect, special or consequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software, documentation or training material.
This section includes links to documents with additional information that is beyond the scope and purpose of this document.
A good place to start is The SimoTime Home Page for access to white papers, program examples and product information.
Note: You must be attached to the Internet to view the SimoTime Web Site or download a Z-Pack.
Explore The File Status Return Codes to interpret the results of accessing VSAM data sets and QSAM files.
Check out The SimoTime Glossary for a list of terms and definitions used in the documents provided by SimoTime.
This document was created and is maintained by SimoTime Enterprises.
If you have any questions, suggestions, comments or feedback please call or send an e-mail to: helpdesk@simotime.com
We appreciate hearing from you.
Founded in 1987, SimoTime Enterprises is a privately owned company. We specialize in the creation and deployment of business applications using new or existing technologies and services. We have a team of individuals that understand the broad range of technologies being used in today's environments. This includes the smallest thin client using the Internet and the very large mainframe systems. There is more to making the Internet work for your company's business than just having a nice looking WEB site. It is about combining the latest technologies and existing technologies with practical business experience. It's about the business of doing business and looking good in the process. Quite often, to reach larger markets or provide a higher level of service to existing customers it requires the newer Internet technologies to work in a complementary manner with existing corporate mainframe systems.
Whether you want to use the Internet to expand into new market segments or as a delivery vehicle for existing business functions simply give us a call or check the web site at http://www.simotime.com
| Return-to-Top |
| The SimoCARD Series - Record Content Conversion for Files with 80-Byte Records |
| Copyright © 1987-2012 SimoTime Enterprises All Rights Reserved |
| When technology complements business |
| http://www.simotime.com |