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
 

 

Division using SYNCSORT- displaying the decimal

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Division using SYNCSORT- displaying the decimal
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

Site Director


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

PostPosted: Mon Oct 26, 2009 10:13 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 5 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am


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