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.
Hi all, I'd like to upcase a string that has a comma in it like a string 'This is good, but make it better.' How can I do an upcase on it? I have it like this: &STR = 'This is good, but make it better.' -SET &STRLEN=&STR.LENGTH; -SET &TMPLNGTH = 'A' || &STR1LEN; -SET &UPSTR = UPCASE(&STRLEN,&STR, &TMPLNGTH );
this wont work because the string has upcase.
Also after upcase, I need to use strrep function on this to take out the comma. Can somebody help with both functions? Thanks,
KK
on VMS: OpenVMS AXP V8.2 Prod and TestEnvironment Webfocus: WebFocus 7.6.1 Prod and TestEnvironment
comma in the string represents 2 inputs though. so if I have something like this: 1, 2, 3, 4, 5 in a string, those each word seperated by commas are to be treated as input for something to search on..
on VMS: OpenVMS AXP V8.2 Prod and TestEnvironment Webfocus: WebFocus 7.6.1 Prod and TestEnvironment
sorry, somehow it got posted before I finished typing. Sorry for the confusion, let me explain the whole thing what I was trying to accomplish. Yes. Comma(s) will be taken out before or after the whole string is upper cased. those commas will be replaced with an OR. For example, if input string is 'Web, Focus, Sort, Search' etc I am turning it into a where statement something like WHERE DESCRIPTION EQ 'WEB' OR 'FOCUS' OR 'SORT' OR 'SEARCH';
for the end-user, s/he will be inputting the string 'Web, Focus, Sort, Search' in a text area on a lunch page.
to get that where statement, the requuirements are that they should be up-cased, and replace comma with an or for each comma.
What is the best way to get this done? Thanks so much in advance, KK
on VMS: OpenVMS AXP V8.2 Prod and TestEnvironment Webfocus: WebFocus 7.6.1 Prod and TestEnvironment
kk, how about the OVRLAY function to replace the , with an ' OR '. Do you hve the 4th manual in the series, the FUNCTIONS manual? Have a look thru the entire section on TEXT functions. Good stuff there. The POSIT and/or GETTOK functions you might like, as well. The UPCASE function should be working fine for you, i can't see why it won't. I perfer the ARGLEN function to the &var.LENGTH way. I get a more accurate answer. the .LENGTH will count trailing blanks... -s.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
Although I would suggest a method with (possibly) less effort would be to change your WHERE field EQ to WHERE field IN and then have your list comma seperated and within braces - WHERE DESCRIPTION IN ('WEB','FOCUS','SORT','SEARCH')
BTW, please update your signature (see the "sticky" topic on the topic list page) so that we can gauge our responses to you, knowing your platform and release.
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 very much, All! I will definitely try these answers. Will post back following up on this if I have more questions later today or tomorrow. Again, Thanks! KK
on VMS: OpenVMS AXP V8.2 Prod and TestEnvironment Webfocus: WebFocus 7.6.1 Prod and TestEnvironment
Stefaans they work just fine. all the way thru 762. the specs are very specific. code tightening over the versions may have caused any problems you have encountered. If you follow the rules, they work like a charm. -s.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
THIS SHOULD BE IN THE MANUAL WOULD SAVE A GREAT DEAL OF TROUBLE.
The problem people get with functions not working with dm is that dm will try and establish the datatype on the fly thus '0' will be translated to double precision.
Force the issue by coding your alpha arguments using
(a) ASIS (b) Concatenation of a blank on the end (dont worry if the string goes past its length ) eg '0' | ' ' will always be treated as string.
Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2 Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006
Hi All I have started working on this one, but am busy at work. I think Susannah is the closest. What I am working on is to take the string and POSIT the comma and shorten the string to Posit + 1 to end of string. The use ARGLEN to determine the length of the new string. As this is Dialogue manager, either use this in a repeat loop or a goto until the length of the string is LE to 0. The main point is to write the part from the beginning of the string to just before the comma (each time) TO A FILE. THEN
TABLE FILE MYFILE PRINT * WHERE DESCRIPTION IN FILE EXTERNAL FILE. END This should cater for predicate values less than 4000 chars long. I have had to do this many times over the past 18 yearsThis message has been edited. Last edited by: Stefaans,