File Conversion ASCII and EBCDIC - QSAM and VSAM |
The SimoTime Home Page |
This is an example of how a COBOL program can read a sequential file with EBCDIC content that is downloaded from a mainframe in binary format using FTP (File Transfer Protocol). 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 of 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. Signed numbers cannot be converted in the same manner as text data.
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 presents a problem if not addressed in the initial conversion process.
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.
The COBOL source code described in this document was generated using SimoZAPS, a product of SimoTime Enterprises. The SimoZAPS utility program also has the capability of reading, writing or converting between other file formats. In the world of programming there are many ways to solve a problem. This program is provided as a COBOL example of one of the possible solutions to the problem of changing the contents and structure of data files.
Additional information for doing various file conversions may be found in the Downloads and Links section of this document.
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
This suite of sample JCL Members describes and demonstrates how to create test data sets and convert between the EBCDIC and ASCII character sets.
This JCL member (CBLE2AJ1.jcl) will read an EBCDIC file, do the data translation from EBCDIC to ASCII and create a new sequential file. The DD statements will probably need to be modified to run on different mainframes. This JCL member will run on an IBM Mainframe with ZOS or a Linux, UNIX or Linux System with Micro Focus Enterprise Server.
//CBLE2AJ1 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1 //* ******************************************************************* //* CBLE2AJ1.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 - Read QSAM 80-byte EBCDIC and write QSAM 80-byte ASCII. //* Author - SimoTime Technologies //* Date - January 24, 1996 //* //* The job will read an 80-byte file (QSAM080E) in EBCDIC format and //* create an 80-byte file (QSAM080A) in ASCII format. This is an //* 80/80 repro with conversion from EBCDIC to ASCII. //* //* This set of programs will run on a mainframe under MVS or on a //* Personal Computer with Windows and Micro Focus Mainframe Express. //* //* ************ //* * CBLE2AJ1 * //* ********jcl* //* * //* * //* ************ ************ ************ //* * EBCFILE *-----* CBLE2AC1 *-----* ASCFILE * //* ************ ************ ************ //* * //* * //* ************ //* * EOJ * //* ************ //* //* ******************************************************************* //* Step 1 of 1, This is a single step job. //* //EXECC2A1 EXEC PGM=CBLE2AC1 //STEPLIB DD DSN=SIMOTIME.DEMO.LOADLIB,DISP=SHR //EBCFILE DD DSN=SIMOTIME.DATA.QSAM080E,DISP=SHR //ASCFILE DD DSN=SIMOTIME.DATA.QSAM080A, // DISP=(NEW,CATLG,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS) //
This JCL member (CBLE2AJ8.jcl) is provided to create an EBCDIC file that may be used as input when attempting to execute the conversion program. The DD statements will probably need to be modified to run on different mainframes. This JCL member will run on an IBM Mainframe with ZOS or a Linux, UNIX or Linux System with Micro Focus Enterprise Server that is configured to use the EBCDIC character set.
//CBLE2AJ8 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1 //* ******************************************************************* //* CBLE2AJ8.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 - Create a Sequential Data Set on disk using IEBGENER. //* Author - SimoTime Technologies //* Date - January 24, 1996 //* //* The first job step (DELTQSAM) will delete any previously created //* file. The second job step (CRTQNAME) will create a new file. //* //* This set of programs will run on a mainframe under MVS or on a //* Personal Computer with Windows and Micro Focus Mainframe Express. //* //* ******************************************************************* //* Step 1 of 2, Delete any previously created file... //* // SET DSN4CUST=SIMOTIME.DATA.QSAM080E //QSAMDELT EXEC PGM=IEFBR14 //QSAM0080 DD DSN=&DSN4CUST, // DISP=(MOD,DELETE,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS) //* //* ******************************************************************* //* Step 2 of 2, Create and populate a new QSAM file... //* //QSAMCRT1 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY //SYSUT1 DD DSN=SIMOTIME.PDS.PARMLIB(CUSR80D1), // DISP=SHR //SYSUT2 DD DSN=&DSN4CUST, // DISP=(NEW,CATLG,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=80,DSORG=PS) //
This JCL member (CBLA2EJ1.jcl) will read an ASCII file, do the data translation from ASCII to EBCDIC and create a new sequential file. The DD statements will probably need to be modified to run on different mainframes. This JCL member will run on an IBM Mainframe with ZOS or a Linux, UNIX or Linux System with Micro Focus Enterprise Server.
//CBLA2EJ1 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1 //* ******************************************************************* //* CBLA2EJ1.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 - Read QSAM 80-byte EBCDIC and write QSAM 80-byte ASCII. //* Author - SimoTime Technologies //* Date - January 24, 1996 //* //* The job will read an 80-byte file (QSAM080A) in ASCII format and //* create an 80-byte file (QSAM080E) in EBCDIC format. This is an //* 80/80 repro with conversion from ASCII to EBCDIC. //* //* This set of programs will run on a mainframe under MVS or on a //* Personal Computer with Windows and Micro Focus Mainframe Express. //* //* ************ //* * CBLA2EJ1 * //* ********jcl* //* * //* * //* ************ ************ ************ //* * ASCFILE *-----* CBLA2EC1 *-----* EBCFILE * //* ************ ************ ************ //* * //* * //* ************ //* * EOJ * //* ************ //* //* //* ******************************************************************* //* Step 1 of 2, Delete any previously created file... //* //QSAMDELT EXEC PGM=IEFBR14 //SYSUT2 DD DSN=SIMOTIME.DATA.QSAM080E,DISP=(MOD,DELETE,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=80,DSORG=PS) //* ******************************************************************* //* Step 2 of 2, Convert the file.... //* //EXECA2E1 EXEC PGM=CBLA2EC1 //STEPLIB DD DSN=SIMOTIME.DEMO.LOADLIB,DISP=SHR //SYSOUT DD SYSOUT=* //ASCFILE DD DSN=SIMOTIME.DATA.QSAM080A,DISP=SHR //EBCFILE DD DSN=SIMOTIME.DATA.QSAM080E, // DISP=(NEW,CATLG,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=80,DSORG=PS) //
This JCL member (CBLA2EJ8.jcl) is provided to create an ASCII file that may be used as input when attempting to execute the conversion program. The DD statements will probably need to be modified to run on different mainframes. This JCL member will run on an IBM Mainframe with ZOS or a Linux, UNIX or Linux System with Micro Focus Enterprise Server that is configured to use the ASCII character set.
//CBLA2EJ8 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1 //* ******************************************************************* //* CBLA2EJ8.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 - Create a Sequential Data Set on disk using IEBGENER. //* Author - SimoTime Technologies //* Date - January 24, 1996 //* //* The first job step (DELTQSAM) will delete any previously created //* file. The second job step (CRTQNAME) will create a new file. //* //* This set of programs will run on a mainframe under MVS or on a //* Personal Computer with Windows and Micro Focus Mainframe Express. //* //* ******************************************************************* //* Step 1 of 2, Delete any previously created file... //* // SET DSN4CUST=SIMOTIME.DATA.QSAM080A //QSAMDELT EXEC PGM=IEFBR14 //QSAM0080 DD DSN=&DSN4CUST, // DISP=(MOD,DELETE,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS) //* //* ******************************************************************* //* Step 2 of 2, Create and populate a new QSAM file... //* //QSAMCRT1 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY //SYSUT1 DD DSN=SIMOTIME.PDS.PARMLIB(CUSR80D1), // DISP=SHR //SYSUT2 DD DSN=&DSN4CUST, // DISP=(NEW,CATLG,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=80,DSORG=PS) //
This section provides additional details about the members included in this suite of programs.
This approach to data file conversion between EBCDIC and ASCII encoding schemas (or data formats) uses COBOL programs that do the data or record content conversion and the possible file format conversion (i.e. sequential file to VSAM, KSDS). This document focuses on the record content (or EBCDIC and ASCII) conversion task.
This program (CBLE2AC1.cbl) will read a record sequential (QSAM) EBCDIC file and write a record sequential (QSAM) ASCII file. This program may be compiled on an IBM Mainframe with ZOS or a Linux, UNIX or Linux System with Micro Focus COBOL.
IDENTIFICATION DIVISION. PROGRAM-ID. CBLE2AC1. AUTHOR. SIMOTIME TECHNOLOGIES. ***************************************************************** * This program was generated by SimoZAPS * * A product of SimoTime Technologies * * Our e-mail address is: helpdesk@simotime.com * * Also, visit our Web Site at http://www.simotime.com * * * * Generation Date: 2018-10-10 Generation Time: 20:28:11:29 * * * * Record Record Key * * Function Name Organization Format Max-Min Pos-Len * * PRIMARY EBCFILE SEQUENTIAL FIXED 00080 * * * * SECONDARY ASCFILE SEQUENTIAL FIXED 00080 * * * * * * Translation Mode is EBCDIC to ASCII * * * ***************************************************************** ENVIRONMENT DIVISION. INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT EBCFILE-FILE ASSIGN TO EBCFILE ORGANIZATION IS SEQUENTIAL ACCESS MODE IS SEQUENTIAL FILE STATUS IS EBCFILE-STATUS. SELECT ASCFILE-FILE ASSIGN TO ASCFILE ORGANIZATION IS SEQUENTIAL ACCESS MODE IS SEQUENTIAL FILE STATUS IS ASCFILE-STATUS. ***************************************************************** DATA DIVISION. FILE SECTION. FD EBCFILE-FILE DATA RECORD IS EBCFILE-REC . 01 EBCFILE-REC. 05 EBCFILE-DATA-01 PIC X(00080). FD ASCFILE-FILE DATA RECORD IS ASCFILE-REC . 01 ASCFILE-REC. 05 ASCFILE-DATA-01 PIC X(00080). ***************************************************************** * This program was created with the SYSMASK1.TXT file as input. * * The SYSMASK1 provides for the sequential reading of the input * * file and the sequential writing of the output file. * * * * If the output file is indexed then the input file must be in * * sequence by the field that will be used to provide the key * * for the output file. This is a sequential load process. * * * * If the key field is not in sequence then refer to SYSMASK2 * * to provide for a random add or update of the indexed file. * * * * This program mask will have the ASCII/EBCDIC table inserted * * for use by the /TRANSLATE function of SimoZAPS. * * * * For more information or questions please contact SimoTime * * Technologies. The version control number is 16.01.01 * * * * Our e-mail address is: helpdesk@simotime.com * * Also, visit our Web Site at http://www.simotime.com * ***************************************************************** WORKING-STORAGE SECTION. 01 SIM-TITLE. 05 T1 pic X(11) value '* CBLE2AC1 '. 05 T2 pic X(34) value 'Convert EBC to ASC for RSEQ-80/80 '. 05 T3 pic X(10) value ' v16.01.01'. 05 T4 pic X(24) value ' helpdesk@simotime.com'. 01 SIM-COPYRIGHT. 05 C1 pic X(11) value '* CBLE2AC1 '. 05 C2 pic X(32) value 'This Data File Convert Member wa'. 05 C3 pic X(32) value 's generated by SimoTime Technolo'. 05 C4 pic X(04) value 'gies'. 01 EBCFILE-STATUS. 05 EBCFILE-STATUS-L pic X. 05 EBCFILE-STATUS-R pic X. 01 EBCFILE-EOF pic X value 'N'. 01 EBCFILE-OPEN-FLAG pic X value 'C'. 01 ASCFILE-STATUS. 05 ASCFILE-STATUS-L pic X. 05 ASCFILE-STATUS-R pic X. 01 ASCFILE-EOF pic X value 'N'. 01 ASCFILE-OPEN-FLAG pic X value 'C'. 01 EBCFILE-LRECL pic 9(5) value 00080. 01 ASCFILE-LRECL pic 9(5) value 00080. 01 EBCFILE-LRECL-MAX pic 9(5) value 00080. 01 ASCFILE-LRECL-MAX pic 9(5) value 00080. ***************************************************************** * The following buffers are used to create a four-byte status * * code that may be displayed. * ***************************************************************** 01 IO-STATUS. 05 IO-STAT1 pic X. 05 IO-STAT2 pic X. 01 IO-STATUS-04. 05 IO-STATUS-0401 pic 9 value 0. 05 IO-STATUS-0403 pic 999 value 0. 01 TWO-BYTES-BINARY pic 9(4) BINARY. 01 TWO-BYTES-ALPHA redefines TWO-BYTES-BINARY. 05 TWO-BYTES-LEFT pic X. 05 TWO-BYTES-RIGHT pic X. ***************************************************************** * Message Buffer used by the Z-DISPLAY-MESSAGE-TEXT routine. * ***************************************************************** 01 MESSAGE-BUFFER. 05 MESSAGE-HEADER pic X(011) value '* CBLE2AC1 '. 05 MESSAGE-TEXT. 10 MESSAGE-TEXT-1 pic X(068) value SPACES. 10 MESSAGE-TEXT-2 pic X(188) value SPACES. 01 MSG-LSB pic 9(5) value 267. ***************************************************************** 01 PROGRAM-NAME pic X(8) value 'CBLE2AC1'. 01 INFO-STATEMENT. 05 INFO-SHORT. 10 INFO-ID pic X(8) value 'Starting'. 10 filler pic X(2) value ', '. 10 filler pic X(34) value 'Convert EBC to ASC for RSEQ-80/80 '. 05 filler pic X(24) value ' http://www.SimoTime.com'. 01 APPL-RESULT pic S9(9) comp. 88 APPL-AOK value 0. 88 APPL-EOF value 16. 01 WRITE-FLAG pic X value 'Y'. 01 EBCFILE-TOTAL. 05 EBCFILE-RDR pic 9(9) value 0. 05 filler pic X(3) value ' - '. 05 filler pic X(23) value 'Line count for EBCFILE '. 01 ASCFILE-TOTAL. 05 ASCFILE-ADD pic 9(9) value 0. 05 filler pic X(3) value ' - '. 05 filler pic X(23) value 'Line count for ASCFILE '. ***************************************************************** * The following copy file contains the translation tables for * * the ASCII and EBCDIC conversion. Also, sections of the tables * * may be used for case conversion. * ***************************************************************** COPY ASCEBCB1. ***************************************************************** PROCEDURE DIVISION. move all '*' to MESSAGE-TEXT-1 perform Z-DISPLAY-MESSAGE-TEXT move INFO-STATEMENT to MESSAGE-TEXT-1 perform Z-DISPLAY-MESSAGE-TEXT move all '*' to MESSAGE-TEXT-1 perform Z-DISPLAY-MESSAGE-TEXT perform Z-POST-COPYRIGHT perform EBCFILE-OPEN perform ASCFILE-OPEN * USRSOJ Processing not specified... perform until EBCFILE-STATUS not = '00' perform EBCFILE-READ if EBCFILE-STATUS = '00' add 1 to EBCFILE-RDR perform BUILD-OUTPUT-RECORD if WRITE-FLAG = 'Y' perform ASCFILE-WRITE if ASCFILE-STATUS = '00' add 1 to ASCFILE-ADD end-if end-if end-if end-perform * USREOJ Processing not specified... move EBCFILE-TOTAL to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move ASCFILE-TOTAL to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT if APPL-EOF move 'Complete' to INFO-ID else move 'ABENDING' to INFO-ID end-if move INFO-STATEMENT to MESSAGE-TEXT(1:79) perform Z-DISPLAY-MESSAGE-TEXT perform ASCFILE-CLOSE perform EBCFILE-CLOSE GOBACK. ***************************************************************** BUILD-OUTPUT-RECORD. * TransMODE is E2A... * TransINIT process... move ALL X'20' to ASCFILE-REC * TransLATE... move EBCFILE-REC(00001:00080) to ASCFILE-REC(00001:00080) inspect ASCFILE-REC(1:80) converting E-INFO to A-INFO exit. ***************************************************************** * I/O Routines for the INPUT File... * ***************************************************************** EBCFILE-CLOSE. add 8 to ZERO giving APPL-RESULT. close EBCFILE-FILE if EBCFILE-STATUS = '00' subtract APPL-RESULT from APPL-RESULT else add 12 to ZERO giving APPL-RESULT end-if if APPL-AOK CONTINUE else move 'CLOSE Failure with EBCFILE ' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move EBCFILE-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. *---------------------------------------------------------------* EBCFILE-READ. read EBCFILE-FILE if EBCFILE-STATUS = '00' subtract APPL-RESULT from APPL-RESULT else if EBCFILE-STATUS = '10' add 16 to ZERO giving APPL-RESULT else add 12 to ZERO giving APPL-RESULT end-if end-if if APPL-AOK CONTINUE else if APPL-EOF move 'Y' to EBCFILE-EOF else move 'READ Failure with EBCFILE ' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move EBCFILE-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if end-if exit. *---------------------------------------------------------------* EBCFILE-OPEN. add 8 to ZERO giving APPL-RESULT. open input EBCFILE-FILE if EBCFILE-STATUS = '00' subtract APPL-RESULT from APPL-RESULT move 'O' to EBCFILE-OPEN-FLAG else add 12 to ZERO giving APPL-RESULT end-if if APPL-AOK CONTINUE else move 'OPEN Failure with EBCFILE ' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move EBCFILE-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. ***************************************************************** * I/O Routines for the OUTPUT File... * ***************************************************************** ASCFILE-WRITE. if ASCFILE-OPEN-FLAG = 'C' perform ASCFILE-OPEN end-if write ASCFILE-REC if ASCFILE-STATUS = '00' subtract APPL-RESULT from APPL-RESULT else if ASCFILE-STATUS = '10' add 16 to ZERO giving APPL-RESULT else add 12 to ZERO giving APPL-RESULT end-if end-if. if APPL-AOK CONTINUE else move 'WRITE Failure with ASCFILE ' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move ASCFILE-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. *---------------------------------------------------------------* ASCFILE-OPEN. add 8 to ZERO giving APPL-RESULT. open OUTPUT ASCFILE-FILE if ASCFILE-STATUS = '00' subtract APPL-RESULT from APPL-RESULT move 'O' to ASCFILE-OPEN-FLAG else add 12 to ZERO giving APPL-RESULT end-if if APPL-AOK CONTINUE else move 'OPEN Failure with ASCFILE ' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move ASCFILE-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. *---------------------------------------------------------------* ASCFILE-CLOSE. add 8 to ZERO giving APPL-RESULT. close ASCFILE-FILE if ASCFILE-STATUS = '00' subtract APPL-RESULT from APPL-RESULT move 'C' to ASCFILE-OPEN-FLAG else add 12 to ZERO giving APPL-RESULT end-if if APPL-AOK CONTINUE else move 'CLOSE Failure with ASCFILE ' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move ASCFILE-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. ***************************************************************** * The following Z-ROUTINES provide administrative functions * * for this program. * ***************************************************************** * ABEND the program, post a message to the console and issue * * a STOP RUN. * ***************************************************************** Z-ABEND-PROGRAM. if MESSAGE-TEXT not = SPACES perform Z-DISPLAY-MESSAGE-TEXT end-if move 'PROGRAM-IS-ABENDING...' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT add 12 to ZERO giving RETURN-CODE STOP RUN. * exit. ***************************************************************** Z-CALCULATE-MESSAGE-LSB. add 267 to ZERO giving MSG-LSB perform until MSG-LSB < 80 or MESSAGE-BUFFER(MSG-LSB:1) not = SPACE if MESSAGE-BUFFER(MSG-LSB:1) = SPACE subtract 1 from MSG-LSB end-if end-perform exit. ***************************************************************** * Display CONSOLE messages... * ***************************************************************** Z-DISPLAY-MESSAGE-TEXT. perform Z-CALCULATE-MESSAGE-LSB display MESSAGE-BUFFER(1:MSG-LSB) move all SPACES to MESSAGE-TEXT exit. ***************************************************************** * Display the file status bytes. This routine will display as * * four digits. If the full two byte file status is numeric it * * will display as 00nn. If the 1st byte is a numeric nine (9) * * the second byte will be treated as a binary number and will * * display as 9nnn. * ***************************************************************** Z-DISPLAY-IO-STATUS. if IO-STATUS not NUMERIC or IO-STAT1 = '9' move IO-STAT1 to IO-STATUS-04(1:1) subtract TWO-BYTES-BINARY from TWO-BYTES-BINARY move IO-STAT2 to TWO-BYTES-RIGHT add TWO-BYTES-BINARY to ZERO giving IO-STATUS-0403 move 'File Status is: nnnn' to MESSAGE-TEXT move IO-STATUS-04 to MESSAGE-TEXT(17:4) perform Z-DISPLAY-MESSAGE-TEXT else move '0000' to IO-STATUS-04 move IO-STATUS to IO-STATUS-04(3:2) move 'File Status is: nnnn' to MESSAGE-TEXT move IO-STATUS-04 to MESSAGE-TEXT(17:4) perform Z-DISPLAY-MESSAGE-TEXT end-if exit. ***************************************************************** Z-POST-COPYRIGHT. display SIM-TITLE display SIM-COPYRIGHT exit. ***************************************************************** * This program was generated by SimoZAPS * * A product of SimoTime Technologies * * Our e-mail address is: helpdesk@simotime.com * * Also, visit our Web Site at http://www.simotime.com * * * * Generation Date: 2018-10-10 Generation Time: 20:28:11:32 * *****************************************************************
This program (CBLA2EC1.cbl) will read a record sequential (QSAM) ASCII file and write a record sequential (QSAM) EBCDIC file. This program may be compiled on an IBM Mainframe with ZOS or a Linux, UNIX or Linux System with Micro Focus COBOL.
IDENTIFICATION DIVISION. PROGRAM-ID. CBLA2EC1. AUTHOR. SIMOTIME TECHNOLOGIES. ***************************************************************** * This program was generated by SimoZAPS * * A product of SimoTime Technologies * * Our e-mail address is: helpdesk@simotime.com * * Also, visit our Web Site at http://www.simotime.com * * * * Generation Date: 2018-10-10 Generation Time: 20:28:10:41 * * * * Record Record Key * * Function Name Organization Format Max-Min Pos-Len * * PRIMARY ASCFILE SEQUENTIAL FIXED 00080 * * * * SECONDARY EBCFILE SEQUENTIAL FIXED 00080 * * * * * * Translation Mode is ASCII to EBCDIC * * * ***************************************************************** ENVIRONMENT DIVISION. INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT ASCFILE-FILE ASSIGN TO ASCFILE ORGANIZATION IS SEQUENTIAL ACCESS MODE IS SEQUENTIAL FILE STATUS IS ASCFILE-STATUS. SELECT EBCFILE-FILE ASSIGN TO EBCFILE ORGANIZATION IS SEQUENTIAL ACCESS MODE IS SEQUENTIAL FILE STATUS IS EBCFILE-STATUS. ***************************************************************** DATA DIVISION. FILE SECTION. FD ASCFILE-FILE DATA RECORD IS ASCFILE-REC . 01 ASCFILE-REC. 05 ASCFILE-DATA-01 PIC X(00080). FD EBCFILE-FILE DATA RECORD IS EBCFILE-REC . 01 EBCFILE-REC. 05 EBCFILE-DATA-01 PIC X(00080). ***************************************************************** * This program was created with the SYSMASK1.TXT file as input. * * The SYSMASK1 provides for the sequential reading of the input * * file and the sequential writing of the output file. * * * * If the output file is indexed then the input file must be in * * sequence by the field that will be used to provide the key * * for the output file. This is a sequential load process. * * * * If the key field is not in sequence then refer to SYSMASK2 * * to provide for a random add or update of the indexed file. * * * * This program mask will have the ASCII/EBCDIC table inserted * * for use by the /TRANSLATE function of SimoZAPS. * * * * For more information or questions please contact SimoTime * * Technologies. The version control number is 16.01.01 * * * * Our e-mail address is: helpdesk@simotime.com * * Also, visit our Web Site at http://www.simotime.com * ***************************************************************** WORKING-STORAGE SECTION. 01 SIM-TITLE. 05 T1 pic X(11) value '* CBLA2EC1 '. 05 T2 pic X(34) value 'Convert ASC to EBC for RSEQ-80/80 '. 05 T3 pic X(10) value ' v16.01.01'. 05 T4 pic X(24) value ' helpdesk@simotime.com'. 01 SIM-COPYRIGHT. 05 C1 pic X(11) value '* CBLA2EC1 '. 05 C2 pic X(32) value 'This Data File Convert Member wa'. 05 C3 pic X(32) value 's generated by SimoTime Technolo'. 05 C4 pic X(04) value 'gies'. 01 ASCFILE-STATUS. 05 ASCFILE-STATUS-L pic X. 05 ASCFILE-STATUS-R pic X. 01 ASCFILE-EOF pic X value 'N'. 01 ASCFILE-OPEN-FLAG pic X value 'C'. 01 EBCFILE-STATUS. 05 EBCFILE-STATUS-L pic X. 05 EBCFILE-STATUS-R pic X. 01 EBCFILE-EOF pic X value 'N'. 01 EBCFILE-OPEN-FLAG pic X value 'C'. 01 ASCFILE-LRECL pic 9(5) value 00080. 01 EBCFILE-LRECL pic 9(5) value 00080. 01 ASCFILE-LRECL-MAX pic 9(5) value 00080. 01 EBCFILE-LRECL-MAX pic 9(5) value 00080. ***************************************************************** * The following buffers are used to create a four-byte status * * code that may be displayed. * ***************************************************************** 01 IO-STATUS. 05 IO-STAT1 pic X. 05 IO-STAT2 pic X. 01 IO-STATUS-04. 05 IO-STATUS-0401 pic 9 value 0. 05 IO-STATUS-0403 pic 999 value 0. 01 TWO-BYTES-BINARY pic 9(4) BINARY. 01 TWO-BYTES-ALPHA redefines TWO-BYTES-BINARY. 05 TWO-BYTES-LEFT pic X. 05 TWO-BYTES-RIGHT pic X. ***************************************************************** * Message Buffer used by the Z-DISPLAY-MESSAGE-TEXT routine. * ***************************************************************** 01 MESSAGE-BUFFER. 05 MESSAGE-HEADER pic X(011) value '* CBLA2EC1 '. 05 MESSAGE-TEXT. 10 MESSAGE-TEXT-1 pic X(068) value SPACES. 10 MESSAGE-TEXT-2 pic X(188) value SPACES. 01 MSG-LSB pic 9(5) value 267. ***************************************************************** 01 PROGRAM-NAME pic X(8) value 'CBLA2EC1'. 01 INFO-STATEMENT. 05 INFO-SHORT. 10 INFO-ID pic X(8) value 'Starting'. 10 filler pic X(2) value ', '. 10 filler pic X(34) value 'Convert ASC to EBC for RSEQ-80/80 '. 05 filler pic X(24) value ' http://www.SimoTime.com'. 01 APPL-RESULT pic S9(9) comp. 88 APPL-AOK value 0. 88 APPL-EOF value 16. 01 WRITE-FLAG pic X value 'Y'. 01 ASCFILE-TOTAL. 05 ASCFILE-RDR pic 9(9) value 0. 05 filler pic X(3) value ' - '. 05 filler pic X(23) value 'Line count for ASCFILE '. 01 EBCFILE-TOTAL. 05 EBCFILE-ADD pic 9(9) value 0. 05 filler pic X(3) value ' - '. 05 filler pic X(23) value 'Line count for EBCFILE '. ***************************************************************** * The following copy file contains the translation tables for * * the ASCII and EBCDIC conversion. Also, sections of the tables * * may be used for case conversion. * ***************************************************************** COPY ASCEBCB1. ***************************************************************** PROCEDURE DIVISION. move all '*' to MESSAGE-TEXT-1 perform Z-DISPLAY-MESSAGE-TEXT move INFO-STATEMENT to MESSAGE-TEXT-1 perform Z-DISPLAY-MESSAGE-TEXT move all '*' to MESSAGE-TEXT-1 perform Z-DISPLAY-MESSAGE-TEXT perform Z-POST-COPYRIGHT perform ASCFILE-OPEN perform EBCFILE-OPEN * USRSOJ Processing not specified... perform until ASCFILE-STATUS not = '00' perform ASCFILE-READ if ASCFILE-STATUS = '00' add 1 to ASCFILE-RDR perform BUILD-OUTPUT-RECORD if WRITE-FLAG = 'Y' perform EBCFILE-WRITE if EBCFILE-STATUS = '00' add 1 to EBCFILE-ADD end-if end-if end-if end-perform * USREOJ Processing not specified... move ASCFILE-TOTAL to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move EBCFILE-TOTAL to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT if APPL-EOF move 'Complete' to INFO-ID else move 'ABENDING' to INFO-ID end-if move INFO-STATEMENT to MESSAGE-TEXT(1:79) perform Z-DISPLAY-MESSAGE-TEXT perform EBCFILE-CLOSE perform ASCFILE-CLOSE GOBACK. ***************************************************************** BUILD-OUTPUT-RECORD. * TransMODE is A2E... * TransINIT process... move ALL X'40' to EBCFILE-REC * TransLATE... move ASCFILE-REC(00001:00080) to EBCFILE-REC(00001:00080) inspect EBCFILE-REC(1:80) converting A-INFO to E-INFO exit. ***************************************************************** * I/O Routines for the INPUT File... * ***************************************************************** ASCFILE-CLOSE. add 8 to ZERO giving APPL-RESULT. close ASCFILE-FILE if ASCFILE-STATUS = '00' subtract APPL-RESULT from APPL-RESULT else add 12 to ZERO giving APPL-RESULT end-if if APPL-AOK CONTINUE else move 'CLOSE Failure with ASCFILE ' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move ASCFILE-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. *---------------------------------------------------------------* ASCFILE-READ. read ASCFILE-FILE if ASCFILE-STATUS = '00' subtract APPL-RESULT from APPL-RESULT else if ASCFILE-STATUS = '10' add 16 to ZERO giving APPL-RESULT else add 12 to ZERO giving APPL-RESULT end-if end-if if APPL-AOK CONTINUE else if APPL-EOF move 'Y' to ASCFILE-EOF else move 'READ Failure with ASCFILE ' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move ASCFILE-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if end-if exit. *---------------------------------------------------------------* ASCFILE-OPEN. add 8 to ZERO giving APPL-RESULT. open input ASCFILE-FILE if ASCFILE-STATUS = '00' subtract APPL-RESULT from APPL-RESULT move 'O' to ASCFILE-OPEN-FLAG else add 12 to ZERO giving APPL-RESULT end-if if APPL-AOK CONTINUE else move 'OPEN Failure with ASCFILE ' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move ASCFILE-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. ***************************************************************** * I/O Routines for the OUTPUT File... * ***************************************************************** EBCFILE-WRITE. if EBCFILE-OPEN-FLAG = 'C' perform EBCFILE-OPEN end-if write EBCFILE-REC if EBCFILE-STATUS = '00' subtract APPL-RESULT from APPL-RESULT else if EBCFILE-STATUS = '10' add 16 to ZERO giving APPL-RESULT else add 12 to ZERO giving APPL-RESULT end-if end-if. if APPL-AOK CONTINUE else move 'WRITE Failure with EBCFILE ' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move EBCFILE-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. *---------------------------------------------------------------* EBCFILE-OPEN. add 8 to ZERO giving APPL-RESULT. open OUTPUT EBCFILE-FILE if EBCFILE-STATUS = '00' subtract APPL-RESULT from APPL-RESULT move 'O' to EBCFILE-OPEN-FLAG else add 12 to ZERO giving APPL-RESULT end-if if APPL-AOK CONTINUE else move 'OPEN Failure with EBCFILE ' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move EBCFILE-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. *---------------------------------------------------------------* EBCFILE-CLOSE. add 8 to ZERO giving APPL-RESULT. close EBCFILE-FILE if EBCFILE-STATUS = '00' subtract APPL-RESULT from APPL-RESULT move 'C' to EBCFILE-OPEN-FLAG else add 12 to ZERO giving APPL-RESULT end-if if APPL-AOK CONTINUE else move 'CLOSE Failure with EBCFILE ' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move EBCFILE-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. ***************************************************************** * The following Z-ROUTINES provide administrative functions * * for this program. * ***************************************************************** * ABEND the program, post a message to the console and issue * * a STOP RUN. * ***************************************************************** Z-ABEND-PROGRAM. if MESSAGE-TEXT not = SPACES perform Z-DISPLAY-MESSAGE-TEXT end-if move 'PROGRAM-IS-ABENDING...' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT add 12 to ZERO giving RETURN-CODE STOP RUN. * exit. ***************************************************************** Z-CALCULATE-MESSAGE-LSB. add 267 to ZERO giving MSG-LSB perform until MSG-LSB < 80 or MESSAGE-BUFFER(MSG-LSB:1) not = SPACE if MESSAGE-BUFFER(MSG-LSB:1) = SPACE subtract 1 from MSG-LSB end-if end-perform exit. ***************************************************************** * Display CONSOLE messages... * ***************************************************************** Z-DISPLAY-MESSAGE-TEXT. perform Z-CALCULATE-MESSAGE-LSB display MESSAGE-BUFFER(1:MSG-LSB) move all SPACES to MESSAGE-TEXT exit. ***************************************************************** * Display the file status bytes. This routine will display as * * four digits. If the full two byte file status is numeric it * * will display as 00nn. If the 1st byte is a numeric nine (9) * * the second byte will be treated as a binary number and will * * display as 9nnn. * ***************************************************************** Z-DISPLAY-IO-STATUS. if IO-STATUS not NUMERIC or IO-STAT1 = '9' move IO-STAT1 to IO-STATUS-04(1:1) subtract TWO-BYTES-BINARY from TWO-BYTES-BINARY move IO-STAT2 to TWO-BYTES-RIGHT add TWO-BYTES-BINARY to ZERO giving IO-STATUS-0403 move 'File Status is: nnnn' to MESSAGE-TEXT move IO-STATUS-04 to MESSAGE-TEXT(17:4) perform Z-DISPLAY-MESSAGE-TEXT else move '0000' to IO-STATUS-04 move IO-STATUS to IO-STATUS-04(3:2) move 'File Status is: nnnn' to MESSAGE-TEXT move IO-STATUS-04 to MESSAGE-TEXT(17:4) perform Z-DISPLAY-MESSAGE-TEXT end-if exit. ***************************************************************** Z-POST-COPYRIGHT. display SIM-TITLE display SIM-COPYRIGHT exit. ***************************************************************** * This program was generated by SimoZAPS * * A product of SimoTime Technologies * * Our e-mail address is: helpdesk@simotime.com * * Also, visit our Web Site at http://www.simotime.com * * * * Generation Date: 2018-10-10 Generation Time: 20:28:10:43 * *****************************************************************
This parameter file (CUSR80D1.ctl) is a member in the PARMLIB PDS and contains the data to be loaded into the test file.
000100 Anderson Adrian 1113 Peachtree Plaza Atlanta GA 26101 000200 Brown Billie 224 Baker Boulevard Baltimore MD 35702 000300 Carson Cameron 336 Crenshaw Blvd. Cupertino CA 96154 000400 Davidson Dion 448 Main Street Wilmington DE 27323 000500 Everest Evan 55 5TH Avenue New York NY 10341 000600 Franklin Francis 6612 66TH Avenue Bedrock NY 11903 000700 Garfunkel Gwen 777 77TH Street New York NY 16539 000800 Harrison Hilary 888 88TH Street Pocatello ID 79684 000900 Isley Isabel 999 99TH Avenue Indianapolis IN 38762 001000 Johnson Jamie 1010 Paradise Drive Larkspur CA 90504 001100 Kemper Kelly 1111 Oak Circle Kansas City KS 55651 001200 Lemond Lesley 1212 Lockwood Road Mohave Desert AZ 80303 001300 Mitchell Marlow 1313 Miller Creek Road Anywhere TX 77123 001400 Newman Noel 1414 Park Avenue Santa Monica CA 90210 001500 Osborn Owen 1515 Center Stage Rolling Rock PA 36613 001600 Powell Pierce PO Box 1616 Ventura CA 97712 001700 Quigley Quincy 1717 Farm Hill Road Oshkosh WI 43389 001800 Ripley Ray 1818 Alien Lane Wayout KS 55405 001900 Smith Sammy 1919 Carnoustie Drive Novato CA 94919 002000 Tucker Taylor 2020 Sanger Lane St. Paul MN 43998 002100 Underwood Ulysses 2121 Wall Street New York NY 17623 002200 Van Etten Valerie 2222 Vine Street Hollywood CA 98775 002300 Wilson Wiley 2323 Main Street Boston MA 01472 002400 Xray Xavier 2424 24TH Street Nashville TN 44190 002500 Young Yanni 2525 Yonge Street Toronto ON 6B74A6 002600 Zenith Zebulon 2626 26TH Street Dallas TX 71922
The following COBOL copy file (ASCEBCB1.cpy) contains the ASCII and EBCDIC tables. The tables may also be used to do case conversion.
***************************************************************** * AE9437B1.cpy - a COBOL Copy File * * Copyright (C) 1987-2018 SimoTime Technologies * * All Rights Reserved * * Provided by SimoTime Technologies * * Our e-mail address is: helpdesk@simotime.com * * Also, visit our Web Site at http://www.simotime.com * ***************************************************************** * The following tables are used by the INSPECT statement to do * * the conversion between EBCDIC and ASCII. * * * * inspect FIELD-NAME converting EBCDIC-INFO to ASCII-INFO * * inspect FIELD-NAME converting ASCII-INFO to EBCDIC-INFO * * * * The tables include the alphabet for upper and lower case, the * * digits 0-9, the special characters (US) and the alternate * * codes for A, E, I, O, and U with the appropriate acute, * * grave, umlaut, circumflex and tilde. * * To display the alternate codes the Courier New (Fixed) or * * Times New Roman (Proportional) font should be used. * * * * SimoZAPS contains four tables that may be used for various * * Upper/Lower Case or EBCDIC/ASCII conversion requirements. * * ASCEBCB1.CPY - includes a full character set for the alphabet * * (upper/lower case), digit, special characters * * and alternate codes for characters with the * * acute, grave, umlaut, tilde and circumflex. * * Caution: this table does not convert the Y * * characters with an umlat. * * ASCEBCB2.CPY - includes the character set for the translation * * between EBCDIC/ASCII of signed/unsigned, * * zoned-decimal, numeric fields. * * ASCEBCB3.CPY - includes the character set for the alternate * * codes with the acute, grave, umlaut, tilde and * * circumflex. This is primarily used for case * * conversion. * * Note: this table converts the Y characters * * with an umlat, this will convert high-values * * X'FF' to X'DF' * * ASCEBCB4.CPY - includes the character set for the alphabet * * (upper/lower case), digit, special characters. * * This is primarily used in the US where the * * alternate codes may not be required. * * ASCEBCB5.CPY - includes a full character set for the alphabet * * (upper/lower case), digit, special characters * * and alternate codes for characters with the * * acute, grave, umlaut, tilde and circumflex. * * Caution: this table will convert the Y * * characters with an umlat. * ***************************************************************** * * ------------------------------------------------------------ 01 EBCDIC-DATA. 05 FILLER pic X(16) value X'000102030405060708090A0B0C0D0E0F'. 000-015 05 FILLER pic X(16) value X'101112131415161718191A1B1C1D1E1F'. 016-031 05 FILLER pic X(16) value X'202122232425262728292A2B2C2D2E2F'. 032-047 05 FILLER pic X(16) value X'303132333435363738393A3B3C3D3E3F'. 048-063 05 FILLER pic X(16) value X'404142434445464748494A4B4C4D4E4F'. 064-079 05 FILLER pic X(16) value X'505152535455565758595A5B5C5D5E5F'. 080=095 05 FILLER pic X(16) value X'606162636465666768696A6B6C6D6E6F'. 096-111 05 FILLER pic X(16) value X'707172737475767778797A7B7C7D7E7F'. 112-127 05 FILLER pic X(16) value X'808182838485868788898A8B8C8D8E8F'. 128-143 05 FILLER pic X(16) value X'909192939495969798999A9B9C9D9E9F'. 144-159 05 FILLER pic X(16) value X'A0A1A2A3A4A5A6A7A8A9AAABACADAEAF'. 160-175 05 FILLER pic X(16) value X'B0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF'. 176-191 05 FILLER pic X(16) value X'C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF'. 192-207 05 FILLER pic X(16) value X'D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF'. 208-223 05 FILLER pic X(16) value X'E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF'. 224-239 05 FILLER pic X(16) value X'F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF'. 240-255 01 E-INFO redefines EBCDIC-DATA pic X(256). 01 EBCDIC-TABLE redefines EBCDIC-DATA. 05 EBCDIC-BYTE pic X occurs 256 times. * * ------------------------------------------------------------ 01 ASCII-DATA. 05 FILLER pic X(16) value X'000102039C09867F978D8E0B0C0D0E0F'. 000-015 05 FILLER pic X(16) value X'101112139D8508871819928F1C1D1E1F'. 016-031 05 FILLER pic X(16) value X'80818283840A171B88898A8B8C050607'. 032-047 05 FILLER pic X(16) value X'909116939495960498999A9B14159E1A'. 048-063 05 FILLER pic X(16) value X'20A0E2E4E0E1E3E5E7F1A22E3C282B7C'. 064-079 05 FILLER pic X(16) value X'26E9EAEBE8EDEEEFECDF21242A293BAC'. 080=095 05 FILLER pic X(16) value X'2D2FC2C4C0C1C3C5C7D1A62C255F3E3F'. 096-111 05 FILLER pic X(16) value X'F8C9CACBC8CDCECFCC603A2340273D22'. 112-127 05 FILLER pic X(16) value X'D8616263646566676869ABBBF0FDFEB1'. 128-143 05 FILLER pic X(16) value X'B06A6B6C6D6E6F707172AABAE6B8C6A4'. 144-159 05 FILLER pic X(16) value X'B57E737475767778797AA1BFD0DDDEAE'. 160-175 05 FILLER pic X(16) value X'5EA3A5B7A9A7B6BCBDBE5B5DAFA8B4D7'. 176-191 05 FILLER pic X(16) value X'7B414243444546474849ADF4F6F2F3F5'. 192-207 05 FILLER pic X(16) value X'7D4A4B4C4D4E4F505152B9FBFCF9FAFF'. 208-223 05 FILLER pic X(16) value X'5CF7535455565758595AB2D4D6D2D3D5'. 224-239 05 FILLER pic X(16) value X'30313233343536373839B3DBDCD9DAFF'. 240-255 01 A-INFO redefines ASCII-DATA pic X(256). 01 ASCII-TABLE redefines ASCII-DATA. 05 ASCII-BYTE pic X occurs 256 times. * *** AE0437B1 - End-of-Copy File - - - - - - - - - - - AE0437B1 * ***************************************************************** *
The Data File Conversion programs are generated using the SimoTime Utility program (SimoZAPS) and a Process Control File. The following (CBLE2A01.pcf) shows the content of the Process Control File.
*********************************************************************** * CBLE2A01.pcf - a Process Control File * * SimoTime Program Generation Technologies * * (C) Copyright 1987-2019 All Rights Reserved * * Web Site URL: http://www.simotime.com * * e-mail: helpdesk@simotime.com * *********************************************************************** * SYSUT1 is an EBCDIC-encoded Sequential File, 80-byte records. * SYSUT2 is an ASCII-encoded Sequential File, 80-byte records. *********************************************************************** &SIMOPREP call ..\..\ENV1BASE &USERPREP call USERCONV &CONFORM IBM &DIALECT C2 *HEAD34 ....:....1....:....2....:....3.... &HEAD34 Convert EBC to ASC for RSEQ-80/80 &IOMODNAME CBLE2AC1 &SYSUT1 name=EBCFILE org=Sequential recfm=FIXED rlen=80 &SYSUT2 name=ASCFILE org=Sequential recfm=FIXED rlen=80 &TransMODE E2A &TransINIT X'20' &TRANSLATE FROM POS 1 LEN 80 TO POS 1 LEN 80 &END
This suite of jobs describe how to convert data structures (or records within a file) between EBCDIC and ASCII. This document may be used to assist as a tutorial for new programmers or as a quick reference for experienced programmers.
In the world of programming there are many ways to solve a problem. This 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.
Software Agreement and Disclaimer
Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Technologies. Once the fee is received by SimoTime the latest version of the software, documentation or training material will be delivered and a license will be granted for use within an enterprise, provided the SimoTime copyright notice appear on all copies of the software. The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Technologies.
SimoTime Technologies makes no warranty or representations about the suitability of the software, documentation or learning material for any purpose. It is provided "AS IS" without any expressed or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement. SimoTime Technologies shall not be liable for any direct, indirect, special or consequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software, documentation or training material.
This section includes links to documents with additional information that are beyond the scope and purpose of this document. The first group of documents may be available from a local system or via an internet connection, the second group of documents will require an internet connection.
Note: A SimoTime License is required for the items to be made available on a local system or server.
The following links may be to the current server or to the Internet.
Note: The latest versions of the SimoTime Documents and Program Suites are available on the Internet and may be accessed using the icon. If a user has a SimoTime Enterprise License the Documents and Program Suites may be available on a local server and accessed using the icon.
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.
Explore the COBOL Connection for more examples of COBOL programming techniques and sample code.
Explore An Enterprise System Model that describes and demonstrates how Applications that were running on a Mainframe System and non-relational data that was located on the Mainframe System were copied and deployed in a Microsoft Windows environment with Micro Focus Enterprise Server.
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.
The following links will require an internet connect.
This suite of programs and documentation is available to download for review and evaluation purposes. Other uses will require a SimoTime Software License. Link to an Evaluation zPAK Option that includes the program members, documentation and control files.
A good place to start is The SimoTime Home Page for access to white papers, program examples and product information. This link requires an Internet Connection
Explore The Micro Focus Web Site for more information about products (including Micro Focus COBOL) and services available from Micro Focus. This link requires an Internet Connection.
Explore the Glossary of Terms for a list of terms and definitions used in this suite of documents and white papers.
This document was created and is maintained by SimoTime Technologies. If you have any questions, suggestions, comments or feedback please use the following contact information.
1. | Send an e-mail to our helpdesk. |
1.1. | helpdesk@simotime.com. |
2. | Our telephone numbers are as follows. |
2.1. | 1 415 763-9430 office-helpdesk |
2.2. | 1 415 827-7045 mobile |
We appreciate hearing from you.
SimoTime Technologies was founded in 1987 and is a privately owned company. We specialize in the creation and deployment of business applications using new or existing technologies and services. We have a team of individuals that understand the broad range of technologies being used in today's environments. Our customers include small businesses using Internet technologies to corporations using very large mainframe systems.
Quite often, to reach larger markets or provide a higher level of service to existing customers it requires the newer Internet technologies to work in a complementary manner with existing corporate mainframe systems. We specialize in preparing applications and the associated data that are currently residing on a single platform to be distributed across a variety of platforms.
Preparing the application programs will require the transfer of source members that will be compiled and deployed on the target platform. The data will need to be transferred between the systems and may need to be converted and validated at various stages within the process. SimoTime has the technology, services and experience to assist in the application and data management tasks involved with doing business in a multi-system environment.
Whether you want to use the Internet to expand into new market segments or as a delivery vehicle for existing business functions simply give us a call or check the web site at http://www.simotime.com
Return-to-Top |
File Conversion, ASCII and EBCDIC - QSAM and VSAM |
Copyright © 1987-2025 SimoTime Technologies and Services All Rights Reserved |
When technology complements business |
http://www.simotime.com |