Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Value of Floating Point Fields

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
frankvijt

New User


Joined: 18 Jan 2008
Posts: 2
Location: belgium

PostPosted: Mon Dec 08, 2008 9:42 pm    Post subject: Value of Floating Point Fields
Reply with quote

I am working on a conversion project, which involves reading out a whole lot of good old VSAM files , which contain valuable data.

The original programming language, used to store these data, is PL/I. Some of the fields have been defined as FLOAT(6).

As such that is no problem, as I just dump the data via PUT SKIP EDIT statements onto flat files, that then get converted to txt files for our PC wiz kids to do their evil stuff with.

I do however want to make sure that the wiz kids get the right data. I can display the data in the files in hex, which is fine for reading and checking binary or dec fields. For Float however it isn't as straight forward.

For example, I have a field which is defined FLOAT(6) and has the hexadecimal value :
4100
1000

I believe this to be the representation of 1.00000

Some convertor, that I found on the net, however tries to tell me that it represents the value 9.00000, which got me confused.

Does any one have any experience with this and how did you handle it?
Thanks!
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8214
Location: Dubuque, Iowa, USA

PostPosted: Mon Dec 08, 2008 9:58 pm    Post subject:
Reply with quote

It has been a while, but floating point numbers are expressed in terms of a sign bit, biased exponent for 7 bits (hex 40 is the normal bias, so 41 means the number is times 10), and the remaining bits represent the value. I've confirmed via SAS that 41100000 is 1.E0 floating point.
Back to top
View user's profile Send private message
frankvijt

New User


Joined: 18 Jan 2008
Posts: 2
Location: belgium

PostPosted: Mon Dec 08, 2008 10:30 pm    Post subject: Reply to: Value of Floating Point Fields
Reply with quote

Thanks Robert for the quick answer and the additional extra information!
That solves my query perfectly.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8214
Location: Dubuque, Iowa, USA

PostPosted: Mon Dec 08, 2008 11:34 pm    Post subject:
Reply with quote

Glad to hear it.
Back to top
View user's profile Send private message
avina

New User


Joined: 04 Dec 2007
Posts: 16
Location: Kolkata

PostPosted: Mon Mar 09, 2009 4:59 pm    Post subject:
Reply with quote

Thanks a lot for your reply. It helps a lot.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Sum the fields in particular format f... sharana64 DFSORT/ICETOOL 9 Fri Jan 05, 2018 1:11 am
No new posts SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us