Focal Point
Problem with & variable

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6211048331

March 14, 2005, 07:30 PM
<Ed>
Problem with &amp; variable
hi all,

I am executing a report using webfocus. the fex, checks to see if the month is FEB and the year is a leap year...to set the number of days in the drill down to 28/29 resp.

it then makes a variable called:
&DRILL_ENDDATE which has the YYYYMMDD format.
for this date.

I checked this variable....and it has the value of 20050228.

later on, while it builds the report in a excel file, the report has a column for serial number...which has links calling another fex.

URL=http://&&WEBURL/cgi-bin/ibi_cgi/webapi.dll?(IBIF_ex='SH' s_lst=N2 t_rng=&DRILL_ENDDATE f_rng=&DRILL_STARTDATE),

there is no mention of the &DRILL_ENDDATE between this line and the line in which it is set.
however, on running the report... the excel file link shows t_rng=20050229

Any idea, how the date changed from 28 to 29.?

thanks

-Ed.
March 15, 2005, 03:00 AM
<Zushi Hitoshi>
For instance, how because it is as follows?

-SET &WYY3D=EDIT(&YYMD,'99990301');
-SET &WYYMD=AYMD(&WYY3D,-1,'I8');
-TYPE &WYYMD
March 15, 2005, 01:19 PM
Leo L
I think the best bet would be to verify your code and make sure its 20050228 right before you use it... Based on what you said... perhaps make sure when your checking to see if its 28 or 29 that its not incorrectly giving 29. Its tough without seeing the code, but it could either be the logic used to assign it to 29 or your using the same variable name somewhere else without realizing it. If your sure it gives the correct answer, change the name of the variable to ensure its not being used anywhere else.

Leo
March 15, 2005, 01:59 PM
reFOCUSing
If you want and easy way to get the end of a month try using the following code:

-SET &DT = 20040201;
-SET &END_YYMD = DATECVT((DATEMOV((DATECVT(&DT,'I8YYMD','YYMD')),'EOM')),'YYMD','I8YYMD');
-TYPE &END_YYMD
The function DATEMOV is what does the trick.

This message has been edited. Last edited by: <Mabel>,