Page 1 of 1

decimal point

PostPosted: Tue Jan 21, 2014 1:14 am
by kartheeswaran
i want average get floating point value.but didn't get it please help.

Re: decimal point

PostPosted: Tue Jan 21, 2014 1:39 am
by tivrfoa
what's the format are you using for this field?

maybe if you use PIC S99V it works.

http://publib.boulder.ibm.com/iseries/v ... 540313.htm

Re: decimal point

PostPosted: Tue Jan 21, 2014 1:44 pm
by kartheeswaran
that one not work
i use input file
02 avg pic 99v9

output file
02 averg pic 99v9

Re: decimal point

PostPosted: Tue Jan 21, 2014 2:08 pm
by NicC
Please do not post attachments - they take up too much space. Simply cut and paste your screen shot and use the code tags to preserve spacing.
What didn't work - please show what you tried and what you got and how it differs from what you want. Simply saying "it does not work" is useless. We know whatever it is that you tried did not work - otherwise you would not be posting.

Remember that a V in your picture specification is an implied decimal point. If you want to actually see the decimal point tyhen you have to specify a real one : 9.9 not 9V9.

Re: decimal point

PostPosted: Tue Jan 28, 2014 10:27 am
by dgmf
kartheeswaran wrote:output file
02 averg pic 99v9


You should define this field as 99.9 instead of 99V9

and please do remember that dot will take extra byte.
i.e
99v9 ----->will take 3 bytes
99.9------>will take 4 bytes


Thanks
Dev