EBCDIC to ASCII Convert
Use COBOL or HLASM Programs
  Table of Contents  v-24.01.01 - e2acvt01.htm 
  Introduction
  Overview
  Job Flow Diagram using COBOL
  Considerations
  Limitations
  Batch Jobs
  Windows CMD Files
  Convert, EBC to ASC for RSEQ/80
  Job Execution using COBOL Programs
  Job Execution using HLASM Programs
  JCL Members
  Convert, EBC to ASC for RSEQ/80
  Job Execution using COBOL Programs
  Job Execution using HLASM Programs
  COBOL Members
  CBL, File Access for RSEQ/80
  CBL, Convert Routine
  CBL, Copy Files
  Conversion Table Definition
  Pass Area Definition
  HLASM Members
  HLASM, File Access for RSEQ/80
  HLASM, Convert Routine
  Copy File for ASCII Table
  Ancillary Functions
  Set the Environment
  Display and Log Messages
  Directive Files for COBOL
  COBOL, ASCII without HLASM
  COBOL, EBCDIC with HLASM
  Summary
  Software Agreement and Disclaimer
  Downloads and Links
  Current Server or Internet Access
  Internet Access Required
  Glossary of Terms
  Contact or Feedback
  Company Overview
The SimoTime Home Page 

Table of Contents Previous Section Next Section Introduction

The primary purpose of this suite of job scripts and programs is to describe and demontrate how to convert EBCDIC encoded text string to ASCII encoded text strings. The conversion process may be executed using COBOL or HLASM (High Level Assembler) programs. The first program does the file I/O processing by reading an existing record sequential file, calling a second program to do the record content conversion and writing to a new record sequential file.

This document will describe and demonstrate how the conversion process is executed using COBOL programs or HLASM programs that will read an EBCDIC encoded record sequential file and produce an ASCII encoded record sequential file.


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-2024
SimoTime Technologies and Services
All Rights Reserved

Table of Contents Previous Section Next Section Overview

The following is an overview of the life cycle for this suite of programs.

1. in the early-1970's the original HLASM programs were written and executed on an IBM Mainframe System.
1.1. The HLASM programs were compiled using IBM Mainframe Assembler.
1.2. A new job script or JCL Member was created and used to prepare the job environment and execute the programs.
2. In 1986 the HLASM programs were converted (this task was mostly a re-write) to COBOL.
2.1. The COBOL programs were compiled using IBM COBOL/2.
2.2. A job script or JCL Member was used to prepare the job environment and execute the programs.
3. In 1989 the program source code that included COBOL, HLASM and JCL was copied to a Windows System.
3.1. The HLASM programs were compiled using Micro Focus Assembler (MF/370).
3.1.1. The existing job script or JCL Member was used to prepare the job environment and execute the programs in a Micro Focus Mainframe sub-System environment.
3.1.2. A new job script or Windows CMD File was created and used to prepare the job environment and execute the programs from a Windows CMD line without having to configure a Micro Focus Mainframe sub-System environment..
3.2. The COBOL programs were compiled and tested using Micro Focus COBOL technology.
3.2.1. The existing job script or JCL Member was used to prepare the job environment and execute the programs in a Micro Focus Mainframe sub-System environment.
3.2.2. A new job script or Windows CMD File was created and used to prepare the job environment and execute the programs from a Windows CMD line without having to configure a Micro Focus Mainframe sub-System environment..
4. In 2017 the source code for the COBOL programs was copied to a Linux System.
4.1. The COBOL programs were compiled using GnuCOBOL technology.
4.2. A new job script or Bash Member was created and used to prepare the job environment and execute the programs.

 

Table of Contents Previous Section Next Section Job Flow Diagram using COBOL

The following is a block diagram of the logic flow for the EBCDIC to ASCII Conversion process.

             
Entry Point
ZOS
Entry Point
Windows
   
   
E2AR80J1
jcl
E2AR80E1
cmd
The JCL or CMD member for running the application.
   
   
IEFBR14
Utility
IF Exist
statement
Delete any previously created SYSUT2 file.
   
   
 
 
   
   
 
 
   
   
SYSUT1
rseq
 
 
E2AR80C1
cbl
   
   
SYSUT2
rseq
Read the input file (SYSUT1) containing EBCDIC Text Strings and create a new file (SYSUT2) containing ASCII Text Strings.
   
   
   
   
   
E2ACBLC1
cbl
Call E2ACBLC1 to convert EBCDIC to ASCII.
   
EOJ
End-of-Job
 
Converts EBCDIC encoded Text Strings to ASCII encoded Text Strings

Color Associations: The  light-green  boxes are unique to SIMOTIME Technologies using an IBM Mainframe System or Micro Focus Enterprise Developer. The  light-red  boxes are unique to the SIMOTIME Technologies using a Linux, UNIX or Windows System and COBOL Technologies such as Micro Focus. The  light-yellow  boxes are SIMOTIME Technologies, Third-party Technologies, decision points or program transitions in the processing logic or program generations. The  light-blue  boxes identify the input/output data structures such as Documents, Spreadsheets, Data Files, VSAM Data Sets, Partitioned Data Set Members (PDSM's) or Relational Tables. The  light-gray  boxes identify a system function or an informational item.

Table of Contents Previous Section Next Section Considerations

WIP

Table of Contents Previous Section Next Section Limitations

WIP

Table of Contents Previous Section Next Section Batch Jobs

This section provides information about the batch job processes that do data file conversions on a Windows System.

Table of Contents Previous Section Next Section Windows CMD Files

This section provides information about the Windows Command Files that are used as batch job scripts to prepare the job environment and execute the programs that do the EBCDIC to ASCII conversion.

Table of Contents Previous Section Next Section Convert, EBC to ASC for RSEQ/80

This section provides information about the batch job processes that do data file conversions on a Windows System.

Table of Contents Previous Section Next Section Job Execution using COBOL Programs

The following (E2AR80W1.cmd) is a listing of the Windows CMD needed to run this job.

@echo OFF
     set CmdName=E2AR80W1
rem  * *******************************************************************
rem  *               E2AR80W1.cmd - a Windows Command File               *
rem  *         This program is provided by SimoTime Technologies         *
rem  *           (C) Copyright 1987-2019 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  *
rem  * Text    - Convert EBC encoded text to ASC using COBOL
rem  * Author  - SimoTime Technologies
rem  * Date    - November 11, 1982
rem  * Version - 06.07.16
rem  *
rem  * An example of a COBOL Program that calls a COBOL program.
rem  *
rem  * This job will run on a Windows System with Micro Focus
rem  * Enterprise Developer.
rem  *
rem  *    ************
rem  *    * E2AR80W1 *
rem  *    ********cmd*
rem  *         *
rem  *         *
rem  *    ***********
rem  *    *   RUN   ******************************
rem  *    ***********                            *
rem  *         *           ************     ************     ************
rem  *         *           *  SYSUT1  ******* E2AR80C1 *******  SYSUT2  *
rem  *         *           *******rseq*     ********cbl*     *******rseq*
rem  *         *                                 *
rem  *         *                            ************
rem  *         *                            * E2ACBLC1 *
rem  *         *                            ********cbl*
rem  *         *
rem  *    ************
rem  *    *   EOJ    *
rem  *    ************
rem  *
rem  *
rem  * ********************************************************************
rem  * Step   1 of 2  Prepare the System and Job environment...
rem  *
     call ..\ENV1EBC1
     if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
rem  *
     call SimoNOTE "*******************************************************%CmdName%"
     call SimoNOTE "Starting CmdName %CmdName%"
     set SYSOUT=%BASELIB1%\LOGS\SYSOUT_%CmdName%.txt
     set SYSUT1=%BASELIB1%\DATA\EBC1\SIMOTIME.DATA.CUST0080.DAT
     set SYSUT2=%BASELIB1%\DATA\WRK1\SIMOTIME.DATA.CUST0080.DAT
rem  * ********************************************************************
rem  * Step   2 of 2  Execute the sample program...
rem  *
     run E2AR80C1
     if not "%ERRORLEVEL%" == "0" set JobStatus=0010
     if not "%JobStatus%" == "0000" goto :EojNOK
rem  * ********************************************************************
:EojAOK
     call SimoNOTE "Finished CmdName %CmdName%, Job Status is %JobStatus%"
     goto :End
:EojNOK
     call SimoNOTE "ABENDING CmdName %CmdName%, Job Status is %JobStatus%"
     echo %DATE% - %TIME% Starting User ABEND Processing...>>%SYSLOG%
     set >>%SYSLOG%
     echo %DATE% - %TIME% Complete User ABEND Processing...>>%SYSLOG%
     goto :End
:End
     if not "%1" == "nopause" pause
     exit /B %JobStatus%

Table of Contents Previous Section Next Section Job Execution using HLASM Programs

The following (E2AR80E1.cmd) is a listing of the Windows CMD needed to run this job.

@echo OFF
     set CmdName=E2AR80E1
rem  * *******************************************************************
rem  *               E2AR80E1.cmd - a Windows Command File               *
rem  *         This program is provided by SimoTime Technologies         *
rem  *           (C) Copyright 1987-2019 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  *
rem  * Text    - Convert EBC encoded text to ASC using HLASM
rem  * Author  - SimoTime Technologies
rem  * Date    - November 11, 1982
rem  * Version - 06.07.16
rem  *
rem  * An example of an HLASM Program that calls an HLASM program.
rem  *
rem  * This job will run on a Windows System with Micro Focus
rem  * Enterprise Developer.
rem  *
rem  *    ************
rem  *    * E2AR80E1 *
rem  *    ********cmd*
rem  *         *
rem  *         *
rem  *    ***********
rem  *    *   RUN   ******************************
rem  *    ***********                            *
rem  *         *           ************     ************     ************
rem  *         *           *  SYSUT1  ******* E2AR80A1 *******  SYSUT2  *
rem  *         *           *******rseq*     ******hlasm*     *******rseq*
rem  *         *                                 *
rem  *         *                            ************
rem  *         *                            * E2AASMA1 *
rem  *         *                            ******hlasm*
rem  *         *
rem  *    ************
rem  *    *   EOJ    *
rem  *    ************
rem  *
rem  *
rem  * ********************************************************************
rem  * Step   1 of 2  Prepare the System and Job environment...
rem  *
     call ..\ENV1EBC1
     if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
rem  *
     call SimoNOTE "*******************************************************%CmdName%"
     call SimoNOTE "* Starting CmdName %CmdName%"
     set SYSOUT=%BASELIB1%\LOGS\SYSOUT_%CmdName%.txt
     set SYSUT1=%BASELIB1%\DATA\EBC1\SIMOTIME.DATA.CUST0080.DAT
     set SYSUT2=%BASELIB1%\DATA\WRK1\SIMOTIME.HLASM.CUST0080.DAT
rem  * ********************************************************************
rem  * Step   2 of 2  Execute the sample program...
rem  *
     run E2AR80A1
     if not "%ERRORLEVEL%" == "0" set JobStatus=0010
     if not "%JobStatus%" == "0000" goto :EojNOK
rem  * ********************************************************************
:EojAOK
     call SimoNOTE "* Finished CmdName %CmdName%, Job Status is %JobStatus%"
     goto :End
:EojNOK
     call SimoNOTE "* ABENDING CmdName %CmdName%, Job Status is %JobStatus%"
     echo %DATE% - %TIME% Starting User ABEND Processing...>>%SYSLOG%
     set >>%SYSLOG%
     echo %DATE% - %TIME% Complete User ABEND Processing...>>%SYSLOG%
     goto :End
:End
     if not "%1" == "nopause" pause
     exit /B %JobStatus%

Table of Contents Previous Section Next Section JCL Members

This section provides information about the JCL Members (the Job Control Language used in a Mainframe Environment) that are used as batch job scripts to prepare the job environment and execute the programs that do the EBCDIC to ASCII conversion.

Table of Contents Previous Section Next Section Convert, EBC to ASC for RSEQ/80

This section provides information about the batch job processes that do data file conversions in a Mainframe System environment.

Table of Contents Previous Section Next Section Job Execution using COBOL Programs

The following (E2AR80J1.jcl) is a listing of a JCL Member that will execute the conversion process using COBOL programs.

//E2AR80J1 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1
//* *******************************************************************
//*       E2AR80J1.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   - Convert EBC encoded text string to ASC
//* Author - SimoTime Technologies
//* Date   - January 24, 1996
//*
//* An example of a COBOL Program that calls a COBOL program.
//*
//* This job will run on a Windows System with Micro Focus
//* Enterprise Developer or an IBM Mainframe System with ZOS.
//*
//*    ************
//*    * E2AR80J1 *
//*    ********jcl*
//*         *
//*    ************
//*    *  IEFBR14 *     * Delete previously created SYSUT2
//*    ************
//*         *
//*    ***********
//*    *  EXEC   ******************************
//*    ***********                            *
//*         *           ************     ************     ************
//*         *           *  SYSUT1  ******* E2AR80C1 *******  SYSUT2  *
//*         *           *******rseq*     ********cbl*     *******rseq*
//*         *                                 *
//*         *                            ************
//*         *                            * E2ACBLC1 *
//*         *                            ********cbl*
//*         *
//*    ************
//*    *   EOJ    *
//*    ************
//*
//* *******************************************************************
//* Step 1 of 2, Delete any previously created file...
//*
//DELETE   EXEC PGM=IEFBR14
//SYSUT2   DD  DSN=SIMOTIME.DATA.CURS80A1,DISP=(MOD,DELETE,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//*
//* *******************************************************************
//* Step 2 of 2, Convert EBC encoded records to ASC...
//*
//CONVERT  EXEC PGM=E2AR80C1
//SYSOUT   DD  SYSOUT=*
//* :....1....:....2....:....3....:....4....:....5....:....6....:....7....:....8
//SYSUT1   DD  DSN=SIMOTIME.DATA.CURS80E1,DISP=SHR
//SYSUT2   DD  DSN=SIMOTIME.DATA.CURS80A1,
//             DISP=(NEW,CATLG,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//

Table of Contents Previous Section Next Section Job Execution using HLASM Programs

The following (E2AR80E1.jcl) is a listing of a JCL Member that will execute the conversion process using HLASM programs.

//E2AR80E1 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1
//* *******************************************************************
//*       E2AR80E1.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   - Convert EBC encoded text string to ASC
//* Author - SimoTime Technologies
//* Date   - January 24, 1996
//*
//* An example of an HLASM Program that calls an HLASM program.
//*
//* This job will run on a Windows System with Micro Focus
//* Enterprise Developer or an IBM Mainframe System with ZOS.
//*
//*    ************
//*    * E2AR80E1 *     * Job Script
//*    ********jcl*
//*         *
//*    ************
//*    *  IEFBR14 *     * Delete previously created SYSUT2
//*    ************
//*         *
//*    ***********
//*    *  EXEC   ******************************
//*    ***********                            *
//*         *           ************     ************     ************
//*         *           *  SYSUT1  ******* E2AR80A1 *******  SYSUT2  *
//*         *           *******rseq*     ******hlasm*     *******rseq*
//*         *                                 *
//*         *                            ************
//*         *                            * E2AASMA1 *
//*         *                            ******hlasm*
//*         *
//*    ************
//*    *   EOJ    *
//*    ************
//*
//* *******************************************************************
//* Step 1 of 2, Delete any previously created file...
//*
//DELETE   EXEC PGM=IEFBR14
//SYSUT2   DD  DSN=SIMOTIME.DATA.CURS80A1,DISP=(MOD,DELETE,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//*
//* *******************************************************************
//* Step 2 of 2, Convert EBC encoded records to ASC...
//*
//CONVERT  EXEC PGM=E2AR80A1
//SYSOUT   DD  SYSOUT=*
//* :....1....:....2....:....3....:....4....:....5....:....6....:....7....:....8
//SYSUT1   DD  DSN=SIMOTIME.DATA.CURS80E1,DISP=SHR
//SYSUT2   DD  DSN=SIMOTIME.DATA.CURS80A1,
//             DISP=(NEW,CATLG,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//

Table of Contents Previous Section Next Section COBOL Members

This section provides information about the COBOL members (or COBOL source code) that are used in the EBCDIC to ASCII conversion process.

Table of Contents Previous Section Next Section CBL, File Access for RSEQ/80

The following (E2AR80C1.cbl) is the COBOL I/O program that was generated with SimoTime technology. The program was tested using Micro Focus Enterprise Server on Windows/XP. The program was successfully executed in both an EBCDIC and ASCII encoded configuration. This program will do the File-Format (i.e. Record-Sequential to Line Sequential) conversion.

      *
      *****************************************************************
       IDENTIFICATION DIVISION.
       PROGRAM-ID.      E2AR80C1
      *AUTHOR.          SIMOTIME TECHNOLOGIES
      *Generation Date: 2019-03-31
      *Generation Time: 00:04:08:40
      *****************************************************************
      * Copyright (C) 1987-2019 SimoTime Technologies.                *
      *                                                               *
      * All rights reserved.  Unpublished, all rights reserved under  *
      * copyright law and international treaty.  Use of a copyright   *
      * notice is precautionary only and does not imply publication   *
      * or disclosure.                                                *
      *                                                               *
      * Permission to use, copy, modify and distribute this software  *
      * for any non-commercial purpose and without fee is hereby      *
      * granted, 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.                                                 *
      *                                                               *
      * Permission to use, copy, modify and distribute this software  *
      * for any commercial purpose requires a fee to be paid to       *
      * SimoTime Technologies. Once the fee is received by SimoTime   *
      * the latest version of the software 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 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                                  *
      *                                                               *
      * SimoTime Technologies                                         *
      * 15 Carnoustie Drive                                           *
      * Novato, CA 94949-5849                                         *
      * 415.883.6565                                                  *
      *                                                               *
      * RESTRICTED RIGHTS LEGEND                                      *
      * Use, duplication, or disclosure by the Government is subject  *
      * to restrictions as set forth in subparagraph (c)(1)(ii) of    *
      * the Rights in Technical Data and Computer Software clause at  *
      * DFARS 52.227-7013 or subparagraphs (c)(1) and (2) of          *
      * Commercial  Computer Software - Restricted Rights  at 48      *
      * CFR 52.227-19, as applicable.  Contact SimoTime Technologies, *
      * 15 Carnoustie Drive, Novato, CA 94949-5849.                   *
      *                                                               *
      *****************************************************************
      * This program is provided by SimoTime Technologies
      * Our e-mail address is: helpdesk@simotime.com
      * Also, visit our Web Site at http://www.simotime.com
      *
      *****************************************************************
      * This suite of job scripts and programs perform the following.
      *    1. Read an EBC encoded Record from a Sequential File.
      *    2. Call a COBOL Program to convert from EBC to ASC.
      *    3. Write an ASC encoded record to a Sequential File.
      *
      * Both files are record sequential (RSEQ) files with 80 byte,
      * fixed length records.
      *
      *                   ************
      *                   *   run    *     * Micro Focus run time.
      *                   *******exec*
      *                        *
      *  ************     ************     ************
      *  *  SYSUT1  *-----* E2AR80C1 *-----*  SYSUT2  *
      *  *******rseq*     ********cbl*     *******rseq*
      *                        *   *
      *                        *   *       ************
      *                        *   *--call-* E2ACBLC1 *
      *                        *           ******cobol*
      *                        *
      *                   ************
      *                   *   EOJ    *
      *                   ************
      *
      *****************************************************************
      * 1992/06/01, Simmons, Created Member
      * 1995/09/15, Simmons, Added more comments for documentation.
      *                      Compiled & executed on a Windows System
      *                      with Micro Focus COBOL.
      * 2018/05/22, Simmons, Compiled & executed on a Linux System
      *                      with GnuCOBOL.
      *
      *
      *****************************************************************
       ENVIRONMENT DIVISION.
       INPUT-OUTPUT SECTION.
       FILE-CONTROL.
           SELECT SYSUT1-FILE ASSIGN TO SYSUT1
               ORGANIZATION         IS SEQUENTIAL
               ACCESS MODE          IS SEQUENTIAL
               FILE STATUS          IS SYSUT1-STATUS.
           SELECT SYSUT2-FILE ASSIGN TO SYSUT2
               ORGANIZATION         IS SEQUENTIAL
               ACCESS MODE          IS SEQUENTIAL
               FILE STATUS          IS SYSUT2-STATUS.
      *
      *****************************************************************
       DATA DIVISION.
       FILE SECTION.
      *
       FD  SYSUT1-FILE
           DATA RECORD IS SYSUT1-REC.
       01  SYSUT1-REC.
           05  SYSUT1-DATA-01 PIC X(00080).
      *
       FD  SYSUT2-FILE
           DATA RECORD IS SYSUT2-REC.
       01  SYSUT2-REC.
           05  SYSUT2-DATA-01 PIC X(00080).
      *
      *****************************************************************
       WORKING-STORAGE SECTION.
      *****************************************************************
       01  SYSUT1-STATUS.
           05  SYSUT1-STATUS-L     pic X.
           05  SYSUT1-STATUS-R     pic X.
       01  SYSUT1-EOF              pic X       value 'N'.
       01  SYSUT1-OPEN-FLAG        pic X       value 'N'.
       01  SYSUT1-LRECL            pic 9(5)    value 00080.
      *****************************************************************
       01  SYSUT2-STATUS.
           05  SYSUT2-STATUS-L     pic X.
           05  SYSUT2-STATUS-R     pic X.
       01  SYSUT2-EOF              pic X       value 'N'.
       01  SYSUT2-OPEN-FLAG        pic X       value 'N'.
       01  SYSUT2-LRECL            pic 9(5)    value 00080.
      *
      *****************************************************************
      *    Data-structure for Title, Copyright and Thank you...
      *    ------------------------------------------------------------
       01  SIM-TITLE.
           05 ST1 pic X(34) value 'I/O Program for EBC to ASC Convert'.
           05 ST2 pic X(34) value ' v00.00.00 http://www.simotime.com'.
       01  SIM-COPYRIGHT.
           05 ST3 pic X(34) value 'Copyright - 1987-2019 by SimoTime '.
           05 ST4 pic X(34) value 'Technologies - All Rights Reserved'.

       01  SIM-THANKS-01.
           05 TU1 pic X(34) value 'Thank you for using this program p'.
           05 TU2 pic X(34) value 'rovided from SimoTime Technologies'.
       01  SIM-THANKS-02.
           05 TU3 pic X(34) value 'Please send all inquires or sugges'.
           05 TU4 pic X(34) value 'tions to the helpdesk@simotime.com'.

      *
      *****************************************************************
      *    Message Buffer used for display to SYSOUT or CONSOLE.
      *    MSG-CTR, Counter of trailing spaces in the Message Buffer
      *    MSG-LOB, Allocated Length of Message Buffer
      *    MSG-LSB, Last Significant Byte in Message Buffer
      *****************************************************************
       01  MESSAGE-BUFFER.
           05  MESSAGE-HEADER      pic X(011)  value '* E2AR80C1 '.
           05  MESSAGE-TEXT.
               10  MESSAGE-TEXT-1  pic X(068)  value SPACES.
               10  MESSAGE-TEXT-2  pic X(188)  value SPACES.
       01  MSG-CTR                 pic 9(3)    value 0.
       01  MSG-LOB                 pic 9(3)    value 267.
       01  MSG-LSB                 pic 9(3)    value 267.

      *****************************************************************
      * 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.

       01  APPL-RESULT             pic S9(9)    comp.
           88  APPL-AOK            value 0.
           88  APPL-EOF            value 16.
      *
       01  PROGRAM-NAME            pic X(8)     value 'E2AR80C1'.

       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   'Read ASC/RSEQ, Write EBC/RSEQ/256 '.
           05  filler      pic X(24)
               value ' http://www.SimoTime.com'.
       01  WRITE-FLAG      pic X       value 'Y'.

       01  SYSUT1-TOTAL.
           05  SYSUT1-RDR  pic 9(9)    value 0.
           05  filler      pic X(3)    value ' - '.
           05  filler      pic X(23)   value 'Line count for SYSUT1  '.
       01  SYSUT2-TOTAL.
           05  SYSUT2-ADD  pic 9(9)    value 0.
           05  filler      pic X(3)    value ' - '.
           05  filler      pic X(23)   value 'Line count for SYSUT2  '.

       COPY E2ACVTB1.
      *
      *****************************************************************
       PROCEDURE DIVISION.
           move '* Enter, PROCEDURE DIVISION' to MESSAGE-TEXT
           perform Z-POST-MESSAGE-TO-USER

           perform STARTING-PROGRAM
           perform SYSUT1-OPEN
           perform SYSUT2-OPEN

      *    USRSOJ Processing not specified...

           perform until SYSUT1-STATUS not = '00'
               perform SYSUT1-READ
               if  SYSUT1-STATUS = '00'
                   add 1 to SYSUT1-RDR
                   perform BUILD-OUTPUT-RECORD
                   if  WRITE-FLAG = 'Y'
                       perform SYSUT2-WRITE
                       if  SYSUT2-STATUS = '00'
                           add 1 to SYSUT2-ADD
                       end-if
                   end-if
               end-if
           end-perform

      *    USREOJ Processing not specified...

           move SYSUT1-TOTAL to MESSAGE-TEXT
           perform Z-POST-MESSAGE-TO-USER

           move SYSUT2-TOTAL to MESSAGE-TEXT
           perform Z-POST-MESSAGE-TO-USER

           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-POST-MESSAGE-TO-USER

           perform SYSUT2-CLOSE
           perform SYSUT1-CLOSE

           perform STOPPING-PROGRAM

           move '* Leave , PROCEDURE DIVISION' to MESSAGE-TEXT
           perform Z-POST-MESSAGE-TO-USER
           GOBACK.

      *****************************************************************
       BUILD-OUTPUT-RECORD.
           add 80 to ZERO giving E2ACVT-TXT-SIZE
           move SYSUT1-REC    to SYSUT2-REC

           call 'E2ACBLC1' using E2ACVT-TXT-SIZE,
                                 SYSUT2-REC

           add E2ACVT-TXT-SIZE to ZERO giving SYSUT2-LRECL
           exit.

      *****************************************************************
       STARTING-PROGRAM.
           move SIM-TITLE to MESSAGE-TEXT
           perform Z-POST-MESSAGE-TO-USER
           move SIM-COPYRIGHT to MESSAGE-TEXT
           perform Z-POST-MESSAGE-TO-USER
           exit.

      *****************************************************************
       STOPPING-PROGRAM.
           move SIM-THANKS-01 to MESSAGE-TEXT
           perform Z-POST-MESSAGE-TO-USER
           move SIM-THANKS-02 to MESSAGE-TEXT
           perform Z-POST-MESSAGE-TO-USER
           exit.
      *
      *****************************************************************
      * The following routines perform the physical file I/O to access
      * the data files.
      *---------------------------------------------------------------*
       SYSUT1-OPEN.
           add 8 to ZERO giving APPL-RESULT.
           open INPUT SYSUT1-FILE
           if  SYSUT1-STATUS =   '00'
               subtract APPL-RESULT from APPL-RESULT
               move 'O' to SYSUT1-OPEN-FLAG
           else
               add 12 to ZERO giving APPL-RESULT
           end-if
           if  APPL-AOK
               CONTINUE
           else
               move 'OPEN Failure with SYSUT1' to MESSAGE-TEXT
               perform Z-POST-MESSAGE-TO-CONSOLE
               perform Z-POST-MESSAGE-TO-SYSOUT
               move SYSUT1-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
               perform Z-ABEND-PROGRAM
           end-if
           exit.
      *---------------------------------------------------------------*
       SYSUT1-READ.
           read SYSUT1-FILE
           if  SYSUT1-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
           else
               if  SYSUT1-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 SYSUT1-EOF
               else
                   move 'READ Failure with SYSUT1' to MESSAGE-TEXT
                   perform Z-POST-MESSAGE-TO-CONSOLE
                   perform Z-POST-MESSAGE-TO-SYSOUT
                   move SYSUT1-STATUS to IO-STATUS
                   perform Z-DISPLAY-IO-STATUS
                   perform Z-ABEND-PROGRAM
               end-if
           end-if
           exit.
      *---------------------------------------------------------------*
       SYSUT1-CLOSE.
           add 8 to ZERO giving APPL-RESULT
           close SYSUT1-FILE
           if  SYSUT1-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 SYSUT1' to MESSAGE-TEXT
               perform Z-POST-MESSAGE-TO-CONSOLE
               perform Z-POST-MESSAGE-TO-SYSOUT
               move SYSUT1-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
               perform Z-ABEND-PROGRAM
           end-if
           exit.
      *---------------------------------------------------------------*
       SYSUT2-OPEN.
           add 8 to ZERO giving APPL-RESULT.
           open OUTPUT SYSUT2-FILE
           if  SYSUT2-STATUS =   '00'
               subtract APPL-RESULT from APPL-RESULT
               move 'O' to SYSUT2-OPEN-FLAG
           else
               add 12 to ZERO giving APPL-RESULT
           end-if
           if  APPL-AOK
               CONTINUE
           else
               move 'OPEN Failure with SYSUT2' to MESSAGE-TEXT
               perform Z-POST-MESSAGE-TO-CONSOLE
               perform Z-POST-MESSAGE-TO-SYSOUT
               move SYSUT2-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
               perform Z-ABEND-PROGRAM
           end-if
           exit.
      *---------------------------------------------------------------*
       SYSUT2-WRITE.
           if  SYSUT2-OPEN-FLAG = 'C'
               perform SYSUT2-OPEN
           end-if
           write SYSUT2-REC
           if  SYSUT2-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
           else
               if  SYSUT2-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 SYSUT2-EOF
               else
                   move 'WRITE Failure with SYSUT2' to MESSAGE-TEXT
                   perform Z-POST-MESSAGE-TO-CONSOLE
                   perform Z-POST-MESSAGE-TO-SYSOUT
                   move SYSUT2-STATUS to IO-STATUS
                   perform Z-DISPLAY-IO-STATUS
                   perform Z-ABEND-PROGRAM
               end-if
           end-if
           exit.
      *---------------------------------------------------------------*
       SYSUT2-CLOSE.
           add 8 to ZERO giving APPL-RESULT
           close SYSUT2-FILE
           if  SYSUT2-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 SYSUT2' to MESSAGE-TEXT
               perform Z-POST-MESSAGE-TO-CONSOLE
               perform Z-POST-MESSAGE-TO-SYSOUT
               move SYSUT2-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-POST-MESSAGE-TO-SYSOUT
           end-if
           move 'PROGRAM-IS-ABENDING...'  to MESSAGE-TEXT
           perform Z-POST-MESSAGE-TO-SYSOUT
           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 message to SYSOUT device...                           *
      *****************************************************************
       Z-POST-MESSAGE-TO-SYSOUT.
           perform Z-CALCULATE-MESSAGE-LSB
           display MESSAGE-BUFFER(1:MSG-LSB)
           move all SPACES to MESSAGE-TEXT
           exit.

      *****************************************************************
      * Display message to CONSOLE device...                          *
      *****************************************************************
       Z-POST-MESSAGE-TO-CONSOLE.
           perform Z-CALCULATE-MESSAGE-LSB
           if MESSAGE-TEXT-2 = SPACES
           display MESSAGE-BUFFER(1:MSG-LSB) upon console
           exit.

      *****************************************************************
       Z-POST-MESSAGE-TO-USER.
           perform Z-POST-MESSAGE-TO-CONSOLE
           perform Z-POST-MESSAGE-TO-SYSOUT
           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-POST-MESSAGE-TO-SYSOUT
           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-POST-MESSAGE-TO-SYSOUT
           end-if
           exit.

Table of Contents Previous Section Next Section CBL, Convert Routine

The following (E2ACBLC1.cbl) is a COBOL program that does the EBCDIC to ASCII text string conversion. The maximum length of a text string is 256 bytes. The program was tested using Micro Focus Enterprise Server on Windows/7. The program was successfully executed in both an EBCDIC and ASCII encoded configuration.

       IDENTIFICATION DIVISION.
       PROGRAM-ID.    E2ACBLC1.
       AUTHOR.        SIMOTIME TECHNOLOGIES.
      *****************************************************************
      *             A product of SimoTime Technologies                *
      *        Our e-mail address is: helpdesk@simotime.com           *
      *     Also, visit our Web Site at http://www.simotime.com       *
      *****************************************************************
      *
      *****************************************************************
      * 1992/06/01, Simmons, Created Member
      * 1995/09/15, Simmons, Added more comments for documentation.
      *                      Compiled & executed on a Windows System
      *                      with Micro Focus COBOL.
      * 2018/05/22, Simmons, Compiled & executed on a Linux System
      *                      with GnuCOBOL.
      *
      *****************************************************************
       DATA DIVISION.
       WORKING-STORAGE SECTION.

       COPY AE0437B1.
       COPY ASCEBCB2.

      *****************************************************************
       LINKAGE SECTION.
       COPY E2ACVTB1.

      *****************************************************************
       PROCEDURE DIVISION using E2ACVT-TXT-SIZE,
                                E2ACVT-TXT-STRING.

           inspect E2ACVT-TXT-STRING(1:E2ACVT-TXT-SIZE)
                                            converting E-INFO to A-INFO
           GOBACK.

      *****************************************************************
      *             A product of SimoTime Technologies                *
      *        Our e-mail address is: helpdesk@simotime.com           *
      *     Also, visit our Web Site at http://www.simotime.com       *
      *****************************************************************

Table of Contents Previous Section Next Section CBL, Copy Files

This section describes the COBOL Copy Files that are used in this suite of COBOL programs.

Table of Contents Previous Section Next Section Conversion Table Definition

The following (AE0437B1.cpy) is the COBOL Copy Member that defines the conversion table that is used to convert EBC-encoded Text Strings to ASCII encoded Text Strings.

      *****************************************************************
      *               AE0437B1.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 may also be used to convert between lower and      *
      * upper case.                                                   *
      *   inspect FIELD-NAME converting EBCDIC-LOWER to EBCDIC-UPPER  *
      *   inspect FIELD-NAME converting ASCII-LOWER  to ASCII-UPPER   *
      *                                                               *
      * 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 may 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'30313233343536373839B3DBDCD9DA9F'.    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 *
      *****************************************************************
      *

Table of Contents Previous Section Next Section Pass Area Definition

The following (E2ACVTB1.cpy) is the COBOL Copy Member that defines the Pass Area that is used when a COBOL program calls the conversion program.

      *****************************************************************
      *              E2ACVTB1.cpy is a COBOL Copy File                *
      *  The Data Structure or Pass Area used by CALL from E2ACVTC1.  *
      *         Copyright (C) 1987-2019 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       *
      *****************************************************************
       01  E2ACVT-TXT-SIZE     PIC 9(09)   comp.
       01  E2ACVT-TXT-STRING   PIC X(256).
      ***  E2ACVTB1 - End-of-Copy File - - - - - - - - - - - E2ACVTB1 *
      *****************************************************************
      *

Table of Contents Previous Section Next Section HLASM Members

This section provides information about the IBM High Level Assembler (HLASM) members (or HLASM source code) that are used in the EBCDIC to ASCII conversion process.

Table of Contents Previous Section Next Section HLASM, File Access for RSEQ/80

The following (E2AR80A1.mlc) is the HLASM I/O program. The program was tested using Micro Focus Enterprise Developer on a Windows/7 System. The program was successfully executed in an EBCDIC encoded configuration. This program will do the File I/O and call a second HLASM program to do the EBCDIC to ASCII conversion.

E2AR80A1 CSECT
***********************************************************************
*             E2AR80A1.MLC - This is an HLASM Program                 *
*                 Provided by SimoTime Technologies                   *
*           (C) Copyright 1987-2019 All Rights Reserved               *
*             Web Site URL:   http://www.simotime.com                 *
*                   e-mail:   helpdesk@simotime.com                   *
***********************************************************************
*                                                                     *
* Created: 1972/06/01, Simmons                                        *
* Changed: 1989/09/15, Simmons, added comments for documentation...   *
*                      Copied, compiled and executed on a Windows     *
*                      System using Micro Focus MF/370.               *
*                                                                     *
***********************************************************************
*
*  This suite of job scripts and programs perform the following.
*  1. Read an EBC encoded Record from a Sequential File.
*  2. Call and HLASM Program to convert from EBC to ASC.
*  3. Write an ASC encoded record to a Sequential File.
*
*  Both files are record sequential (RSEQ) files with 80 byte records.
*
*                   ************
*                   * E2AR80E1 *
*                   ********cmd*
*                        *
*                   ************
*                   *   run    *
*                   *******stmt*
*                        *
*  ************     ************     ************
*  *  SYSUT1  *-----* E2AR80A1 *-----*  SYSUT2  *
*  ********dat*     ******hlasm*     ********dat*
*                        *   *
*                        *   *       ************
*                        *   *--call-* E2AASMA1 *
*                        *           ******hlasm*
*                        *
*                   ************
*                   *   EOJ    *
*                   ************
*
*****************************************************************
*
         AMODE 31
         SAVE  (14,12)
         BASR  12,0
         USING *,12
         ST    R13,SAVREG13
         LA    R13,SAVEAREA
*
* ------------------------------------------------------------------- *
         WTO   '* E2AR80A1 Copy/Convert SYSUT1 to SYSUT2, EBC to ASC'
         OPEN  (SYSUT1,(INPUT))
         TM    SYSUT1+48,X'10'       * WAS OPEN SUCCESSFUL ???
         BZ    ERROR1                  IF NOT, POST ERROR
         OPEN  (SYSUT2,(OUTPUT))
         TM    SYSUT2+48,X'10'       * WAS OPEN SUCCESSFUL ???
         BZ    ERROR2                  IF NOT, POST ERROR
*
* ------------------------------------------------------------------- *
* Read the SYSUT1 File, Convert EBC to ASC and write to SYSUT2 File.
         OI    PASSREC2,X'80'        * Set to Last Address in List
GETLOOP  GET   SYSUT1,RECORD01
         AP    UT1PL5,SPD_ONE        * Incr SYSUT1 Record Count
         MVC   RECORD02(80),RECORD01 * Prepare EBCDIC Input for Convert
         LA    R1,PASSAREA           * Address of Parameter List
         CALL  E2AASMA1
         PUT   SYSUT2,RECORD02
         AP    UT2PL5,SPD_ONE        * Incr SYSUT2 Record Count
         B     GETLOOP               * LOOP until EOF with SYSUT1
*
* ------------------------------------------------------------------- *
EOJ      EQU   *
         CLOSE (SYSUT2)
         CLOSE (SYSUT1)
         ED    UT1GCTR(9),UT1PL5     * Post Count to console using WTO
         WTO   MF=(E,UT1WTO)
         ED    UT2GCTR(9),UT2PL5     * Post Count to console using WTO
         WTO   MF=(E,UT2WTO)
*
* ------------------------------------------------------------------- *
         WTO   '* E2AR80A1 End-of-Job, SYSUT2 has been created'
         L     R13,SAVREG13
         RETURN (14,12),,RC=0
*
* ------------------------------------------------------------------- *
ERROR1   EQU   *
         WTO   '* E2AR80A1 SYSUT1 - I/O ERROR'
         L     R13,SAVREG13
         RETURN (14,12),,RC=1
*
* ------------------------------------------------------------------- *
ERROR2   EQU   *
         WTO   '* E2AR80A1 SYSUT2 - I/O ERROR'
         L     R13,SAVREG13
         RETURN (14,12),,RC=2
*
* ------------------------------------------------------------------- *
SYSUT1   DCB   DDNAME=SYSUT1,DSORG=PS,LRECL=80,RECFM=F,MACRF=G,        X
               SYNAD=ERROR1,EODAD=EOJ

SYSUT2   DCB   DDNAME=SYSUT2,DSORG=PS,LRECL=80,RECFM=F,MACRF=P,        X
               SYNAD=ERROR2
*
* ------------------------------------------------------------------- *
         DS    0H            * INSURE HALF-WORD ALIGNMENT
*
UT1WTO   EQU   *
         DC    H'80'         * For WTO, length of WTO buffer...
         DC    H'0'                     should be binary zeroes...
         DC    CL12'* E2AR80A1 '
UT1GCTR  DC    XL10'21202020202020202020'
         DC    CL54' Line count for SYSUT1  '.
*
UT2WTO   EQU   *
         DC    H'80'         * For WTO, length of WTO buffer...
         DC    H'0'                     should be binary zeroes...
         DC    CL12'* E2AR80A1 '
UT2GCTR  DC    XL10'21202020202020202020'
         DC    CL54' Line count for SYSUT1  '.
*
UT1PL5   DC    PL5'0'
UT2PL5   DC    PL5'0'
SPD_ONE  DC    PL5'1'
*
LRECLUT2 DC    XL4'00000050'
RECORD01 DS    CL80
RECORD02 DS    CL80
*
PASSAREA DS    0F
PASSSIZ2 DC    A(LRECLUT2)
PASSREC2 DC    A(RECORD02)
*
SAVEAREA EQU   *
         DC    A(0)
         DC    A(0)
SAVREG13 DC    A(0)
         DC    15A(0)        * Used by SAVE/RETURN functions
*
         REQUATE
         END

Table of Contents Previous Section Next Section HLASM, Convert Routine

The following (E2AASMA1.mlc) is an HLASM program that does the EBCDIC to ASCII text string conversion. The maximum length of a text string is 256 bytes. The program was tested using Micro Focus Enterprise Developer on Windows/7.

E2AASMA1 CSECT
***********************************************************************
*             E2AASMA1.mlc - This is an HLASM Program                 *
*                 Provided by SimoTime Technologies                   *
*           (C) Copyright 1972-2019 All Rights Reserved               *
*             Web Site URL:   http://www.simotime.com                 *
*                   e-mail:   helpdesk@simotime.com                   *
***********************************************************************
*                                                                     *
* Created: 1972/06/01, Simmons                                        *
* Changed: 1989/09/15, Simmons, added comments for documentation...   *
*                      Copied, compiled and executed on a Windows     *
*                      System using Micro Focus MF/370.               *
*                                                                     *
***********************************************************************
*
* Convert an EBC-encoded text string to an ASC-encoded text string.
*
***********************************************************************
*     Register Description
*        R0
*        R1    System, Address of parameter list
*        R2
*        R3    User, Set as return for BAS Instruction
*        R4
*        R5    User, Address of Text String Length
*        R6    User, Address of Text String
*        R7
*        R8
*        R9
*        R10
*        R11
*        R12
*        R13
*        R14   System, Address for Return to Caller
*        R15   System and/or User, Return code
*
***********************************************************************
         AMODE 31
         SAVE  (14,12)
         BASR  11,0
         USING *,11
*
         LTR   R1,R1
         BZ    NOPARMS
*
         LR    R2,R1           * Put addr of addr list into reg-2
         L     R5,0(,R2)       * Use R5 for ADDR of Text String Length
         L     R6,4(,R2)       * Use R6 for ADDR of Text String
*
         TM    0(,R5),X'80'    * Is this last parameter...
         BO    ABEND08         * If yes, post error for ABEND
         TM    0(,R6),X'80'    * Is this last parameter...
         BO    DOCONV          * If yes, do the EBC to ASC Conversion
         B     ABEND08         * else ABEND
*
* ------------------------------------------------------------------- *
DOCONV   EQU   *
*
         L     R10,0(0,R5)      * Set Size as 2nd byte of TR Inst
         EX    R10,TRINST       * Execute TR Inst with User Size
         B     EOJAOK
*
TRINST   TR    0(3,R6),ASC_DATA
*
* ------------------------------------------------------------------- *
* NORMAL END-OF-JOB
* RETURN to the CALLING PROGRAM OR OPERATING SYSTEM
*
EOJAOK   EQU   *
         RETURN (14,12),RC=0
*
* ------------------------------------------------------------------- *
* ABENDING WITH RETURN-CODE OF 8
* RETURN to the CALLING PROGRAM OR OPERATING SYSTEM
*
ABEND08  EQU   *
         WTO   '* E2AASMA1 is abending...RC=0008'
         RETURN (14,12),RC=8
*
* ------------------------------------------------------------------- *
* Post a non-parameter message...
* RETURN to the CALLING PROGRAM OR OPERATING SYSTEM
*
NOPARMS  EQU   *
         WTO   '* ASPEEKA1 called with zero parameters'
         RETURN (14,12),RC=8
*
***********************************************************************
         COPY  E2AASMD1
*
         LTORG
         REGS
         END

Table of Contents Previous Section Next Section Copy File for ASCII Table

The following (E2AASMD1.cpy) is the HLASM Copy Member that defines the conversion table that is used to convert EBC-encoded Text Strings to ASCII encoded Text Strings.

**********************************************************************
*             E2AASMD1.cpy - This is an HLASM Copy File              *
*        Table for EBC to ASC Conversion using TR Instruction        *
*                 Provided by SimoTime Technologies                  *
*           (C) Copyright 1987-2019 All Rights Reserved              *
*             Web Site URL:   http://www.simotime.com                *
*                   e-mail:   helpdesk@simotime.com                  *
**********************************************************************
* The following table contains an ASC value at an offset that is     *
* calculated based on the EBC value.                                 *
**********************************************************************
*
ASC_DATA EQU   *
         DC    XL16'000102039C09867F978D8E0B0C0D0E0F'      * 00-0F
         DC    XL16'101112139D8508871819928F1C1D1E1F'      * 10-1F
         DC    XL16'80818283840A171B88898A8B8C050607'      * 20-2F
         DC    XL16'909116939495960498999A9B14159E1A'      * 30-3F
         DC    XL16'20A0E2E4E0E1E3E5E7F1A22E3C282B7C'      * 40-4F
         DC    XL16'26E9EAEBE8EDEEEFECDF21242A293BAC'      * 50-5F
         DC    XL16'2D2FC2C4C0C1C3C5C7D1A62C255F3E3F'      * 60-6F
         DC    XL16'F8C9CACBC8CDCECFCC603A2340273D22'      * 70-7F
         DC    XL16'D8616263646566676869ABBBF0FDFEB1'      * 80-8F
         DC    XL16'B06A6B6C6D6E6F707172AABAE6B8C6A4'      * 90-9F
         DC    XL16'B57E737475767778797AA1BFD0DDDEAE'      * A0-AF
         DC    XL16'5EA3A5B7A9A7B6BCBDBE5B5DAFA8B4D7'      * B0-BF
         DC    XL16'7B414243444546474849ADF4F6F2F3F5'      * C0-CF
         DC    XL16'7D4A4B4C4D4E4F505152B9FBFCF9FAFF'      * D0-DF
         DC    XL16'5CF7535455565758595AB2D4D6D2D3D5'      * E0-EF
         DC    XL16'30313233343536373839B3DBDCD9DA9F'      * F0-FF
*
***  E2AASMD1 - End-of-Copy File - - - - - - - - - - - - - E2AASMD1 ***
***********************************************************************
*

Table of Contents Previous Section Next Section Ancillary Functions

This section provides technical detail about the supporting scripts and programs used or called by the primary jobs.

Table of Contents Previous Section Next Section Set the Environment

A command file (ENV1BASE.cmd) located in the base directory (SIMOSAM1 for this example) and 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.

@echo OFF
rem  * *******************************************************************
rem  *               ENV1BASE.cmd - a Windows Command File               *
rem  *        This program is provided by SimoTime Technologies          *
rem  *           (C) Copyright 1987-2021 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  *
rem  * Text   - Provide a single point to set common environment variables.
rem  * Author - SimoTime Technologies
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 SimoLIBR=c:\SimoLIBR
     set BASELIB1=c:\SIMOSAM1\DEVL
     set BASELIB8=c:\SimoSAM8
     set BaseWIP1=c:\SimoSAM1\WIP1
     set DATAZERO=c:\SIMODATA\DEVL\DATA\ZERO
     set BASEAPP=%BaseLib1%
     set BASESYS=%BaseLib1%\SYS1
     set BASECAT=%BaseLib1%\DATA
     set UMAPALIB=%BASECAT%\ASC1
     set UMAPELIB=%BASECAT%\EBC1
     set SYSLOG=%BASESYS%\LOGS\SYSLOG_USER.DAT
     set SYSOUT=%BASEAPP%\LOGS\SYSOUT_SIMSAM01.txt
     set SLZMSG=%BASEAPP%\LOGS\SLZMSG_USER.TXT
     set PostNOTE=%BASEAPP%\LOGS\JOBLOG_SIMONOTE.TXT
     set SIMONOTE=%BASEAPP%\LOGS\JOBLOG_SIMONOTE.txt
     set USERPOST=%BASEAPP%\LOGS\ASSIGNED_USER_POST_FILE.txt
     if [%1]==[] goto NO_POST
     set SYSOUT=%BaseLib1%\LOGS\SYSOUT_%1.txt
     call SIMONOTE "+ ENV1BASE *"
     call SIMONOTE "+ ENV1BASE ********************************************************************%1"
     call SIMONOTE "+ ENV1BASE is preparing the System Environment..."
     call SIMONOTE "+ SIMOLIBR is %SIMOLIBR%"
     call SIMONOTE "+ MIFOSYS1 is %MIFOSYS1%"
     call SIMONOTE "+ BASELIB1 is %BASELIB1%"
:NO_POST
     call SIMONOTE "+ SIMONOTE Job Log File is %SIMONOTE% "
rem  *
     set MQBASE=C:\Program Files\IBM\WebSphere MQ
rem  *
rem  * Set the location for the Apache-Tomcat Server...
     set CATALINA_HOME=C:\APACHETC\apache-tomcat-7.0.52
rem     set CATALINA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_112
rem  *
rem  * Set the Environment for the Java Environment...
rem     set JAVABASE=C:\APACHETC\apache-tomcat-7.0.52
     set JAVABASE=C:\Program Files (x86)\Java\jdk1.8.0_112
     set JAVASDK="%JAVABASE%\bin"
     set JAVA_HOME=%JAVABASE%
     set JRE_HOME=%JAVABASE%
     set SIMOTCAT=%CATALINA_HOME%\webapps\simotcat
     set SIMPACKS=%CATALINA_HOME%\webapps\simotcat\WEB-INF\classes\simpacks
rem  *
rem  * Set the environment for the Micro Focus technology...
     set MIFOEDEV=C:\Program Files (x86)\Micro Focus\Enterprise Developer
     set MIFOVCBL=C:\Program Files (x86)\Micro Focus\Visual COBOL Build Tools
     set MIFOESTU=C:\Program Files (x86)\Micro Focus\Studio Enterprise Edition 6.0
     set MIFOEMFE="C:\Program Files (x86)\Micro Focus\Mainframe Express"
rem  *
rem  * Large file support, performance tuning and record locking of the File Handler
     set EXTFH=%BASESYS%\CONFIG\EXTFHBIG.CFG
rem  *
rem  * For IMS Support
     set ES_IMSLIB=%BASEAPP%\IMSLIB
     set ES_ACBLIB=%BASEAPP%\IMSLIB
rem  *
rem  * EZASOKETS Check EZASOKETS Enabled box or set ES_EZASOKET_SUPPORT=YES
     set EZACONFG=BASESYS1\CONFIG\EZACONFG.dat
rem  *
rem  * Resource Allocation and Performance for SORT and non-Relational Data
rem  set MFJSENGINE=SYNCSORT
     set SORTSCHEME=1
     set SORTSPACE=750000000
     set TMP=C:\SORTWORK
rem  *
     set ES_ALLOC_OVERRIDE=%BASESYS%\CONFIG\CATMAPA1.cfg
rem  * For CORE_ON_ERROR function, ABEND Dump
rem  *     set COBCONFIG_=%BASESYS%\CONFIG\diagnose.cfg
rem  *
rem  * Consolidated Trace Facility (CTF)
rem  *     set MFTRACE_CONFIG=%BASESYS%\CONFIG\ctf.cfg
rem  *     set MFTRACE_LOGS=c:\ctflogs
rem  *
rem  * For Job Restart, ABEND Recovery
     set MF_UCC11=Y
     set ES_JES_RESTART=Y
rem  *
rem  * Set environment for MFBSI (Micro Focus Batch Scheduling Interface)
     set ES_EMP_EXIT_1=mfbsiemx
     set MFBSI_DIR=%BASESYS%\LOGS\%JESSERVERNAME%
     set MFBSIEOP_CMD=ENABLE
     set MFBSIEOP_CSV=ENABLE
     set MFBSIEOP_HTM=ENABLE
     set MFBSIEOP_XML=ENABLE
rem  *
rem  * Set Behavior and Trace Flags for GETJOBDD
rem  *   Position=12345678/12345678
     set JDDFLAGS=nnnWnnnn/YYnnnnnn
rem  *
rem  * If not already set then set the PATH for Micro Focus Directories
     if "%SIMOPATH%" == "Y" goto JUMPPATH
     if "%MIFOSYS1%" == "EDEV" goto JUMPEDEV
     if "%MIFOSYS1%" == "VCBL" goto JUMPVCBL
     if "%MIFOSYS1%" == "ESTU" goto JUMPESTU
     if "%MIFOSYS1%" == "EMFE" goto JUMPEMFE
:JUMPEDEV
     set path=%BASESYS%\LOADLIB;%MIFOEDEV%\bin;%JAVASDK%;%BASEAPP%\JAVA;%PATH%;
     set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOEDEV%\CPYLIB
     set MIFOBASE=%MIFOEDEV%
     goto JUMPPATH
:JUMPVCBL
     set path=%MIFOVCBL%\bin;%MIFOVCBL%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%;
     set MIFOBASE=%MIFOVCBL%
     goto JUMPPATH
:JUMPESTU
     set MIFOBASE=%MIFOESTU%\Base
     set MIFOBIN=%MIFOBASE%\bin
     set path=%BASESYS%\LOADLIB;%MIFOBASE%;%MIFOBIN%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%;
     set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOBASE%\SOURCE
     goto JUMPPATH
:JUMPEMFE
     set MIFOBASE=%MIFOEMFE%\Base
     set MIFOBIN=%MIFOBASE%\bin
     set path=%BASESYS%\LOADLIB;%MIFOBASE%;%MIFOBIN%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%;
     set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOBASE%\SOURCE
     goto JUMPPATH
rem  *
:JUMPPATH
     set SIMOPATH=Y
rem  *
     set MAINFRAME_FLOATING_POINT=true
     set COBIDY=%BASEAPP%\COBIDY
     set COBPATH=.;%BASEAPP%\LOADLIB;%BASEAPP%\LOADLIB\GNTS;%BASESYS%\LOADLIB;%SimoLIBR%
     set LIBPATH=.;%BASEAPP%\LOADLIB;%BASEAPP%\LOADLIB\GNTS;%BASESYS%\LOADLIB;%SimoLIBR%
     set TXDIR=%BASESYS%\LOADLIB;%MIFOBASE%
     set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%
rem  *
     set USERCLASS=%BASELIB1%\LOADLIB
     set CLASSPATH=.
     set CLASSPATH=%CLASSPATH%;%JAVABASE%
     set CLASSPATH=%CLASSPATH%;%JAVABASE%\lib
     set CLASSPATH=%CLASSPATH%;\%USERCLASS%\simpacks
     set CLASSPATH=%CLASSPATH%;C:\APACHETC\apache-tomcat-7.0.52\webapps\simotcat\WEB-INF\classes
     set CLASSPATH=%CLASSPATH%;C:\APACHETC\apache-tomcat-7.0.52\webapps\simotcat\WEB-INF\classes\simpacks
rem  *
     if "%MIFOSYS1%" == "ESTU" set CLASSPATH=%CLASSPATH%;%MIFOBIN%
     if "%MIFOSYS1%" == "EDEV" set CLASSPATH=%CLASSPATH%;%MIFOEDEV%
     if "%MIFOSYS1%" == "VCBL" set CLASSPATH=%CLASSPATH%;%MIFOVCBL%
     if "%MIFOSYS1%" == "VCBL" set CLASSPATH=%CLASSPATH%;%MIFOVCBL%\bin\mfcobol.jar
rem  *
     set JobStatus=0000
     call SIMONOTE "+ ENV1BASE is returning to caller"


Table of Contents Previous Section Next Section Display and Log Messages

The following (SIMONOTE.cmd) is a listing of the contents of the SIMONOTE.CMD command file. The command is used to provide a consistent process for logging and displaying messages.

@echo OFF
rem  * *******************************************************************
rem  *               SIMONOTE.cmd - a Windows Command File               *
rem  *         This program is provided by SimoTime Technologies         *
rem  *            (C) Copyright 1987-2019 All Rights Reserved            *
rem  *              Web Site URL:   http://www.simotime.com              *
rem  *                    e-mail:   helpdesk@simotime.com                *
rem  * *******************************************************************
rem  *
rem  * Text    - Display message on screen and write to a log file.
rem  * Author  - SimoTime Technologies
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

Table of Contents Previous Section Next Section Directive Files for COBOL

This section describes the directives files that are used when compiling the COBOL programs with Micro Focus COBOL.

Table of Contents Previous Section Next Section COBOL, ASCII without HLASM

The following shows the compiler directives used when compiling COBOL programs that will be executed in a System configuration using ASCII encoding without HLASM dependencies.

DIALECT"ENTCOBOL"
CHARSET"ASCII"
ASSIGN"EXTERNAL"
IDXFORMAT"8"
IBMCOMP
NOTRUNC
HOSTNUMMOVE
HOSTNUMCOMPARE
NOSIGNFIXUP
HOSTARITHMETIC
NOHOSTFD
CHECKNUM
ANIM
COBIDY
NOOPTIONAL-FILE
outdd"SYSOUT 121 L"
SHARE-OUTDD
DATE
TIME
DATAMAP
settings
list()
noform

Table of Contents Previous Section Next Section COBOL, EBCDIC with HLASM

The following shows the compiler directives used when compiling COBOL programs that will be executed in a System configuration using EBCDIC encoding with HLASM dependencies.

DIALECT"ENTCOBOL"
CHARSET"EBCDIC"
ASSIGN"EXTERNAL"
IDXFORMAT"8"
IBMCOMP
NOTRUNC
AMODE(31)
DATA(31)
HOSTNUMMOVE
HOSTNUMCOMPARE
NOSIGNFIXUP
HOSTARITHMETIC
NOHOSTFD
CHECKNUM
ANIM
COBIDY
NOOPTIONAL-FILE
outdd"SYSOUT 121 L"
SHARE-OUTDD
DATE
TIME
DATAMAP
settings
list()
noform

Table of Contents Previous Section Next Section Summary

This suite of sample programs describes how to read a record-sequential, EBCDIC-encoded file, convert the record content and write to a line sequential, ASCII-encoded file. 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.

Table of Contents Previous Section Next Section 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.

Table of Contents Previous Section Next Section Downloads and Links

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.

Table of Contents Previous Section Next Section Current Server or Internet Access

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 Link to Internet 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 Link to Server icon.

Link to Internet   Link to Server   Explore How to do EBC to ASC Data Conversion of an 80 byte Data Structure. The data structure contains ASCII or EBCDIC Text Strings and Numeric Values that use a Binary, Packed Decimal or Zoned Decimal format. The binary strings will be bypassed, the numeric strings will be processed based on their numeric type and the text strings will be converted from EBC to ASC based on a user selected conversion table. This document will describe and demonstrate the conditional processing of individual string types within a data structure based on a COBOL copy file that defines the data structure.

Link to Internet   Link to Server   Explore How to Create and Execute a Hexadecimal Dump Program for a record sequential file with eighty (80) byte records.

Link to Internet   Link to Server   Explore the JCL Connection for more examples of JCL functionality with programming techniques and sample code.

Link to Internet   Link to Server   Explore the Assembler Connection for more examples of mainframe Assembler programming techniques and sample code.

Link to Internet   Link to Server   Explore the COBOL Connection for more examples of COBOL programming techniques and sample code.

Link to Internet   Link to Server   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.

Link to Internet   Link to 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.

Link to Internet   Link to Server   Explore The File Status Return Codes that are used to interpret the results of accessing VSAM data sets and/or QSAM files.

Table of Contents Previous Section Next Section Internet Access Required

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 GnuCOBOL Technologies available from SourceForge. SourceForge is an Open Source community resource dedicated to helping open source projects be as successful as possible. GnuCOBOL (formerly OpenCOBOL) is a COBOL compiler with run time support. The compiler (cobc) translates COBOL source to executable using intermediate C, designated C compiler and linker. This link will require an Internet Connection.

Table of Contents Previous Section Next Section Glossary of Terms

Link to Internet   Link to Server   Explore the Glossary of Terms for a list of terms and definitions used in this suite of documents and white papers.

Table of Contents Previous Section Next Section Contact or Feedback

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.

Table of Contents Previous Section Next Section Company Overview

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
Convert an EBCDIC-encoded Text String into ASCII
Copyright © 1987-2024
SimoTime Technologies and Services
All Rights Reserved
When technology complements business
http://www.simotime.com