As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
Hello everyone, I have a report which needs a date parameter as follows:
WHERE STC_STATUS_DATE EQ HDTTM('&Status_Date', 8, 'HYYMDs')
STC_STATUS_DATE is a datetime in SQLServer.
The report works fine if I run it and provide a date at the prompt like so: 20060130.
I want to schedule this report to run in Report Caster and have the System Date passed as the date parameter. I have tried to use the &YYMD variable but it was unsuccessful and gave the following error message:
INVALID TYPE OF ARGUMENT #1 FOR USER FUNCTION HDTTM
Does anyone know the correct way to pass the system date as a parameter in Report Caster? Any help or suggestions would be greatly appreciated.
Jaywill, it appears that the first argument to the HDTTM function must be a smart date, rather than an I8. If you convert the system date to a smart date, then put the smart date into the HDTTM function, it would work; here's a carfile example, working in windows, now granted there's a more elegant way to get from i8 to yymd... in DM, use DATECVT function DEFINE FILE CAR TODAY/I8YYMD WITH CAR = &YYMD ; STODAY/YYMD = TODAY; 1DATE/HYYMDs WITH CAR=HDTTM( STODAY , 8, 'HYYMDs') END TABLE FILE CAR PRINT TODAY 1DATE CAR END
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
To work your requirement into Susannah's example, try -
-SET &Status_Date = AYMD(&YYMD,0,'I8YYMD');
-* or
-SET &Status_Date = &YYMD;
DEFINE FILE CAR
TODAY/I8YYMD WITH CAR = &YYMD ;
STODAY/YYMD = TODAY;
1DATE/HYYMDs WITH CAR = HDTTM( STODAY , 8, 'HYYMDs');
END
TABLE FILE CAR PRINT TODAY 1DATE CAR
WHERE 1DATE EQ HDTTM('&Status_Date.EVAL' , 8, 'HYYMDs');
END
Either &Status_Date is acceptable to the HDTTM function.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Thanks for the suggestion Susannah! For this report, I'm trying to keep it generic so that it may be run on demand by a user who can supply any date they wish, or it can be run on a schedule in Report Caster with the System date. I'm trying to set this up from within the Report Caster Gui for Schedule Management, so all I can supply for &Status_Date is the NAME/VALUE pairing on the Parameters tab.
so you just have to edit the date you pass is a smartdate, rather than an i8; T says to try a .EVAL after your statusdate in your function as it is already. Give that a try... That .EVAL works magic...but do remember to tell us your version/system in your signature (edit your profile..muchas gracias)
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
I'm trying to set up the same thing as Jaywill-report that can be run by report caster passing the system date and also be a user who can supply any date. I've added the .EVAL to my fex procedure. What do I need set the report caster variable to so I can pass &YYMD?
Thanks
Server Environment: Win2K3 Server WebFOCUS 7.13 Apache Tomcat standalone application server
hmmm. i don't think that actually works... when you try it, what do you get? i get that &REP_DATE is set to an actual character string '&YYMD.EVAL'... ??
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003