Data File Conversion
A SimoPATH Task  View COBOL Source Code
Copyright © 1987-2007  SimoTime Enterprises, LLC  All Rights Reserved  http://www.simotime.com

 
Introduction Version 06.01.06
  View the Generated Source Code
  View the Generated HTML Document
  Summary
 
  Software Agreement and Disclaimer
  Downloads and Links to Similar Pages
  Glossary of Terms
  Comments or Suggestions
  About SimoTime

Introduction
(Next) (Previous) (Table-of-Contents)

This document describes how to view and validate the generation of the COBOL source code for two programs. The first program will read an EBCDIC encoded file and write an ASCII encoded file. The data conversion will be performed by a second COBOL program that is called by the first COBOL program. Since the COBOL source code is COBOL/2 compliant it may be compiled and executed on an IBM Mainframe (z/OS or VSE), a Wintel platform (Windows and Micro Focus) or a UNIX platform (with Micro Focus).

This example illustrates the following functions.

1. View the generated COBOL source code created by the Generation process.
2. View the HTML document created during the generation process.
3. Create the file of specifications to generate the I/O program.
4. Create and execute a command file to automate and document the process.

Note: This module is part of The SimoPATH Series of training and reference materials. For more information refer to The Home Page for The SimoPATH Series.

View the Generated Source Code
(Next) (Previous) (Table-of-Contents)

Generating the COBOL source code to do the data file conversion is a two step process. The first step is to create the callable conversion program using the copy file as input. The second step is to create the I/O program using the specifications file as input.

The following source member should be displayed using Notepad.

       IDENTIFICATION DIVISION.
       PROGRAM-ID.    ITME2AR1.
       AUTHOR.        SIMOTIME ENTERPRISES.
      *****************************************************************
      *           This routine was generated by SimoREC1              *
      *             A product of SimoTime Enterprises                 *
      *        Our e-mail address is: helpdesk@simotime.com           *
      *     Also, visit our Web Site at http://www.simotime.com       *
      *  Generation Date: 2005/12/29  Generation Time: 10:23:48:60    *
      *****************************************************************
       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01  IX-1  PIC 9(5) VALUE 0.
       01  RM-1  PIC 9(5) VALUE 0.
       01  RO-1  PIC 9(5) VALUE 0.

       COPY ASCEBCB1.
       COPY ASCEBCB2.

      *****************************************************************
       LINKAGE SECTION.
       COPY ITEMCB01.

      *****************************************************************
       PROCEDURE DIVISION using ITEM-RECORD.
           inspect ITEM-NUMBER              converting E-INFO to A-INFO
           inspect ITEM-DESCRIPTION         converting E-INFO to A-INFO
      *    Binary  ITEM-QTY-ONHAND
      *    Binary  ITEM-QTY-ALLOCATED
           inspect ITEM-UNIT-OF-MEASURE     converting E-INFO to A-INFO
      *    Packed  ITEM-COST
      *    Packed  ITEM-PRICE
           inspect ITEM-LADATE              converting E-INFO to A-INFO
           inspect ITEM-LATIME              converting E-INFO to A-INFO
           inspect ITEM-TOKEN               converting E-INFO to A-INFO
           inspect ITEM-D-CODE-1            converting E-INFO to A-INFO
      *    Inspect ITEM-D-PERCENT-1
           inspect ITEM-RECORD(115:7)       converting E-NUMB to A-NUMB
           inspect ITEM-D-CODE-2            converting E-INFO to A-INFO
      *    Inspect ITEM-D-PERCENT-2
           inspect ITEM-RECORD(123:7)       converting E-NUMB to A-NUMB
           inspect ITEM-D-CODE-3            converting E-INFO to A-INFO
      *    Inspect ITEM-D-PERCENT-3
           inspect ITEM-RECORD(131:7)       converting E-NUMB to A-NUMB
      *    Filler
           inspect ITEM-RECORD(138:375)     converting E-INFO to A-INFO
           GOBACK.

View the HTML Document
(Next) (Previous) (Table-of-Contents)

Start Windows explorer and perform the following steps.

From Windows Explorer perform the following steps.

1. From the left pane select the c:\DataMig1\HTML directory.
2. From the right pane double-click on ItemCB01.HTM.

Summary
(Next) (Previous) (Table-of-Contents)

The purpose of this session is to describe how to generate the COBOL source code that will convert a data file from EBCDIC encoding to ASCII encoding.

Software Agreement and Disclaimer
(Next) (Previous) (Table-of-Contents)

Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Enterprises. Once the fee is received by SimoTime the latest version of the software, documentation or training material will be delivered and a license will be granted for use within an enterprise, provided the SimoTime copyright notice appear on all copies of the software. The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Enterprises.

SimoTime Enterprises makes no warranty or representations about the suitability of the software, documentation or learning material for any purpose. It is provided "AS IS" without any express or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement. SimoTime Enterprises shall not be liable for any direct, indirect, special or consequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software, documentation or training material.

Downloads and Links to Similar Pages
(Next) (Previous) (Table-of-Contents)

The Home Page for The SimoPATH Series  is the starting point to view information about training sessions and learning materials available from SimoTime Enterprises.

The SimoTime Home Page is the starting point to review all the information available from SimoTime Enterprises.

The SimoZAPS Utility Program has the capability of generating a COBOL program that will do the conversion of sequential and VSAM (KSDS) files between EBCDIC and ASCII. SimoZAPS can also read a sequential file in EBCDIC format and create an ASCII/CRLF file or VSAM KSDS file in ASCII format. The conversion tables may be viewed or modified to meet unique requirements. The Hexcess/2 function provides the capability of viewing, finding or patching the contents of a file in hexadecimal.

The SimoREC1 Utility Program has the capability of generating a callable COBOL program that will do the conversion of a data string between EBCDIC and ASCII. The generated COBOL source code or the conversion tables may be viewed or modified to meet unique requirements. The generated program may be called by an I/O program generated by SimoZAPS.

This item will provide a link to  an ASCII or EBCDIC translation table. A column for decimal, hexadecimal and binary is also included.

This document provides a quick summary of the  File Status Key  for VSAM data sets and QSAM files.

Check out  The VSAM - QSAM Connection  for more examples of mainframe VSAM and QSAM accessing techniques and sample code.

The hexadecimal dump of the parameter-buffer uses the same technique as describe in another SimoTime example that describes the dumping of a data string using COBOL. The name of the member that does the actual hexadecimal dump is called SimoDUMP. A copy file (PASSDUMP.CPY) is provided for defining the pass area.

You may view the complete list of examples at http://www.simotime.com/sim4dzip.htm and many are available as a SimoTime Z-Pack (a zip file package with sample source code, data and documentation).

Note: You must be attached to the Internet to download a Z-Pack or view the list.

Glossary of Terms
(Next) (Previous) (Table-of-Contents)

Check out  The SimoTime Glossary  for a list of terms and definitions used in the documents provided by SimoTime.

Comments or Suggestions
(Next) (Previous) (Table-of-Contents)

If you have any questions, suggestions or comments please call or send an e-mail to: helpdesk@simotime.com

We appreciate your comments and feedback.

About SimoTime Enterprises, LLC
(Next) (Previous) (Table-of-Contents)

Founded in 1987, SimoTime Enterprises is a privately owned, Limited Liability Corporation located in Novato, California. We specialize in the creation and deployment of business applications using new or existing technologies and services. We have a team of individuals that understand the broad range of technologies being used in today's environments. This includes the smallest thin client using the Internet and the very large mainframe systems. There is more to making the Internet work for your company's business than just having a nice looking WEB site. It is about combining the latest technologies and existing technologies with practical business experience. It's about the business of doing business and looking good in the process. Quite often, to reach larger markets or provide a higher level of service to existing customers it requires the newer Internet technologies to work in a complementary manner with existing corporate mainframe systems. Whether you want to use the Internet to expand into new market segments or as a delivery vehicle for existing business functions simply give us a call or check the web site at http://www.simotime.com


Return-to-Top
Copyright © 1987-2007 The SimoPATH Series All Rights Reserved
When information complements knowledge
Copyright © 1987-2006 SimoTime Enterprises, LLC  All Rights Reserved
When technology complements business
http://www.simotime.com
Version 06.01.06