I have two numeric fields on an input record.
I do not know the format, however there is another set of fields on the input record which I can use to determine the formats.
There is also a field that allows me to determine the desired format of the results of the COMPUTE.
Basically each of the fields could be one of 5 formats - a whole number or 1,2,3, or 4 decimal places.
Moving each of the 2 input fields to a field with the appropriate PIC clause isn't too bad - 5 Evaluate...When statements for each.
However, how do I efficiently handle the COMPUTE? I would hate to set up 125 Evaluate...When statements since the combinations are 5 x 5 x 5.
Any ideas???
I do not know the format, however there is another set of fields on the input record which I can use to determine the formats.
There is also a field that allows me to determine the desired format of the results of the COMPUTE.
Basically each of the fields could be one of 5 formats - a whole number or 1,2,3, or 4 decimal places.
Moving each of the 2 input fields to a field with the appropriate PIC clause isn't too bad - 5 Evaluate...When statements for each.
However, how do I efficiently handle the COMPUTE? I would hate to set up 125 Evaluate...When statements since the combinations are 5 x 5 x 5.
Any ideas???