Posted: Tue Nov 17, 2009 11:46 am Post subject: average length of variable records ?
Is there a utility to compute the average length of all of the records in a variable length sequential mainframe file ? I thought I had seen one once, but can't seem to come up with one doing a search ...
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Frank, I like the simplicity of your solution, but, since it calculates an integer average, it truncates the answer. Is it possible to display the answer as a decimal answer, like 119.3? _________________ Alan Voss
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Wed Nov 18, 2009 11:41 am Post subject:
advoss,
AVG only displays an integer value, not a decimal value. If you want to display the decimal part, you have to multiply by the appropriate value (e.g. +100 for two decimal places or +1000 for three decimal places).
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum