Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

COnvert PD to floating point

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: COnvert PD to floating point
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: 2180
Location: @my desk

PostPosted: Thu Aug 12, 2010 10:59 am    Post subject:
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    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Thu Aug 12, 2010 11:05 pm    Post subject:
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:

http://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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Convert +9999999999999.99 to S9(12)V9(3) vnktrrd DFSORT/ICETOOL 8 Thu Nov 17, 2016 8:15 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts convert PD to ZD ram_vizag DFSORT/ICETOOL 5 Sat Nov 05, 2016 3:06 am
No new posts help: convert C'00AB' to X'00AB' alan_gu DFSORT/ICETOOL 1 Thu Sep 29, 2016 12:22 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us