Skip to Content
0
Jul 13, 2015 at 12:16 PM

RUN ALLOCATION MULTIPLE LOOPS

92 Views

Hi experts,


is possible to somehow ged rid of multiple loops in allocation? The running time is really bad...


*FOR %TIME_VAR% = 0,1,2,3,4,5,6,7,8,9,10,11

*FOR %DISTCH_VAR% = %DISTCH_VAR%

*FOR %CLS_VAR% = COPRLP,BRM,INTEXP, OTHERCL, PRIVATEBC

*RUNALLOCATION

*FACTOR = USING

*DIM TIME WHAT = %TIME_SET%; WHERE = TMVL(%TIME_VAR%,%TIME_SET%); USING = TMVL(%TIME_VAR%,%TIME_SET%);

*DIM ACCOUNT WHAT = STAT_MISC_04; WHERE = %ACTIVABLE%; USING = <<<;

*DIM ACCOUNT_DETAIL WHAT = NA_AD; WHERE = NA_AD; USING = BAS(AD_TOT);

*DIM ENTRYTYPE WHAT = CH_PERC; WHERE = INPUT; USING = <<<;

*DIM DISTCH WHAT = %DISTCH_VAR%; WHERE = %DISTCH_VAR%; USING = DISTCH_BEFORE_ALLOC;

*DIM CLIENTSEG WHAT = %CLS_VAR%; WHERE = <<<; USING = CLS_BEFORE_ALLOC; total = <<<;

*ENDALLOCATION

*NEXT

*NEXT

*NEXT

full script:

*SELECT(%ACTIVABLE%,"[ID]",ACCOUNT,"[LOCAL_F]='ACTIV'")

*SELECT(%DISTCH_VAR%,"[ID]",DISTCH,"[LOCAL_LS_2]='GL'")

*XDIM_MEMBERSET ACCOUNT = %ACTIVABLE%,STAT_MISC_04

*XDIM_MEMBERSET TIME = %TIME_SET%

*XDIM_MEMBERSET DISTCH = DISTCH_BEFORE_ALLOC,%DISTCH_VAR%

*XDIM_MEMBERSET ACCOUNT_DETAIL = BAS(AD_TOT),NA_AD

*XDIM_MEMBERSET VERSION = P01

*XDIM_MEMBERSET CLIENTSEG = NA_CLS,COPRLP,BRM,INTEXP, OTHERCL, PRIVATEBC

*XDIM_MEMBERSET CUSTSEG = X

*XDIM_MEMBERSET LOB = BAS(LOB_GL)

*XDIM_MEMBERSET EXPENSEFUNC = ARS2100585

*XDIM_MEMBERSET ENTRYTYPE = CH_PERC,INPUT

*XDIM_MEMBERSET RPTCURRENCY = LC_INP

*XDIM_MEMBERSET PARTNER_RU = NA_PU

*XDIM_MEMBERSET RU = 300000

*FOR %X% = 1//,2,3,4,5,6,7,8,9,10,11

*XDIM_ADDMEMBERSET TIME = TMVL(%X%,%TIME_SET%)

*NEXT

*FOR %TIME_VAR% = 0,1,2,3,4,5,6,7,8,9,10,11

*FOR %DISTCH_VAR% = %DISTCH_VAR%

*FOR %CLS_VAR% = COPRLP,BRM,INTEXP, OTHERCL, PRIVATEBC

*RUNALLOCATION

*FACTOR = USING

*DIM TIME WHAT = %TIME_SET%; WHERE = TMVL(%TIME_VAR%,%TIME_SET%); USING = TMVL(%TIME_VAR%,%TIME_SET%);

*DIM ACCOUNT WHAT = STAT_MISC_04; WHERE = %ACTIVABLE%; USING = <<<;

*DIM ACCOUNT_DETAIL WHAT = NA_AD; WHERE = NA_AD; USING = BAS(AD_TOT);

*DIM ENTRYTYPE WHAT = CH_PERC; WHERE = INPUT; USING = <<<;

*DIM DISTCH WHAT = %DISTCH_VAR%; WHERE = %DISTCH_VAR%; USING = DISTCH_BEFORE_ALLOC; total = <<<;

*DIM CLIENTSEG WHAT = %CLS_VAR%; WHERE = <<<; USING = CLS_BEFORE_ALLOC; total = <<<;

*ENDALLOCATION

*NEXT

*NEXT

*NEXT