Just an explanation for the fields :
Field1 is the date
Field2 is the interval time
Field3 is the MQ Queue name
Field4 is the number of messages read from the queue within an operation
Field5 is the total size in bytes of all messages read in this operation
Field6 is the size of the biggest message read in this operation
Field7 is the size of the smallest message read
Field8 is the maximum time in microseconds when a message was in the queue
Field9 is the minimum time in microseconds when a message was in the queue
Field10 is the average time in microseconds when a message was in the queue
I will have to sort the file (Key to sort : Date + interval time + Queue name)
and to agregate results by queue within the interval, so I need to have the average of field10 the smallest field9 and biggest field 8 for each queue.
I guess to do that I need to convert the floating point fields in decimal, but I don't understand how to do it.
I read the document written by M. Frank Yaeger, but the sample, as far as I understood, is for a display, and I want to do some calculation.
So can someone show me a sample, how to convert through ICETOOL a floating point field to decimal ?
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Those aren't floating-point numbers. They are characters showing a human-readable representation of a number in "scientific" notation.
You could use UFF on the first three characters of each column, then multiply by the last two. Because these are times, the values will all be positive, as because they can only be whole numbers the exponent will always be positive, so don't worry about either of those.
thank you for your answer.
I thought about that during the night.
I made some tests, but it's not so simple as you explain, I think.
I'm not sure to understand or interpret what you say with
Quote:
You could use UFF on the first three characters of each column, then multiply by the last two
In this situation (please don't see any offense), it's not multiply the first three characters by the last two, but multiply the first three by 10 exponent last two characters.
And that's what I don't succeed to do
if someone has a suggestion to transform
1.5E+03 in 1500 that would be very nice.
The result should be used in the future for other calculation.
********************************* TOP OF DATA **********************************
2.1E+03 021 2100
1.3E+05 013 130000
******************************** BOTTOM OF DATA ********************************
********************************* TOP OF DATA **********************************
2.1E+03 9.3E+02 1.5E+03 021 2100 093 930
1.3E+05 1.2E+05 1.3E+05 013 130000 012 120000
******************************** BOTTOM OF DATA ********************************
up to You to type all the possible exponents and add the process for the third value
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Yes, I was a little hasty and implicit.
To simplify enrico's, you could look to use CHANGE= to convert the 01s to 10, 02s to 100, 03s to 1000, 04s to... etc. Determine the largest possible value, and put an appropriate number of leading zeros on the front of each changed value. Then calculate as previously stated.
do pos = 1 to 21 by 10
do exp = 1 to 10
say inrec"IFTHEN=(WHEN=("pos+5",2,ZD,EQ,"exp"),"
inrec = " "
say inrec" OVERLAY("pos+30":"pos",03,UFF,M11,LENGTH=10,"
say inrec" "pos+40":"pos+30",10,ZD,MUL,+"10**(exp-1)",EDIT=(IIIIIIIIII)),HIT=NEXT),"
end
end
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
An example of using CHANGE= with enrico's data. The NOMATCHs specify default values for when there is no match. If you leave them out, you'll get a run-time failure, which may be safer than just letting it rip.