I am trying to calculate what the balance of an invoice was at a certain period where
BAL = Invoice.AMT - sum(adj.amts).
The adjustments amounts (adj.amts) are MV and have associated dates.
Therefore, I want to be able to have pass data via prompt for ACCTG.PERIOD.
SUBR('-IFS',SUBR('-LES',ACCTG.PERIOD,REUSE('ADJ.DATES')),'1','')
I also tried
SUBR('-IFS',SUBR('-LES',<<A,ACCTG.PERIOD>>,REUSE('ADJ.DATES')),'1','')
and that did not work.
This cannot be in a paragraph.
This has to be done in an attribute otherwise audit gets all crazy. And I have to use the generic subroutines like IFS and LES.