![]() |
Floating Point Arithmetic A COBOL Example http://www.simotime.com Copyright © 1987-2010 SimoTime Enterprises All Rights Reserved |
| Table of Contents | Version 09.05.17 |
This suite of sample programs provides an example of a COBOL program doing floating point arithmetic and writing the information to a Sequential file. The program will run on an IBM mainframe or a Windows platform using Micro Focus or a UNIX platform using Micro Focus. On the mainframe the default is to use the IBM 370 Floating Point Arithmetic. On Windows or UNIX using Micro Focus the default is to use the IEEE Standard for Floating Point Arithmetic. The IEEE standard provides a higher level of precision than 370. However, 370 provides for larger numbers by providing less precision.
This example illustrates the following functions.
| 1. | Demonstrate how to define a short floating point field. |
| 2. | Demonstrate how to define a long floating point field. |
| 3. | Demonstrate how to use a floating point field in a calculation. |
| 4. | Demonstrate how to write floating point data items to a sequential file. |
The following is an example of a COBOL program that processes floating point values. The information that is written to the sequential file is created within the program.
The following is the record layout (CBLFPAB1.CPY) for COBOL.
*****************************************************************
* Copy File for Floating Point used by the Demo programs. *
* This is a Sequential-Data-Set or Sequential File. *
*****************************************************************
* Copyright (C) 1987-2010 SimoTime Enterprises *
* All Rights Reserved *
*****************************************************************
* Provided by SimoTime Enterprises *
* Our e-mail address is: helpdesk@simotime.com *
* Also, visit our Web Site at http://www.simotime.com *
*****************************************************************
01 DATAFPA1-RECORD.
05 FPA-PI-SHORT COMP-1.
05 FPA-PI-LONG COMP-2.
05 FPA-RADIUS PIC 9(3)V999 value 6.
05 FPA-CIRCUMFERENCE COMP-2.
05 FILLER PIC X(102).
*! CBLFPAB1 - End-of-Copy File...
This suite of samples programs will run on the following platforms.
| 1. | Executes on Windows/2000, Windows/NT and Windows/XP using Micro Focus Net Express and the CMD file provided. |
| 2. | May be ported to run on the UNIX platforms supported by Micro Focus COBOL. |
The following is a flowchart of the job for executing the program that does floating point arithmetic and writes the results to a Sequential file of fixed-length fields.
|
|
The JCL or CMD member for running the application. | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Delete any previously created DATAFPA1 file. | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
Calculate values for the floating point fields and write to file | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
Display to screen | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The main program (CBLFPAC1) will perform calculations using floating point fields. The contents of the fields will be move into a record structure and written to a sequential file. The source code for the CMD file, the JCL member and the COBOL programs is provided and may be modified to fit your environment.
The following (CBLFPAJ1.JCL) is a sample of the mainframe JCL needed to run this job on an IBM Mainframe or a PC with Micro Focus Mainframe Express.
//CBLFPAJ1 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1 //* ******************************************************************* //* This program is provided by: * //* SimoTime Enterprises, LLC * //* (C) Copyright 1987-2010 All Rights Reserved * //* * //* Web Site URL: http://www.simotime.com * //* e-mail: helpdesk@simotime.com * //* ******************************************************************* //* //* Text - Write various floating point fields to a QSAM file. //* Author - SimoTime Enterprises //* Date - January 24, 1996 //* //* This is a sample program that shows the format for various //* floating point fields. The information is also written to a //* QSAM file. //* //* This set of programs will run on a mainframe under MVS or on a //* Personal Computer with Windows and Micro Focus Mainframe Express. //* //* ******************************************************************* //* Step 1 This job step will delete a previously created QSAM //* file. //* //DELTHEXW EXEC PGM=IEFBR14 //DATAFPA1 DD DSN=SIMOTIME.DATA.DATAFPA1,DISP=(MOD,DELETE,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=120,DSORG=PS) //* //* ******************************************************************* //* Step 2 This job step will write information to the QSAM file. //* //EXECFPA1 EXEC PGM=CBLFPAC1 //STEPLIB DD DSN=MFI01.SIMOPROD.LOADLIB1,DISP=SHR //DATAFPA1 DD DSN=SIMOTIME.DATA.DATAFPA1,DISP=(NEW,CATLG,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=120,DSORG=PS) //SYSOUT DD SYSOUT=*
The following (CBLFPAE1.CMD) is a sample of the Windows CMD needed to run this job.
@echo OFF
rem * *******************************************************************
rem * This program is provided by: *
rem * SimoTime Enterprises, LLC *
rem * (C) Copyright 1987-2010 All Rights Reserved *
rem * Web Site URL: http://www.simotime.com *
rem * e-mail: helpdesk@simotime.com *
rem * *******************************************************************
rem *
rem * Text - Calculate floating point field contents and write to file.
rem * Author - SimoTime Enterprises
rem * Date - January 24, 1996
rem *
rem * The job will do floating point arithmetic and write the results
rem * to a sequential file.
rem *
rem * This set of programs will run on a mainframe under MVS or on a
rem * Personal Computer with Windows and Micro Focus Net Express.
rem *
rem * ************
rem * * CblFpaE1 *
rem * ********cmd*
rem * *
rem * ************ ************
rem * * if Exist ******* DATAFPA1 * if exist delete the file
rem * ********del* *******rseq*
rem * *
rem * *
rem * ************ ************
rem * * CblFpaC1 ******* DATAFPA1 *
rem * ********cbl* *******rseq*
rem * *
rem * ************
rem * * EOJ *
rem * ************
rem *
rem * ********************************************************************
rem * Step 1 of 3, Set the global environment variables...
rem *
call Env1PROD
if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
set CmdName=CblFpaE1
rem *
call SimoNOTE "*******************************************************%CmdName%"
call SimoNOTE "Starting CmdName %CmdName%"
rem * *******************************************************************
rem * Step 2 of 3, Delete any previously created file...
rem *
:DeleteQSAM
call SimoNOTE "Identify JobStep DeleteQSAM"
set DATAFPA1=%BaseLib1%\DataLibA\Asc1\DATAFPA1.DAT
if exist %DATAFPA1% del %DATAFPA1%
rem *
rem * *******************************************************************
rem * Step 3 of 3, Calculate Floating Point, create a new output file...
rem *
:ExecuteFlaotingPointRoutine
call SimoNOTE "Identify JobStep ExecuteRightAdjustRoutine"
run CBLFPAC1
if not "%ERRORLEVEL%" == "0" set JobStatus=0010
if not "%JobStatus%" == "0000" goto :EojNOK
:EojAOK
call SimoNOTE "DataMake DATAFPA1=%DATAFPA1%"
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
call SimoNOTE "Conclude SysOut is %SYSOUT%"
if not "%1" == "nopause" pause
exit /B %JobStatus%
The following (CBLFPAC1.CBL) is a sample of the Micro Focus COBOL demonstration program.
IDENTIFICATION DIVISION.
PROGRAM-ID. CBLFPAC1.
AUTHOR. SIMOTIME ENTERPRISES.
*****************************************************************
* Copyright (C) 1987-2010 SimoTime Enterprises, LLC. *
* *
* 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 commercial purpose requires a fee to be paid to *
* SimoTime Enterprises. 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 *
* Enterprises. *
* *
* Permission to use, copy and modify 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 *
* Enterprises. *
* *
* SimoTime Enterprises makes no warranty or representations *
* about the suitability of the software 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 *
* *
* SimoTime Enterprises *
* 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 Enterprises, *
* 15 Carnoustie Drive, Novato, CA 94949-5849. *
* *
*****************************************************************
* This program is provided by SimoTime Enterprises *
* Our e-mail address is: helpdesk@simotime.com *
* Also, visit our Web Site at http://www.simotime.com *
*****************************************************************
* Source Member: CBLFPAC1.CBL
* Copy Files: CBLFPAB1.CPY
*
* This program provides an example of how a COBOL program does
* floating point arithmetic.
*
* The COBOL program is written using the IBM COBOL for OS/390
* dialect and will also work with IBM Enterprise COBOL.
*
* A JCL member is provided to run the job as an MVS batch job on
* an IBM mainframe or as a project with Micro Focus Mainframe
* Express (MFE) running on a PC with Windows.
*
* A batch or command file is provided to run the job as a
* Windows batch job on a Wintel platform using Micro Focus Net
* Express.
*
*****************************************************************
*
* ************
* * CBLFAPJ1 *
* ********jcl*
* *
* ************
* * IEFBR14 *
* ********utl*
* *
* ************ ************
* * CBLFPAC1 *--*--* DATAFPA1 *
* ********cbl* * ********dat*
* * *
* * * ************
* * *--* CONSOLE *
* * ******dsply*
* ************
* * EOJ *
* ************
*
*****************************************************************
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT DATAFPA1-FILE ASSIGN to DATAFPA1
ORGANIZATION is SEQUENTIAL
ACCESS MODE is SEQUENTIAL
FILE STATUS is DATAFPA1-STATUS.
*
*****************************************************************
DATA DIVISION.
FILE SECTION.
*
FD DATAFPA1-FILE
DATA RECORD is DATAFPA1-RECORD.
01 DATAFPA1-RECORD.
05 FPA1-DATA pic X(120).
*
*****************************************************************
* This program was created using the SYSMASK1.TXT file as input.*
* The SYSMASK1 provides for the sequential reading of the input *
* file (DATAFPA1) and the sequential writing of the output file *
* (DATAFPA1). If the output file (DATAFPA1) is indexed then the *
* input file (DATAFPA1) must be in sequence by the field that *
* will be used to provide a key for the output file (DATAFPA1). *
* If the key field is not in sequence then refer to SYSMASK2 *
* to provide for a random add or update of the indexed file. *
*****************************************************************
WORKING-STORAGE SECTION.
01 SIM-TITLE.
05 T1 pic X(11) value '* CBLFPAC1 '.
05 T2 pic X(34) value 'Example, Floating Point Arithmetic'.
05 T3 pic X(10) value ' v08.03.11'.
05 T4 pic X(24) value ' http://www.simotime.com'.
01 SIM-COPYRIGHT.
05 C1 pic X(11) value '* CBLFPAC1 '.
05 C2 pic X(20) value 'Copyright 1987-2010 '.
05 C3 pic X(28) value ' SimoTime Enterprises, LLC '.
05 C4 pic X(20) value ' All Rights Reserved'.
01 SIM-THANKS-01.
05 C1 pic X(11) value '* CBLFPAC1 '.
05 C2 pic X(32) value 'Thank you, this technology was p'.
05 C3 pic X(32) value 'roduced at SimoTime Enterprises,'.
05 C4 pic X(04) value ' LLC'.
01 SIM-THANKS-02.
05 C1 pic X(11) value '* CBLFPAC1 '.
05 C2 pic X(32) value 'Please send all inquires or sugg'.
05 C3 pic X(32) value 'estions to the helpdesk@simotime'.
05 C4 pic X(04) value '.com'.
01 MESSAGE-BUFFER.
05 MESSAGE-HEADER pic X(11) value '* CBLFPAC1 '.
05 MESSAGE-TEXT.
10 MESSAGE-TEXT-1 pic X(68) value SPACES.
10 MESSAGE-TEXT-2 pic X(188) value SPACES.
01 DATAFPA1-STATUS.
05 DATAFPA1-STATUS-L pic X.
05 DATAFPA1-STATUS-R pic X.
01 DATAFPA1-EOF pic X value 'N'.
01 DATAFPA1-OPEN-FLAG pic X value 'C'.
*
01 IO-STATUS.
05 IO-STAT1 pic X.
05 IO-STAT2 pic X.
01 TWO-BYTES.
05 TWO-BYTES-LEFT pic X.
05 TWO-BYTES-RIGHT pic X.
01 TWO-BYTES-BINARY redefines TWO-BYTES pic 9(4) comp.
*
01 APPL-RESULT pic S9(9) comp.
88 APPL-AOK value 0.
88 APPL-EOF value 16.
*
01 DATAFPA1-TOTAL.
05 filler pic X(23) value 'DATAFPA1 line count is '.
05 DATAFPA1-LOC pic 9(7) value 0.
* Notice the following Floating Point Fields do not have a
* picture clause.
01 WORK-FIELDS.
05 WORK-SHORT-01 COMP-1.
05 WORK-LONG-01 COMP-2.
05 WORK-RADIUS COMP-1.
05 WORK-CIRCUMFERENCE COMP-2.
01 ZD-FIELDS.
05 ZD-PI pic 9v9(17) value 0.
05 ZD-RAD-3-15 pic 9(3)v9(15) value 0.
05 ZD-CIR-3-15 pic 9(3)v9(15) value 0.
01 FP-SHORT.
05 FPS-PI COMP-1 value 0.
05 FPS-RAD COMP-1 value 0.
05 FPS-CIR COMP-1 value 0.
01 FP-LONG.
05 FPL-PI COMP-2 value 0.
05 FPL-RAD COMP-2 value 0.
05 FPL-CIR COMP-2 value 0.
01 PRINT-LINE.
05 EDT-ID pic X(3) value SPACES.
05 FILLER pic X(11) value ' Perimeter '.
05 EDT-3-15-CIR pic ZZZ.ZZZZZZZZZZZZZZZ.
05 FILLER pic X(08) value ' Radius '.
05 EDT-3-15-RAD pic ZZZ.ZZZZZZZZZZZZZZZ.
05 FILLER pic X(04) value ' Pi '.
05 EDT-1-15-PI pic Z.ZZZZZZZZZZZZZZZZZ.
*
01 PRINT-PI-SHORT.
05 FILLER pic X(24) value 'FPA-PI-SHORT........... '.
05 PI-SHORT-VALUE pic Z.ZZZZZZZZ.
01 PRINT-PI-LONG.
05 FILLER pic X(24) value 'FPA-PI-LONG............ '.
05 PI-LONG-VALUE pic Z.ZZZZZZZZZZZZZZZZZ.
01 PRINT-ZD-3-15.
05 FILLER pic X(24) value 'ZD-3-15................ '.
05 ZD-EDT-3-15 pic ZZZ.ZZZZZZZZZZZZZZZ.
*
*****************************************************************
PROCEDURE DIVISION.
perform Z-POST-COPYRIGHT
perform DATAFPA1-OPEN
*
perform ZD-CALCULATIONS
move PRINT-LINE to FPA1-DATA
perform DATAFPA1-WRITE
*
perform FPS-CALCULATIONS
move PRINT-LINE to FPA1-DATA
perform DATAFPA1-WRITE
*
perform FPL-CALCULATIONS
move PRINT-LINE to FPA1-DATA
perform DATAFPA1-WRITE
move 'is Complete...' to MESSAGE-TEXT
perform Z-DISPLAY-CONSOLE-MESSAGE
perform DATAFPA1-CLOSE
perform Z-THANK-YOU
GOBACK.
*****************************************************************
* PI=3.14159265358979323846
ZD-CALCULATIONS.
move 'TXT' to EDT-ID
add 3.14159265358979323 to ZERO giving ZD-PI ROUNDED
add 2 to ZERO giving ZD-RAD-3-15
compute ZD-CIR-3-15 ROUNDED = ZD-PI * (2 * ZD-RAD-3-15)
add ZD-CIR-3-15 to ZERO giving EDT-3-15-CIR
add ZD-RAD-3-15 to ZERO giving EDT-3-15-RAD
add ZD-PI to ZERO giving EDT-1-15-PI
display PRINT-LINE upon console
exit.
*****************************************************************
FPS-CALCULATIONS.
move 'FPS' to EDT-ID
add 3.14159265358979323 to ZERO giving FPS-PI ROUNDED
add 2 to ZERO giving FPS-RAD
compute FPS-CIR ROUNDED = FPS-PI * (2 * FPS-RAD)
add FPS-CIR to ZERO giving EDT-3-15-CIR
add FPS-RAD to ZERO giving EDT-3-15-RAD
add FPS-PI to ZERO giving EDT-1-15-PI
display PRINT-LINE upon console
exit.
*****************************************************************
FPL-CALCULATIONS.
move 'FPL' to EDT-ID
add 3.14159265358979323 to ZERO giving FPL-PI ROUNDED
add 2 to ZERO giving FPL-RAD
compute FPL-CIR ROUNDED = FPL-PI * (2 * FPL-RAD)
add FPL-CIR to ZERO giving EDT-3-15-CIR
add FPL-RAD to ZERO giving EDT-3-15-RAD
add FPL-PI to ZERO giving EDT-1-15-PI
display PRINT-LINE upon console
exit.
*****************************************************************
* The value of PI is the ratio between the perimeter and the
* diameter on any given circle.
* In other words, dividing the perimeter of any circle by its
* diameter always gives the same answer, and this number is
* defined to be PI. A 12-digit approximation of PI is given as
* 3.14159265358.
*****************************************************************
*****************************************************************
* I/O ROUTINES FOR DATAFPA1... *
*****************************************************************
DATAFPA1-WRITE.
if DATAFPA1-OPEN-FLAG = 'C'
perform DATAFPA1-OPEN
end-if
write DATAFPA1-RECORD
if DATAFPA1-STATUS = '00'
subtract APPL-RESULT from APPL-RESULT
else
if DATAFPA1-STATUS = '10'
add 16 to ZERO giving APPL-RESULT
else
add 12 to ZERO giving APPL-RESULT
end-if
end-if.
if APPL-AOK
CONTINUE
else
move 'DATAFPA1-Failure-WRITE...' to MESSAGE-TEXT
perform Z-DISPLAY-CONSOLE-MESSAGE
move DATAFPA1-STATUS to IO-STATUS
perform Z-DISPLAY-IO-STATUS
perform Z-ABEND-PROGRAM
end-if
exit.
*---------------------------------------------------------------*
DATAFPA1-OPEN.
add 8 to ZERO giving APPL-RESULT.
open output DATAFPA1-FILE
if DATAFPA1-STATUS = '00'
subtract APPL-RESULT from APPL-RESULT
move 'O' to DATAFPA1-OPEN-FLAG
else
add 12 to ZERO giving APPL-RESULT
end-if
if APPL-AOK
CONTINUE
else
move 'DATAFPA1-Failure-OPEN...' to MESSAGE-TEXT
perform Z-DISPLAY-CONSOLE-MESSAGE
move DATAFPA1-STATUS to IO-STATUS
perform Z-DISPLAY-IO-STATUS
perform Z-ABEND-PROGRAM
end-if
exit.
*---------------------------------------------------------------*
DATAFPA1-CLOSE.
add 8 to ZERO giving APPL-RESULT.
close DATAFPA1-FILE
if DATAFPA1-STATUS = '00'
subtract APPL-RESULT from APPL-RESULT
move 'C' to DATAFPA1-OPEN-FLAG
else
add 12 to ZERO giving APPL-RESULT
end-if
if APPL-AOK
CONTINUE
else
move 'DATAFPA1-Failure-CLOSE...' to MESSAGE-TEXT
perform Z-DISPLAY-CONSOLE-MESSAGE
move DATAFPA1-STATUS to IO-STATUS
perform Z-DISPLAY-IO-STATUS
perform Z-ABEND-PROGRAM
end-if
exit.
*****************************************************************
* The following Z-Routines perform administrative tasks *
* for this program. *
*****************************************************************
* ABEND the program, post a message to the console and issue *
* a STOP RUN. *
*****************************************************************
Z-ABEND-PROGRAM.
if MESSAGE-TEXT not = SPACES
perform Z-DISPLAY-CONSOLE-MESSAGE
end-if
move 'PROGRAM-IS-ABENDING...' to MESSAGE-TEXT
perform Z-DISPLAY-CONSOLE-MESSAGE
add 12 to ZERO giving RETURN-CODE
STOP RUN.
* exit.
*****************************************************************
* Display CONSOLE messages... *
*****************************************************************
Z-DISPLAY-CONSOLE-MESSAGE.
if MESSAGE-TEXT-2 = SPACES
display MESSAGE-BUFFER(1:79) upon console
else
display MESSAGE-BUFFER upon console
end-if
move all SPACES to MESSAGE-TEXT
exit.
*****************************************************************
* Display the file status bytes. This routine will display as *
* two digits if the full two byte file status is numeric. If *
* second byte is non-numeric then it will be treated as a *
* binary number. *
*****************************************************************
Z-DISPLAY-IO-STATUS.
if IO-STATUS not NUMERIC
or IO-STAT1 = '9'
subtract TWO-BYTES-BINARY from TWO-BYTES-BINARY
move IO-STAT2 to TWO-BYTES-RIGHT
display '* CBLFPAC1 File-Status-' IO-STAT1 '/'
TWO-BYTES-BINARY upon console
else
display '* CBLFPAC1 File-Status-' IO-STATUS upon console
end-if
exit.
*****************************************************************
Z-POST-COPYRIGHT.
display SIM-TITLE upon console
display SIM-COPYRIGHT upon console
exit.
*****************************************************************
Z-THANK-YOU.
display SIM-THANKS-01 upon console
display SIM-THANKS-02 upon console
exit.
*****************************************************************
* This example is provided by SimoTime Enterprises *
* Our e-mail address is: helpdesk@simotime.com *
* Also, visit our Web Site at http://www.simotime.com *
*****************************************************************
The purpose of this program is to provide an example of a COBOL program doing floating point arithmetic and writing the information to a Sequential file.
Permission to use, copy, modify and distribute this software for any commercial purpose requires a fee to be paid to SimoTime Enterprises. 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 Enterprises.
Permission to use, copy, modify and distribute this software for a 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 Enterprises.
SimoTime Enterprises makes no warranty or representations about the suitability of the software 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.
You may download this example at http://www.simotime.com/sim4dzip.htm#COBOLFloatingPointArithmetic or view the complete list of SimoTime Examples at http://www.simotime.com/sim4dzip.htm.
Note: You must be attached to the Internet to download a Z-Pack or view the list.
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.
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.
This item will provide a link to an ASCII or EBCDIC translation table. A column for decimal, hexadecimal and binary is also included.
Check out The SimoTime Library for a wide range of topics for Programmers, Project Managers and Software Developers.
To review all the information available on this site start at The SimoTime Home Page .
Check out The SimoTime Glossary for a list of terms and definitions used in the documents provided by SimoTime.
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.
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 05.06.21 |