View previous topic :: View next topic
|
Author |
Message |
usharaniA
New User
Joined: 22 Jan 2008 Posts: 85 Location: India
|
|
|
|
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 |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
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 |
|
|
usharaniA
New User
Joined: 22 Jan 2008 Posts: 85 Location: India
|
|
|
|
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 |
|
|
usharaniA
New User
Joined: 22 Jan 2008 Posts: 85 Location: India
|
|
|
|
Sorry as,
OUTREC FIELDS=(1,10, PD,To=FL)
Fl=Floating point ,signed |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
|