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'm trying to subtract 48 hrs from the current date and time and I would like to do this without having to calculate date and time separately. This is what I have so far but All I get for the &prev_48 is the year and a strange character. Any suggestions?
HADD() requires a "date-time" parameter to operate upon, not the string representation of a date and time (A20). That's explains the strange symbols you were getting in WF 7.6.
WebFOCUS 7.7.x has stricter data type validations and fails with an error making it easier to debug:
(FOC36355) INVALID TYPE OF ARGUMENT #1 FOR USER FUNCTION HADD
Originally posted by Tonyperkis: Running into a different issue now and believe it is related to the whole sting vs date-time format.
I'm trying to define a field based on what we set above but I'm getting syntax error (FOC224) SYNTAX ERROR: 18:26:45
It's a string literal, it requires quotes. The best way in this case is to use &PREV_48.QUOTEDSTRING.
Don't use .QUOTEDSTRING on parameters that can be FOC_NONE though, it will translate the value in the string 'FOC_NONE' causing WF to not ignore the line that parameter is on.
quote:
DEFINE FILE PROBSUMMARYM1 prev48/HYYMDS=&PREV_48;
I tried the following
-SET &TEST = HINPUT(20, '&PREV_48', 8, 'HYYMDS');
I'm able to define a field using &TEST but when I check to see the value by -TYPE &TEST it doesn't diplay anything.
What am I not understanding between alphanumeric sting vs date format?
You're trying to assign a DATETIME value to a dialog manager variable. DM doesn't understand DATETIMEs. FOCUS does, however, so this should work:
DEFINE FILE PROBSUMMARYM1
TEST = HINPUT(20, '&PREV_48', 8, 'HYYMDS');
END
Your other mistake in above code is putting a DM variable between quotes in DM code. If you do that, the variable will not be evaluated, so there's a literal '&PREV_48' in your statement and that's not a valid value for a DATETIME. However, in FOCUS code that does work (and often the opposite won't).
You'll need to be more aware of when you're using DM and when you're using FOCUS, as the two are different languages. DM is more like a pre-processor language, while FOCUS does the databasy stuff.
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 :