Hi Dave,
I faced two problems during the reading of your thread:
1. Try to use a more simple coding, since some lines will reduce your performance. Every record will be calculated seperatly, even if it's not needed:
Example:
*REC(FACTOR=1,FUNCAREA=SA01,FACCOUNT=700301.2)
Try to use the statement below instead:
*REC(FACCOUNT=700301.2)
In this case, no calculation will be made and your coding will be a lot faster, depending on the number of data records.
2. You are creating memory variables, but your are not using them:
*CALC_DUMMY_ORG FACCOUNT = PARENTH1
If you want take those variables effect, you need to refer to them in your WHEN statement. At the moment, your WHEN statements don't use your variables.
Hope, this little comment will help you.
Best Regards,
Karsten