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.
I would like to set 2 default variables. I currently have them hard coded as seen in the data below, I would like to have STARTDATE set to today and ENDDATE set to 7 days ago. How would I go about this. Thank you.
It does, but with -DEFAULT you need to .EVAL the value (safe in this case) as it does not evaluate expressions of its own accord. And it's -SET and -DEFAULT, not SET and DEFAULT. Those are different languages!
But of course you can't just subtract 7 from a numerical date value like Prarie suggested, that will only work after the 8th of each month.
You'll need to calculate the date using the "smart date" functions (DATECVT and DATEADD in this case). Be aware that dialog manager (which the -SET command is part of) does not understand "smart dates", so you'll have to convert it back to something simpler: number or string.
Or you do the calculations in a DEFINE or COMPUTE block in your TABLE request. That's FOCUS code and it does understand "smart dates".
BTW, I think you got your explanation backwards. I assume you meant to set the ENDDATE to the current date and the STARTDATE 7 days ago, otherwise you create a time range that is -7 days long.
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
Originally posted by Wep5622: It does, but with -DEFAULT you need to .EVAL the value (safe in this case) as it does not evaluate expressions of its own accord. And it's -SET and -DEFAULT, not SET and DEFAULT. Those are different languages!
But of course you can't just subtract 7 from a numerical date value like Prarie suggested, that will only work after the 8th of each month.
You'll need to calculate the date using the "smart date" functions (DATECVT and DATEADD in this case). Be aware that dialog manager (which the -SET command is part of) does not understand "smart dates", so you'll have to convert it back to something simpler: number or string.
Or you do the calculations in a DEFINE or COMPUTE block in your TABLE request. That's FOCUS code and it does understand "smart dates".
BTW, I think you got your explanation backwards. I assume you meant to set the ENDDATE to the current date and the STARTDATE 7 days ago, otherwise you create a time range that is -7 days long.