Hi,
I have created a fex procedure that uses commands from Dialog Manager and focus.
I would like to know if it is possible to pass a variable PERNMB and HEAD1 into a loop. My code is the following:
DEFINE FILE WF0051
CR_AMT/D18.2N=TODAYS_CREDIT_VLM;
DR_AMT/D18.2N=TODAYS_DEBITS_VLM;
BAL_HI/D18.2N=HIGH_BAL_LIMIT_VLM;
BAL_LO/D18.2N=LOW_BAL_LIMIT_VLM;
PERNMB/N2= IF (ACCOUNT_TYPE_VLM EQ 'A' OR 'L' OR 'B') THEN 0 ELSE
IF (ACCOUNT_TYPE_VLM EQ 'I' OR 'E' OR 'V') THEN 01 ELSE '';
HEAD1/A25=IF (ACCOUNT_TYPE_VLM EQ 'A' OR 'L' OR 'B') THEN 'CURRENT YTDA, BALANCE' ELSE
IF (ACCOUNT_TYPE_VLM EQ 'I' OR 'E' OR 'V') THEN 'CURRENT YTDB, BALANCE' ELSE '';
END
-*
-DEFAULT &DATACAT='______'
-*-DEFAULT &DATACATDES='Current Yr'
-SET &YEAR=EDIT(&LYR,'$$$99');
-SET &CURPST=&CP;
-*
TABLE FILE WF0051
PRINT
-* Include standard flexkey field display
-INCLUDE GL3FLD01
CURCD
CURRT
ACCOUNT_TYPE_VLM
CR_AMT AS 'Credit,Amount,Today'
DR_AMT AS 'Debit,Amount,Today'
-* If the account_type_vlm is equal to Assets or Liablities
-* or Balance then we perform include the period zero amount with the
-* YTD total.
-* If the account_type_vlm is equal to Expense, Income or
-* Volume, then we don't include period zero amount with the
-* YTD total.
COMPUTE YTD_TOTAL/P25.2=
-REPEAT PERLOOP FOR &PER FROM PERNMB TO &CURPST STEP 1
-SET &PER=IF &PER LT 10 THEN '0'|&PER ELSE &PER;
-SET &PLUS=IF &PER LT &CURPST THEN ' + ' ELSE ' ';
&YEAR..&DATACAT..&PER &PLUS
-PERLOOP
; AS HEAD1
-*
I would like to be able to pass PERNMB (which will be either a 0 or a 1 ) into this loop.
I receive the following error with this code.
Thanks for your help.
Sheila
I have created a fex procedure that uses commands from Dialog Manager and focus.
I would like to know if it is possible to pass a variable PERNMB and HEAD1 into a loop. My code is the following:
DEFINE FILE WF0051
CR_AMT/D18.2N=TODAYS_CREDIT_VLM;
DR_AMT/D18.2N=TODAYS_DEBITS_VLM;
BAL_HI/D18.2N=HIGH_BAL_LIMIT_VLM;
BAL_LO/D18.2N=LOW_BAL_LIMIT_VLM;
PERNMB/N2= IF (ACCOUNT_TYPE_VLM EQ 'A' OR 'L' OR 'B') THEN 0 ELSE
IF (ACCOUNT_TYPE_VLM EQ 'I' OR 'E' OR 'V') THEN 01 ELSE '';
HEAD1/A25=IF (ACCOUNT_TYPE_VLM EQ 'A' OR 'L' OR 'B') THEN 'CURRENT YTDA, BALANCE' ELSE
IF (ACCOUNT_TYPE_VLM EQ 'I' OR 'E' OR 'V') THEN 'CURRENT YTDB, BALANCE' ELSE '';
END
-*
-DEFAULT &DATACAT='______'
-*-DEFAULT &DATACATDES='Current Yr'
-SET &YEAR=EDIT(&LYR,'$$$99');
-SET &CURPST=&CP;
-*
TABLE FILE WF0051
-* Include standard flexkey field display
-INCLUDE GL3FLD01
CURCD
CURRT
ACCOUNT_TYPE_VLM
CR_AMT AS 'Credit,Amount,Today'
DR_AMT AS 'Debit,Amount,Today'
-* If the account_type_vlm is equal to Assets or Liablities
-* or Balance then we perform include the period zero amount with the
-* YTD total.
-* If the account_type_vlm is equal to Expense, Income or
-* Volume, then we don't include period zero amount with the
-* YTD total.
COMPUTE YTD_TOTAL/P25.2=
-REPEAT PERLOOP FOR &PER FROM PERNMB TO &CURPST STEP 1
-SET &PER=IF &PER LT 10 THEN '0'|&PER ELSE &PER;
-SET &PLUS=IF &PER LT &CURPST THEN ' + ' ELSE ' ';
&YEAR..&DATACAT..&PER &PLUS
-PERLOOP
; AS HEAD1
-*
I would like to be able to pass PERNMB (which will be either a 0 or a 1 ) into this loop.
I receive the following error with this code.
Thanks for your help.
Sheila