|
File Convert & Share Mainframe, Windows, UNIX and Linux |
![]() |
| The SimoTime Home Page |
There are many options available when moving and converting data between an IBM Mainframe System and a Windows, Linux or UNIX System. This document will discuss the cycle of how to convert a VSAM, KSDS to a flat Sequential file on the mainframe, download the flat sequential file from the Mainframe System to a Windows, UNIX or Linux System and create an Indexed file of ASCII content using Micro Focus.
A general guideline to follow is, "The scope of effort for converting a mainframe legacy file from EBCDIC to ASCII is directly proportional to the size of the file, the age of the file and the number and type of numeric fields." Estimating the time for conversion between EBCDIC and ASCII can be done with a high degree of accuracy. Estimating the time for "scrubbing the data" may be a challenging task.
Additional programs are included for converting ASCII, Text files to Indexed files. These examples also show how to manage Packed-Decimal and BINARY or COMP fields.
In the world of programming there are many ways to solve a problem. This suite of programs is provided as an example of one of the possible solutions to the problems of file conversion. The intent is to keep the programming effort simple and do the conversion as quickly as possible.
The programs have been tested on an IBM mainframe, Mainframe Express from Micro Focus and Net Express from Micro Focus. Sample projects may be obtain for Mainframe Express and Net Express by sending an e-mail to: helpdesk@simotime.com
Note: The source code and documentation for this suite of examples is available from the SimoTime Library under Download Directory at www.simotime.com
This is an example of how a COBOL program can read a VSAM Keyed Sequential Data Set (KSDS) with EBCDIC content and create a sequential file with EBCDIC content. The example then describes how to translate the EBCDIC content to ASCII and write an ASCII file. At first glance the conversion between EBCDIC and ASCII appears to be a simple and practical task. Typically the EBCDIC files reside on a mainframe legacy system. These files may be very large and may have been updated over a period on many years. In addition to containing displayable EBCDIC characters the records may contain binary and packed decimal fields that cannot simply be converted using an EBCDIC/ASCII table. Also, some of the fields in a record may contains low-values (i.e. x'00') that are being handle as a space characters on the mainframe. The low-values remain low-values when converted to ASCII and when downloaded or ported to the PC these low-values may be treated as null characters and this could present a problem if not addressed in the initial conversion process.
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 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.
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 provides a list of terms or abbreviations used when referring to the various file types and record structures.
| Term | Description of File Format |
|---|---|
| KSDS | File Format for a Key Sequencd Data Set or Indexedl File. The record structure contains a data area for the user records and an index area that contains a user defined key that is used to access the file in a sequential or randowm methodology. The record content may include text strings that conform to the ASCII or EBCDIC encoding schema. Numeric values may use a Zoned-Decimal, Packed-Decimal or Binary format.. |
| LSEQ | File Format for a Line Sequential File or ASCII/Text File. By default the record content should conform to the ASCII encoding schema. |
| RSEQ | File Format for a Record Sequential File. The record content may include text strings that conform to the ASCII or EBCDIC encoding schema. Numeric values may use a Zoned-Decimal, Packed-Decimal or Binary format. |
| Term | Description of Record Structure and Content |
| CSV | Comma Separated Values is a record structure containing variable length fields of text characters. Each field is separated by a delimiter character that is typically a comma. |
| FFL | Fixed Field Length is a record structure that contains fixed length fields. Each field may contain text or binary data. |
| Term | Description is a hybrid of the File Format and Record Structure |
| LCSV | Line Sequential file with a CSV Record Structure. |
| RFFL | Record Sequential file with a Fixed Field Length record structure. |
The preceding provides a list of terms or abbreviations used when referring to the various file types and record structures.
The programs and data files used in this example use a file naming format that is eight (8) characters long with a three (3) character extension.
The member names used in this suite of examples are eight (8) characters long with a three (3) character extension.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Naming Convention for Programs |
The data files used in this example are eight (8) characters long with a three (3) character extension.
| ||||||||||||||||||||||||||||||||
| Naming Convention for Data Files |
The following shows the file conversion cycle or process when transferring files between the host system (in this example the host system is an IBM mainframe) and the PC/Windows environment. This illustration also shows the process for converting between ASCII/Text files and Indexed files using Micro Focus Enterprise Server.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Note:1 The jobs in this environment are scripted using JCL members. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Note:2 The jobs in this environment are scripted using Windows CMD files. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| TEXT-FFL: used to reference an ASCII/Text file with a record structure of Fixed-Field lengths and starting positions. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| TEXT-CSV: used to reference an ASCII/Text file with a record structure of variable-field-lengths separated by a delimiter character or comma. |
| Logic Cycles for Data File Conversion shown by Mainframe, Server and User Workstation |
Color Associations: The
This section contains a number of programs to do data conversion. This includes File-Format Conversion and Record-Content conversion. An example of file format conversion would be reading a VSAM, KSDS and writing the records to a sequential file. An example of record content conversion would be changing the information or structure of a record such as converting between the EBCDIC and ASCII encoding schemas.
This suite of programs is dependent on other SimoTime Technologies to perform certain tasks. Therefore, it will be necessary to install the SimoTime Enterprise Technology and configure the environment prior to attempting to execute this suite of programs.
This link provides information about Configuring an Enterprise System to execute mainframe-oriented applications and manage the traditional data file structures.
The following four sub-sections of this document will describe the process for setting the environment, using the predefined command files, generating the conversion programs, compiling the programs and creating a VSAM, KSDS to be used as a starting point and baseline reference.
This section provides information about the tools used to prepare the environment that will support an application migration and the associated data conversion processes. Explore Setting the Environment and the Shared Program Members for additional details.
The following member (DXCONVW1.cmd) is the Windows command file that is used for generating the COBOL source code.
@echo OFF
set CmdName=DXCONVW1
rem * *******************************************************************
rem * DXCONVW1.CMD - a Windows Command File *
rem * This Job Script is provided by SimoTime Enterprises *
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 calls the following Windows Command Files.
rem * 1. Env1Base.CMD - this provides a single point for setting
rem * commonly used environment variables.
rem * 2. USERCONV.CMD - this provides a single point for setting
rem * conversion-oriented environment variables.
rem * 3. SimoNOTE.CMD - this provides a consistent process for
rem * displaying messages to the screen and writing
rem * to a journal or log file.
rem * 4. SIMOCONV.CMD - this will do the actual genertion of the
rem * specified programs based on the content of
rem * the Process Control File.
rem * *******************************************************************
call ..\ENV1BASE
call USERCONV
rem *
call SimoNOTE "********************************************************************%CmdName%.CMD"
call SimoNOTE "Starting JobName %CmdName%.CMD"
rem *
rem * Set the environment variable to use the default directives file.
set AOK_Count=0
set NOK_Count=0
set SIMOGENS=BATCH
set SIMODROP=Y
rem * Generate the COBOL source code for Mainframe Conversions Programs
CALL SIMOCONV KSXSQX01
CALL SIMOCONV SQXKSX01
CALL SIMOCONV SQXKSX02
rem * Generate the COBOL source code for Server Conversions Programs
CALL SIMOCONV SQEKSA01
CALL SIMOCONV KSASQE01
rem * Generate the COBOL source code for User Conversions Programs
CALL SIMOCONV CUMKTX05
CALL SIMOCONV CUTKTX05
CALL SIMOCONV CUSEXT05
CALL SIMOCONV CUSIMPL5
CALL SIMOCONV CUSIMPU5
rem *
call SimoNOTE "AOKcount Compile Count for AOK is %AOK_Count% "
call SimoNOTE "NOKcount Compile Count for NOK is %NOK_Count% "
call SimoNOTE "Finished JobName %CmdName%.CMD "
pause
The following member (DXBLDLW8.cmd) is the Windows command file that is used for compiling the COBOL source code.
@echo off
echo *********************************************************************
echo * DXBLDLW8.CMD - a Windows Command File *
echo * This program is provided by SimoTime Technologies *
echo * (C) Copyright 1987-2015 All Rights Reserved *
echo * Web Site URL: http://www.simotime.com *
echo * e-mail: helpdesk@simotime.com *
echo *********************************************************************
rem *
rem * This command will read a file that contains a list of COBOL batch
rem * programs without SQL and call ZCBL2GNT to compile each member.
rem *
rem * This procedure calls the following Windows Command Files.
rem * 1. Env1Base.CMD - this provides a single point for setting commonly
rem * used environment variables.
rem * 2. SimoNOTE.CMD - this provides a consistent process for displaying
rem * messages to the screen and writing to a journal
rem * or log file.
rem *********************************************************************
setlocal
set CmdName=DXBLDLW8
call ..\Env1Base
rem *
call SimoNOTE "*******************************************%CmdName%.CMD"
call SimoNOTE "Starting JobName %CmdName%.CMD"
set AOK_Count=0
set NOK_Count=0
rem *
rem *-------------------------------------------------------------------*
rem * Mainframe Programs
call SimoNOTE "Continue JobName %CmdName%.CMD - Compile Mainframe Programs"
set SLIB=%BASELIB1%\COBOLUT1
set TLIB=%BASELIB1%\HOLD\UT1A
set CompileOptions=%BASELIB1%\DIRS\ASC1\OS390AscCBLBAT.DIR
rem *
call :COMPILE KSXSQXC1
call :COMPILE SQXKSXC1
call :COMPILE SQXKSXC2
rem *
rem *-------------------------------------------------------------------*
rem * Server Programs
call SimoNOTE "Continue JobName %CmdName%.CMD - Compile Server Programs"
set SLIB=%BASELIB1%\COBOLUT1
set TLIB=%BASELIB1%\HOLD\UT1A
rem *
call :COMPILE KSASQEC1
call :COMPILE KSASQER1
call :COMPILE SQEKSAC1
call :COMPILE SQEKSAR1
rem *
rem *-------------------------------------------------------------------*
rem * Workstation Programs
call SimoNOTE "Continue JobName %CmdName%.CMD - Compile Workstation Programs"
set SLIB=%BASELIB1%\COBOLUT2
set TLIB=%BASELIB1%\HOLD\UT2A
set CompileOptions=%BASELIB1%\DIRS\MiFoAscIBMcomp.DIR
rem *
call :COMPILE CUMKTXC5
call :COMPILE CUMKTXR1
call :COMPILE CUTKTXC5
call :COMPILE CUTKTXR1
call :COMPILE CUSEXTC5
call :COMPILE CUSEXTR5
call :COMPILE CUSIMPU5
call :COMPILE CUSIMPR1
rem *
call SimoNOTE "Finished JobName %CmdName%.CMD"
call SimoNOTE "AOKcount Compile Count for AOK is %AOK_Count% "
call SimoNOTE "NOKcount Compile Count for NOK is %NOK_Count% "
if not %NOK_Count% == 0 pause
endlocal
pause
goto :END
rem *
rem *-------------------------------------------------------------------*
:COMPILE
echo * %0 %1 COBOL Compile is STARTING...
if exist %COBIDY%\%1.idy erase %COBIDY%\%1.idy
if exist %TLIB%\%1.gnt erase %TLIB%\%1.gnt
if exist %BaseLib1%\LIST\%1.lst erase %BaseLib1%\LIST\%1.lst
rem *
cobol %SLIB%\%1.CBL OMF(GNT),%TLIB%\ USE(%CompileOptions%) LISTPATH(%BaseLib1%\LIST);
if exist %TLIB%\%1.GNT call SimoNOTE "* %0 %1 compiled with %CompileOptions%..."
if exist %TLIB%\%1.GNT set /A AOK_Count=%AOK_Count% + 1
if exist %TLIB%\%1.GNT goto :END
echo %1 - Compile Failure>%BASELIB1%\LOGS\%1.ERR
set /A NOK_Count=%NOK_Count% + 1
call SimoNOTE "ABENDING JobName %CmdName%.CMD %1 failure with %CompileOptions%..."
call SimoNOTE "ABENDING JobName %CmdName%.CMD"
:END
The following is the command line syntax to schedule the job to be executed by Micro Focus Enterprise Server.
C:\SIMOSAM1\DEVL\LOADLIB> ezschedule SIMOBATA DXGENRJ1
The following JCL member (DXGENRJ1.jcl) is used to create and populate the baseline VSAM cluster that is as the starting point for this suite of programs. The VSAM cluster is a Key-Sequenced-Data-Set (KSDS) with customer-oriented data and the records are EBCDIC encoded with packed and binary data.
//DXGENRJ1 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=&SYSUID
//* *******************************************************************
//* DXGENRJ1.JCL - a JCL Member for Batch Job Processing *
//* This JCL Member is provided by SimoTime Technologies *
//* (C) Copyright 1987-2019 All Rights Reserved *
//* Web Site URL: http://www.simotime.com *
//* e-mail: helpdesk@simotime.com *
//* *******************************************************************
//*
//* Text - Execute a COBOL program to populate a Customer File.
//* Author - SimoTime Technologies
//* Date - January 01, 1997
//*
//* This COBOL program will read a control file and access the various
//* name files to populate or update a customer master file.
//*
//* This program uses a Sequential ADD methodology. Therefore,
//* the records being added to the file need to be in sequence
//* by the record key. Since this does an OPEN for OUTPUT it is used
//* to create a new file.
//*
//* ************
//* * DXGENRJ1 *
//* ********jcl*
//* *
//* *
//* ************ ************ ************
//* * OBFCTL80 *--*--* DXGENRC1 *----* DXKSE512 *
//* *******rseq* * ********cbl* *******ksds*
//* * *
//* ************ * * ************
//* * LASTNAME *--* *--call----* OBFDATR1 *
//* *******rseq* * * ********cbl*
//* * *
//* ************ * * ************
//* * FNAMEF01 *--* *--call----* CUSA2EC1 *
//* *******rseq* * * ********cbl*
//* * *
//* ************ * *
//* * FNAMEM01 *--* *
//* *******rseq* * *
//* * *
//* ************ * *
//* * POSTCODE *--* *
//* *******rseq* * *
//* *
//* ************
//* * EOJ *
//* ************
//*
//* *******************************************************************
//* Step 1 of 4, Delete any previously created file...
//*
//CLEANOUT EXEC PGM=IEFBR14
//OBFCTL80 DD DSN=SIMOTIME.DATA.OBFCTL80,DISP=(MOD,DELETE,DELETE),
// STORCLAS=MFI,
// SPACE=(TRK,5),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//*
//* *******************************************************************
//* Step 2 of 4, Delete/Define a New VSAM Cluster for DXKSE512
//*
//DELDEFX1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE DXSERIES.DATA.DXKSE512
SET MAXCC = 0
DEFINE CLUSTER (NAME(DXSERIES.DATA.DXKSE512) -
KEYS(12,0) -
RECORDSIZE(512,512) -
REUSE -
TRACKS(45,15)) -
DATA (NAME(DXSERIES.DATA.DXKSE512.DAT) -
FREESPACE(10,15) -
CISZ(8192)) -
INDEX (NAME(DXSERIES.DATA.DXKSE512.IDX))
/*
//SYSOUT DD SYSOUT=*
//*
//* *******************************************************************
//* Step 3 of 4, Create and populate a new Control file...
//*
//MAKECNTL EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//* :....1....:....2....:....3....:....4....:....5....:....6....:....7....:....8
//SYSUT1 DD *
* A comment is identified by an asterisk (*) in position one (1)
* ..:....1....:....2....:....3....:....4....:....5....:....6....
/CTL FLAGS=FFFF0100
/CTL RECORDS=25000
/*
//SYSUT2 DD DSN=SIMOTIME.DATA.OBFCTL80,
// DISP=(NEW,CATLG,DELETE),
// STORCLAS=MFI,
// SPACE=(TRK,5),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//*
//* *******************************************************************
//* Step 4 of 4, Populate a new DXKSE512 file with Customer Information
//*
//DXGENRX1 EXEC PGM=OBFDATC2
//STEPLIB DD DISP=OLD,DSN=MFI01.SIMOPROD.LOADLIB1
//OBFCTL80 DD DISP=OLD,DSN=SIMOTIME.DATA.OBFCTL80
//FNAMEF01 DD DISP=OLD,DSN=SIMOTIME.DATA.FNAMEF01
//FNAMEM01 DD DISP=OLD,DSN=SIMOTIME.DATA.FNAMEM01
//LASTNAME DD DISP=OLD,DSN=SIMOTIME.DATA.LASTNAME
//POSTCODE DD DISP=OLD,DSN=SIMOTIME.DATA.POSTCODE
//STREET01 DD DISP=OLD,DSN=SIMOTIME.DATA.STREET01
//OBF1CUST DD DISP=OLD,DSN=DXSERIES.DATA.DXKSE512
//SYSOUT DD SYSOUT=*
//*
The following tasks (Task-01 through Task-06) are intended to run on an IBM Mainframe System (ZOS) or a Linux, UNIX or Windows System (LUW) with Micro Focus Enterprise Server.
The following is the command line syntax to schedule the job to be executed by Micro Focus Enterprise Server. This job would normally be executed on the Mainframe System to copy the VSAM, KSDS to a sequential file that will be transferred from the Mainframe System to a Linux, UNIX or Windows (LUW) System using FTP.
C:\SIMOSAM1\DEVL\LOADLIB> ezschedule SIMOBATA DXTK01J1
The following shows the logic flow and data relationships.
Note: The data conversion process for Task-01 is a file-format conversion only. It does not do a record-content conversion. The records that are written to the output file (record sequential) are a mirror image of the records read from the Input file (VSAM, KSDS). The preceding job uses a COBOL program to do the file-format conversion. The REPRO function of the IDCAMS Utility program could do the same file-format conversion. A second JCL Member (DXTK01J2.jcl) that uses IDCAMS has been included. The following job (DXTK01J1.jcl) uses a COBOL program to do the File-Format conversion from a VSAM, KSDS to a Sequential file. The Record-Content is not converted, the output records are a mirror image of the input records. //DXTK01J1 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=&SYSUID //* ******************************************************************* //* DXTK01J1.JCL - a JCL Member for Batch Job Processing * //* This JCL Member is provided by SimoTime Technologies * //* (C) Copyright 1987-2019 All Rights Reserved * //* Web Site URL: http://www.simotime.com * //* e-mail: helpdesk@simotime.com * //* ******************************************************************* //* //* TEXT - Copy a KSDS to a Sequential File using a COBOL Program //* AUTHOR - SIMOTIME TECHNOLOGIES //* DATE - JANUARY 01, 1989 //* ******************************************************************* //* Step 1 of 2, Delete any previously created file... //* //GETREADY EXEC PGM=IEFBR14 //DX512SEQ DD DSN=DXSERIES.DATA.DXSQE512,DISP=(MOD,DELETE,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=512,DSORG=PS) //* //* ******************************************************************* //* Step 2 of 2, Copy with File Format Convert... //* // EXEC PGM=KSXSQXC1 //SYSPRINT DD SYSOUT=A //DX512KSD DD DSN=DXSERIES.DATA.DXKSE512,DISP=(SHR) //DX512SEQ DD DSN=DXSERIES.DATA.DXSQE512, // SPACE=(TRK,(10,1),RLSE), // DISP=(NEW,CATLG,DELETE), // DCB=(RECFM=FB,LRECL=512,DSORG=PS) //SYSOUT DD SYSOUT=* //* The following job (DXTK01J2.jcl) uses the REPRO function of IDCAMS to do the File-Format conversion from a VSAM, KSDS to a Sequential file. The Record-Content is not converted, the output records are a mirror image of the input records. Note: This job performs the same function as the preceding member (DXST01J1.jcl) but uses IDCAMS instead of a COBOL program. //DXTK01J2 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1 //* ******************************************************************* //* DXTK01J2.JCL - a JCL Member for Batch Job Processing * //* This JCL Member is provided by SimoTime Technologies * //* (C) Copyright 1987-2019 All Rights Reserved * //* Web Site URL: http://www.simotime.com * //* e-mail: helpdesk@simotime.com * //* ******************************************************************* //* //* TEXT - COPY (OR REPRO) A KSDS TO A SEQUENTIAL FILE //* AUTHOR - SIMOTIME TECHNOLOGIES //* DATE - JANUARY 01, 1989 //* //* ******************************************************************* //* Step 1 of 2, Delete any previously created file... //* //GETREADY EXEC PGM=IEFBR14 //DXSEQ512 DD DSN=DXSERIES.RSEQ.DXSEQ512,DISP=(MOD,DELETE,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=512,DSORG=PS) //* //* ******************************************************************* //* Step 2 of 2, Copy with File Format Convert... //* // EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=A //DXKSX512 DD DSN=DXSERIES.DATA.DXKSE512,DISP=OLD //DXSQX512 DD DSN=DXSERIES.DATA.DXSEQ512,UNIT=SYSDA, // SPACE=(TRK,(10,10)), // DISP=(NEW,CATLG), // DCB=(LRECL=512,BLKSIZE=0,RECFM=FB) //SYSIN DD * REPRO - INFILE(DXKSX512) - OUTFILE(DXSQX512) /*
|
Note: The data conversion process for Step-03 is a file-format conversion with record content conversion. This job uses a mainline (or primary) COBOL program to do the file-format conversion and calls a COBOL sub-routine (or secondary program) to do the EBCDIC to ASCII conversion. This secondary program was generated to do the conversion based on the record definition that is defined in a COBOL copy file. The following job (DXTK03J1.jcl) uses a set of COBOL programs to do the File-Format and Record-Content conversion from an EBCDIC-encoded Sequential file to an ASCII-encoded VSAM, KSDS.
//DXTK03J1 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=&SYSUID
//* *******************************************************************
//* DXTK03J1.JCL - a JCL Member for Batch Job Processing *
//* This JCL Member is provided by SimoTime Technologies *
//* (C) Copyright 1987-2019 All Rights Reserved *
//* Web Site URL: http://www.simotime.com *
//* e-mail: helpdesk@simotime.com *
//* *******************************************************************
//*
//* Text - Execute a COBOL program to read RSEQ and write KSDS.
//* Author - SimoTime Technologies
//* Date - January 01, 1997
//*
//* This COBOL program will read an EBCDIC-encoded, Record Sequential
//* file with fixed length records of 512-bytes and write to an
//* ASCII-encoded, VSAM Key-Sequenced-Data-Set.
//*
//* ************
//* * DXST03J1 *
//* ********jcl*
//* *
//* *
//* ************ ************
//* * IDCAMS *-----* DELT/DEF *
//* ************ ************
//* *
//* *
//* ************ ************ ************
//* * CUSGRSEQ *-----* CUSEKAC1 *-----* CUSPKSDS *
//* *******rseq* ********cbl* *******ksds*
//* *
//* *
//* ************
//* * EOJ *
//* ************
//*
//* *******************************************************************
//* Step 1 of 2, Delete and Define a VSAM Cluster.
//*
//CUCRTS01 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE DXSERIES.DATA.DXKSA512 -
FILE (CUSKA512) -
PURGE -
ERASE -
CLUSTER
SET MAXCC = 0
DEFINE CLUSTER (NAME(DXSERIES.DATA.DXKSA512) -
TRACKS(45,15) -
INDEXED) -
DATA (NAME(DXSERIES.DATA.DXKSA512.DAT) -
KEYS(12,0) -
RECORDSIZE(512,512) -
FREESPACE(10,15) -
CISZ(8192)) -
INDEX (NAME(DXSERIES.DATA.DXKSA512.IDX))
//* *******************************************************************
//* Step 2 of 2, Read Record Sequential file and write a VSAM, KSDS.
//*
//CUSEKAS1 EXEC PGM=CUSEKAC1
//STEPLIB DD DISP=SHR,DSN=SIMOTIME.DEMO.LOADLIB1
//CUSGRSEQ DD DISP=SHR,DSN=DXSERIES.DATA.DXSQE512
//CUSPKSDS DD DISP=SHR,DSN=DXSERIES.DATA.DXKSA512
//SYSOUT DD SYSOUT=*
//*
|
The following (DXTK04J1.jcl) shows the JCL member that uses a set of COBOL programs to do the File-Format and Record-Content conversion from a ASCII-encoded VSAM, KSDS to a EBCDIC-encoded Sequential file. //DXTK04J1 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=&SYSUID //* ******************************************************************* //* DXTK04J1.JCL - a JCL Member for Batch Job Processing * //* This JCL Member is provided by SimoTime Technologies * //* (C) Copyright 1987-2019 All Rights Reserved * //* Web Site URL: http://www.simotime.com * //* e-mail: helpdesk@simotime.com * //* ******************************************************************* //* //* Text - Execute a COBOL program to read KSDS and write RSEQ. //* Author - SimoTime Technologies //* Date - January 01, 1997 //* //* This COBOL program will read an ASCII-encoded, VSAM-KSDS //* (Key-Sequenced-Data-Set) and write to an EBCDIC-encoded, Record //* Sequential file with fixed length records of 512-bytes. //* . //* //* ************ //* * DXST04J1 * //* ********jcl* //* * //* * //* ************ ************ //* * IEFBR14 *-----* DELT/DEF * //* ************ ************ //* * //* * //* ************ ************ ************ //* * CUSKA512 *-----* CUKAREC1 *-----* CUSRE512* //* *******ksds* ********cbl* *******rseq* //* * //* * //* ************ //* * EOJ * //* ************ //* //* ******************************************************************* //* Step 1 of 2, Delete any previously created file... //* //GETREADY EXEC PGM=IEFBR14 //CUSRE512 DD DSN=DXSERIES.COPY.DXSQE512,DISP=(MOD,DELETE,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=512,DSORG=PS) //* ******************************************************************* //* Step 2 of 2, Read Record Sequential file and write a VSAM, KSDS. //* //CUSEKAS1 EXEC PGM=CUKAREC1 //STEPLIB DD DISP=SHR,DSN=SIMOTIME.DEMO.LOADLIB1 //CUSKA512 DD DISP=SHR,DSN=DXSERIES.DATA.DXKSA512 //CUSRE512 DD DSN=DXSERIES.COPY.DXSQE512, // SPACE=(TRK,(10,1),RLSE), // DISP=(NEW,CATLG,DELETE), // DCB=(RECFM=FB,LRECL=512,DSORG=PS) //SYSOUT DD SYSOUT=* //*
|
The following (DXTK06J1.jcl) shows the JCL member that uses a COBOL program to do the File-Format conversion. The Record-Content is not converted, the output records are a mirror image of the input records.
//DXTK06J1 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=&SYSUID
//* *******************************************************************
//* DXTK06J1.JCL - a JCL Member for Batch Job Processing *
//* This JCL Member is provided by SimoTime Technologies *
//* (C) Copyright 1987-2019 All Rights Reserved *
//* Web Site URL: http://www.simotime.com *
//* e-mail: helpdesk@simotime.com *
//* *******************************************************************
//*
//* Text - Execute a COBOL program to update a Customer File.
//* Author - SimoTime Technologie
//* Date - January 01, 1997
//*
//* This program uses a Random/Update methodology. Since this does an
//* OPEN for I/O it is used to Update existing records and/or add new
//* records.
//*
//* ************
//* * DXST06J1 *
//* ********jcl*
//* *
//* *
//* ************ ************ ************
//* * DXRSE515 *--*--* CUREKEC1 *----* DXKSE512 *
//* *******rseq* * ********cbl* *******ksds*
//* *
//* ************
//* * EOJ *
//* ************
//*
//* *******************************************************************
//* Step 1 of 2, Delete/Define a New VSAM Cluster for DXKSE512
//*
//DELDEFX1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE DXSERIES.COPY.DXKSE512
SET MAXCC = 0
DEFINE CLUSTER (NAME(DXSERIES.COPY.DXKSE512) -
KEYS(12,0) -
RECORDSIZE(512,512) -
REUSE -
TRACKS(45,15)) -
DATA (NAME(DXSERIES.COPY.DXKSE512.DAT) -
FREESPACE(10,15) -
CISZ(8192)) -
INDEX (NAME(DXSERIES.COPY.DXKSE512.IDX))
/*
//SYSOUT DD SYSOUT=*
//*
//* *******************************************************************
//* Step 2 of 2, Populate a new DXKSE512 file with Customer Information
//*
//DXGENRX1 EXEC PGM=SQXKSXC2
//STEPLIB DD DISP=OLD,DSN=MFI01.SIMOPROD.LOADLIB1
//DXSEQ512 DD DISP=OLD,DSN=DXSERIES.COPY.DXSQE512
//DXKSD512 DD DISP=OLD,DSN=DXSERIES.COPY.DXKSE512
//SYSOUT DD SYSOUT=*
//*
|
| 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 |
| File Convert, Format and Share |
| Copyright © 1987-2025 SimoTime Technologies and Services All Rights Reserved |
| When technology complements business |
| http://www.simotime.com |