|
Hi guys
I have a TI process....in the Prolog I want to do a once off calc to derive a date (in a different format) from which I am reading in from the cube.
Now....
1. I dont quite understand the 'lifetime' of a variable..meaning...if I define a variable in the "Variables" tab, does it get initialised every time it passes thru the Data tab?
2. If a variable is NOT defined in the "Variables" Tab....i e I define it in the code - what is the difference between a variable defined in code and one defined in the "variables" tab.
3. In my code - the initial CellgetN statement in the Prolog tab - is EXACTLY in the same format as in the Data tab. Although, upon execution, I get an error saying "Invalid Dimension - abank". I dont get it....why does it complain about it in the Prolog tab and not in the data tab??
Please have a look at the code. It works 100% in the Data tab, but then obviously, I get as many results as there are rows in my cell subset. So - I only want to execute in once...hence the prolog tab. BUT...in the prolog tab, my answer is blanks (as opposed to the Data tab)
Please help - I dont think I understand the difference between variable usage in the two tabs.
Code: Prolog tab...
#****Begin: Generated Statements***
#****End: Generated Statements****
cellgetn('atm test', 'Volume', abank,ateamno, acentre, teamtype,'Totkm',aregion, adate);
IF (subst(adate,5,2) @= '01') ;
tmpmonth = 'Jan';
Elseif (subst(adate,5,2) @= '02') ;
tmpmonth = 'Feb';
ELSEIF (subst(adate,5,2) @= '03') ;
tmpmonth = 'Mar';
ELSEIF (subst(adate,5,2) @= '04') ;
tmpmonth = 'Apr';
ELSEIF (subst(adate,5,2) @= '05') ;
tmpmonth = 'May';
ELSEIF (subst(adate,5,2) @= '06') ;
tmpmonth = 'Jun';
ELSEIF (subst(adate,5,2) @= '07') ;
tmpmonth = 'Jul';
ELSEIF (subst(adate,5,2) @= '08') ;
tmpmonth = 'Aug';
ELSEIF (subst(adate,5,2) @= '09') ;
tmpmonth = 'Sep';
ELSEIF (subst(adate,5,2) @= '10') ;
tmpmonth = 'Oct';
ELSEIF (subst(adate,5,2) @= '11') ;
tmpmonth = 'Nov';
ELSEIF (subst(adate,5,2) @= '12') ;
tmpmonth = 'Dec';
ENDIF;
testdate = tmpmonth | ' - ' | subst(adate,1,4) ; |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|