IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

COnvert PD to floating point


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
usharaniA

New User


Joined: 22 Jan 2008
Posts: 85
Location: India

PostPosted: Thu Aug 12, 2010 10:24 am
Reply with quote

Hi,
I want to convert a comp-3 datatype into readable format so have used the sort card,

OUTREC FIELDS=(1,10, PD)-Which gives a readable data

When i browsed through file aid the value between position 1 to 10 is a floating point .

Now how do i write a sort card to convert this comp-3 datatype into radabel as well with decimal point.

For eg:
Data=105
format need=10.5
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Aug 12, 2010 10:59 am
Reply with quote

What is the equivalent COBOL declaration of this field? BTW, you can find so many working examples here in this forum, a search on EDIT will help you.
Back to top
View user's profile Send private message
usharaniA

New User


Joined: 22 Jan 2008
Posts: 85
Location: India

PostPosted: Thu Aug 12, 2010 11:19 am
Reply with quote

It is PIC S9(13)V9(2) USAGE COMP-3.

If i have to use Edit then i have to count the value from my picture clause and have to give the value explicitly Like EDIT(TTTTTTTTTTTTT.TT)

Instead Is there any option to use FI.
Like

OUTREC FIELDS=(1,10, PD,To=FI)
Back to top
View user's profile Send private message
usharaniA

New User


Joined: 22 Jan 2008
Posts: 85
Location: India

PostPosted: Thu Aug 12, 2010 11:23 am
Reply with quote

Sorry as,
OUTREC FIELDS=(1,10, PD,To=FL)

Fl=Floating point ,signed
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Aug 12, 2010 11:05 pm
Reply with quote

You seem to be very confused about various types of numbers.

Your input field (COMP-3) is PD. FL would be floating point (with an exponent). TO=FL is not supported.

Quote:
Now how do i write a sort card to convert this comp-3 datatype into radabel as well with decimal point.

For eg:
Data=105
format need=10.5


A 10 byte PD value can have 19 digits.

Quote:

PIC S9(13)V9(2) USAGE COMP-3.


This would have 15 digits and occupy 8 bytes and you would convert it to a ddddddddddddd.dd value like this:

Code:

  OPTION COPY
  OUTREC FIELDS=(1,8, PD,EDIT=(IIIIIIIIIIIIT.TT))


This might help you understand different types of number formats:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA40/C.0?DT=20090527161936
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Point and Shoot )PTNS TSO/ISPF 0
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
No new posts Convert single row multi cols to sing... DFSORT/ICETOOL 6
No new posts convert file from VB to FB and use tr... DFSORT/ICETOOL 8
Search our Forums:

Back to Top