Numeric Formats
 Mainframe and Micro Focus
http://www.simotime.com
When technology complements business    Copyright © 1987-2010  SimoTime Enterprises  All Rights Reserved
  Table of Contents Version 10.03.24 
 
Introduction
Objective of Session
  Proof of Concept, Data File Conversion
  Requirements
  Materials Provided
  Criteria for Success
  What to do and How to do it
  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)

The session will describe some of the common numeric formats used with COBOL on an IBM Mainframe System or on Windows and UNIX Systems with Micro Focus. The techniques used to prepare the numeric fields for printing, displaying or exporting to a non-COBOL or non-Mainframe environment are described as part of this session. The four common numeric formats discussed in this session are as follows.

1. BINARY, On an IBM Mainframe a binary field is 2, 4 or 8 bytes in length. A binary field is defined in COBOL with the USAGE IS COMPUTATIONAL clause. This is usually abbreviated as COMP.
2. PACKED-DECIMAL, On an IBM Mainframe a a packed-decimal field uses one byte to store two digits except for the sign position that contains a single digit in the high-order nibble and the sign value in the low order nibble. A packed-decimal field is defined in COBOL with the USAGE IS COMPUTATIONAL-3 clause. This is usually abbreviated as COMP-3.
3. ZONED-DECIMAL, On an IBM Mainframe a zoned-decimal field contains the text value of a digit in each byte except in the sign position (this is usually the units position) which uses the high-order nibble to store the sign value.A zoned-decimal field is defined in COBOL with the USAGE IS DISPLAY clause. This USAGE clause is usually omitted since zoned-decimal is the default format for COBOL.
4. EDITED, typically used to prepare or convert numeric data that is stored in a variety of formats (i.e. the preceding three formats) into a format that is easily read by human beings or easily exported to a non-Mainframe or non-COBOL environment such as an excel spreadsheet running on a Windows platform.

This session requires the SimoTime technologies and a copy of Micro Focus Net Express (preferably v4.0) to be installed on a Windows system. The session may be done with an earlier version of Net Express or Mainframe Express, The instructions will need to be adjusted accordingly. This session is available as a classroom offering or a self-study course.

To perform this exercise requires a basic knowledge of the Windows environment and Micro Focus Net Express. Additional help is provided for individuals that may not be proficient in the use of Net Express or have forgotten how to perform a particular function.

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.

Objective of Session
(Next) (Previous) (Table-of-Contents)

The objective of this session is to describe a process for manipulating and preparing the various numeric formats for printing in an edited format for readability or exporting from a mainframe-oriented, COBOL environment to a Windows or UNIX oriented environment using Micro Focus COBOL or other technologies such as excel spreadsheets. The following is a list of the minimum tasks to be completed for this session.

1. Review the common numeric formats used on an IBM Mainframe with a focus on the COBOL programming language.
2. Review the common numeric formats supported by Micro Focus COBOL running on a Windows or UNIX System.
3. Describe and show by example the preparation (or conversion) of numeric fields for printing or displaying in a human readable format.
4. Describe and show by example the preparation (or conversion) of numeric fields for exporting to a non-COBOL environment such as an excel spreadsheet.
5. Use a callable hexadecimal dump routine to show the actual content of the various numeric formats as written to a data file.

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

If this session is being performed through self-study then it will be necessary to install the following software on a Windows system. Windows/XP or Windows Server is preferred.

1. Either Micro Focus Net Express or Micro Focus Mainframe Express must be installed. Refer to the Micro Focus documentation for more information about these technologies. Both of these technologies are usually pre-installed for the classroom environment.
2. The SimoZAPS with SimoREC1 software that is available from SimoTime must be installed and configured. Both of these technologies are usually pre-installed for the classroom environment.
3. The DataMig1 directory that is available from SimoTime must be installed with the minimum data file and COBOL copy file. This directory is usually pre-installed for the classroom environment.

Materials Provided
(Next) (Previous) (Table-of-Contents)

For the classroom environment two directories (c:\DataMig1 and c:\SimoLIBR) are provided that contain the following information.

1. The c:\DataMig1\Expect\ItemFTP1.DAT is a test copy of an ASCII encoded Item Master File that includes PACKED and BINARY data. This file was transferred from the mainframe as a flat sequential file.
2. The c:\DataMig1\Actual\ItemASC1.DAT is a test copy of an ASCII encoded Item Master File that includes PACKED and BINARY data. This file was processed using Micro Focus COBOL on a Windows platform and is a Micro Focus indexed file.
3. The c:\DataMig1\STR\ItemMast.STR is a structure file used by the Micro Focus Data File Editor to display records in a formatted output based on a copy file.
4. The c:\DataMig1\CobCpy1\ItemCB01.CPY is the copy file for the item master file. This directory also contains CUSTCB01.CPY that is the copy file for the customer master file. The copy files are used to create the HTML documentation. They are not used to do the data file compare.
5. The c:\SimoLIBR directory contains the SimoTime utility programs and additional copy files used to generate the conversion programs.

Criteria for Success
(Next) (Previous) (Table-of-Contents)

The following items must be completed to meet the minimum requirements for successfully completing the proof of concept.

1. Demonstrate the execution of the sample COBOL programs using the animation feature of Micro Focus.
2. Show the data files that contain the various numeric formats using the Micro Focus data file editor.
3. Show the data file that contains the hexadecimal dump information using Notepad.
4. Provide HTML documentation for the record layout in order to relate the "position in record" with an actual field name based on a COBOL copy file.

What to do and How to do it
(Next) (Previous) (Table-of-Contents)

The objective of this project is to experience first-hand the issues that will be encountered and the solutions required to prepare (or convert) various numeric formats to a format that is readable by human beings and may be exported for use in non-COBOL or non-Mainframe environments.

For this project two directories will be used. The first directory (c:\SimoLIBR) contains the utility programs and copy files needed to generate the COBOL data file comparison program. The c:\SimoLIBR directory will need to be included in the PATH environment variable. The second directory (c:\DataMig1) contains the sample source code and data files specific to this learning session.

The following is a series of tasks that must be accomplished to successfully complete this learning session

WIP... Work-In-Progress...

Task Description
1. Read the following four (4) documents (to access the documents please click on the Numeric Type).
Numeric Type Description
Zoned Decimal This document describes the zoned-decimal format. This is coded in COBOL as USAGE IS DISPLAY and is the default format if the USAGE clause is missing.
Packed Decimal This document describes the packed-decimal format. This is coded in COBOL as USAGE IS COMPUTATIONAL-3 and is usually coded in its abbreviated form of COMP-3.
Binary This document describes the binary format. This is coded in COBOL as USAGE IS COMPUTATIONAL and is usually coded in its abbreviated form of COMP. This may also be coded with the keyword BINARY.
Edited Numeric This document describes the edited numeric format. This is coded in COBOL using an edit mask in the picture clause. An example would be PIC ZZZ.99+.
2. Create HTML Documentation based on a COBOL copy files. This documentation will be used as reference material.

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

The purpose of this session is to describe the techniques used to prepare or convert the various formats of numeric fields that are used by an IBM Mainframe that is an EBCDIC-encoded environment. The description also includes the support for numeric formats used on a Windows platform using Micro Focus COBOL that may be an EBCDIC or ASCII encoded environment. This session is available as an on site class or an on line, self-study course.

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.

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.

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.

The following table is a list of other examples available from SimoTime that describe the various techniques for managing mainframe-oriented, numeric formats on an IBM Mainframe or with Micro Focus COBOL.

Numeric Type Description
Zoned Decimal This document describes the zoned-decimal format. This is coded in COBOL as USAGE IS DISPLAY and is the default format if the USAGE clause is missing.
Packed Decimal This document describes the packed-decimal format. This is coded in COBOL as USAGE IS COMPUTATIONAL-3 and is usually coded in its abbreviated form of COMP-3.
Binary This document describes the binary format. This is coded in COBOL as USAGE IS COMPUTATIONAL and is usually coded in its abbreviated form of COMP. This may also be coded with the keyword BINARY.
Edited Numeric This document describes the edited numeric format. This is coded in COBOL using an edit mask in the picture clause. An example would be PIC ZZZ.99+.

Signed fields that are in a zone decimal format need special handling and should not be handled as text data. The Zoned Decimal Format, Description and Discussion document provides additional information for converting this type of numeric field or data string.

This link provides additional information about Packed Decimal or COMP-3 (i.e. COMPUTATIONAL-3) fields. The Packed-Decimal or COMP-3 Format, Description and Discussion document provides additional information about this type of numeric field or data string.

This link provides additional information about Binary or COMP (i.e. COMPUTATIONAL) fields. The Binary or COMP Format, Description and Discussion document provides additional information for this type of numeric field or data string.

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
(Next) (Previous) (Table-of-Contents)

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


Return-to-Top
Copyright © 1987-2010 SimoTime Enterprises  All Rights Reserved
When technology complements business
http://www.simotime.com
Version 06.01.06