Focal Point
AYMD Function had to be modified for 534. What else?

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

July 18, 2005, 09:03 PM
jodye
AYMD Function had to be modified for 534. What else?
Hi Everyone

On this ongoing topic of migrating to 534... I just discovered that the following code, which worked fine on 52, no longer works...

-SET &TODAY=&YYMD;
-SET &YESTERDAY=AYMD(&TODAY,-1,'YYMD');
-TYPE &YESTERDAY

(FOC36355) INVALID TYPE OF ARGUMENT #3 FOR USER FUNCTION AYMDI


I fixed it by changing it to
-SET &YESTERDAY=AYMD(&TODAY,-1,'I8');

OK first of all this is really annoying because we use AYMD in a million places. But I am wondering, is this actually documented? What other functions will no longer work or require modifications? Is there a list somewhere?

Thanks

Jodye
July 18, 2005, 09:16 PM
k.lane
It's not surprising that you'd need to use the I8 format since you are performing a numerical function on the date. Yes, I know that you can do this with smart dates as well, but if you're working in dialogue manager, one really doesn't know the format.

The keysheet even indicates that when using AYM or AYMD, that the output format should be I6YYM or I8YYMD.

Ken
July 19, 2005, 12:42 PM
<DocServices>
Hi Jodye,

All functions are documented in the WebFOCUS Using Functions manual (DN4500583.0904).

I hope this helps.

Best,
Jennifer
February 23, 2006, 12:36 PM
Prarie
All I want to do is Subtract 1 month from the end of the month, so I can have a month range that will automatically run each month...scheduled at month end.


I cannot...no matter what I do...and how much documentation I read, or old posts, seem to get AYM to work.

Anyone?


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
THIS WORKS
DEFINE FILE CAR
CURR_DATE/YYMD WITH COUNTRY='&YYMD';
BEG_CUR_MO/YYMD=DATEMOV(CURR_DATE,'BOM');
END_CUR_MO/YYMD=DATEMOV(CURR_DATE,'EOM');
BEG_PRIOR_MO/YYMD=DATEADD(BEG_CUR_MO,'M',-1);
END_PRIOR_MO/YYMD=DATEMOV(BEG_PRIOR_MO, 'EOM');
END
TABLE FILE CAR
PRINT CURR_DATE AS 'CURRENT,DATE'
BEG_CUR_MO AS '1ST DAY,CURRENT,MONTH'
END_CUR_MO AS 'LAST DAY,CURRENT,MONTH'
BEG_PRIOR_MO AS '1ST DAY,PRIOR,MONTH'
END_PRIOR_MO AS 'LAST DAY,PRIOR,MONTH'
END


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
jodye, we encountered the same exact problem in testing 53, and i used TEXTPAD to find all the AYMD functions in all my fexes.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID