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

Division using SYNCSORT- displaying the decimal


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
surya4ug

New User


Joined: 08 Jul 2008
Posts: 62
Location: chennai

PostPosted: Mon Oct 26, 2009 8:17 pm
Reply with quote

Hello,

i have a file that looks like below. the constant 123456779 starts at 61st position.

Code:
XXXXXXXXXXXXXXXXXXXXXXX            123456779


I'm using the following piece of code to fetch the constant from the file. the code is as shown below.

Code:
INCLUDE COND=(1,23,CH,EQ,C'XXXXXXXXXXXXXXXXXXXXXXX)
INREC BUILD=(C'CONST2,+',61,10,UFF,ZD,LENGTH=10,80:X)
SORT FIELDS=COPY



after this, i have another sort step to divide a column in another file with the constant i fetched above.

Code:
INREC IFTHEN=(WHEN=INIT,                                   
BUILD=(1,70,72:(61,10,ZD),MUL,+100,DIV,CONST2,M11,LENGTH=5,C'%')) 
OPTION COPY                                                 
OUTFIL FNAMES=SORTOUT,REMOVECC,                             
HEADER1=(001:'**********ABCDEFGHIJKLMN',45:&DATE)


my requirement here is to display the value that comes out of the division to the max possible extent of decimals.

so, if the value is 0.000008%, i want to display it the same way. just because i'm using M11 in the code above, i'm getting the value as 0%, which is not what i want.

i know that we can use TO=PD,CH etc to display the field the way we want, but i'm clueless about the floating point value ( i guess TO=FL doesn't work with syncsort ).

please help me out.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Oct 26, 2009 10:13 pm
Reply with quote

Hello,

Why do you believe this is "floating point"? Suggest you do a bit of research on what floating point is.

Neither Syncsort, nor any other sort product that i'm aware of, is meant to be a scientific calculator.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts IBM OnDemand Folders displaying to al... IBM Tools 6
No new posts Need Help with Packed Decimal Signs DFSORT/ICETOOL 4
No new posts Select a DB2 value in a specific deci... DB2 4
Search our Forums:

Back to Top