Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Variables with spaces in data

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Variables with spaces in data
 Login/Join
 
Member
posted
Hello all,

I am new to both WebFocus and the Forums and this is my first post. I am having an issue with data that contains spaces.

I am using Global Variables to go back and forth between many reports. I have an include file in each that sets the global variables based on the drill down that calls the report. By default all global variables have a value of FOC_NONE.

In the include I have this line of code
-SET &&DOWNED = IF '&DOWNED.EVAL' NE 'FOC_NONE' THEN ('''' | &DOWNED.EVAL | '''') ELSE &&DOWNED;

And in the .fex I refer to it in a where statement
WHERE OWNED_BY_CUST EQ &&DOWNED;

If &DOWNED contains a value of "JONES" (quotes not part of data)everything works fine. But if it has "R Jones" then it would fail and yield this error at the include statement.
(FOC261) EXPRESSION IS INCOMPLETE BECAUSE AN OPERATION IS MISSING

If it has "R-Jones" then it fails and returns this error.
(FOC281) ALPHA ARGUMENTS IN PLACE WHERE NUMERIC ARE CALLED FOR

I have tried various ways to set my include statement but haven't had any luck getting it to work. Any ideas?

Thanks,

Tim

edited solution
I used this syntax
-SET &&DOWNED = IF '&DOWNED.EVAL' NE 'FOC_NONE' THEN ('''' | '&DOWNED.EVAL' | '''') ELSE &&DOWNED;

This message has been edited. Last edited by: JonesGuy,


WebFocus 7.610
WindowsXP
 
Posts: 8 | Registered: January 26, 2009Report This Post
Expert
posted Hide Post
Welcome to the forum!

I personally don't use global variables in WF unless I absolutely have to but with that said, why don't you try looking up the QUOTEDSTRING modifier. There are a number of posts that reference it and you can also do the advanced search in the upper righthand corner.

Another aside is the fact that any line in your focexec with FOC_NONE in it is not parsed. Please take that into consideration when developing.

And lastly since I thought it was a requirement for new posters now but yours didn't seem to get updated, could you please go back and update your forum profile to include your product suite, releases, and platform so that we can better help you.

Hope this helps!


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Member
posted Hide Post
Hello and thanks for the reply. I thought I filled out all the required fields. I am not sure what else to add to my sig. Is WFRS Report Server?

I think I may need a new approach. I used QUOTEDSTRING. I Changed my code to
-SET &&DOWNED = IF '&DOWNED.EVAL' NE 'FOC_NONE' THEN &DOWNED.QUOTEDSTRING ELSE &&DOWNED;

In turn I had to change my Where statements to
WHERE OWNED_BY_CUST EQ &&DOWNED.QUOTEDSTRING;

Now however when &&DOWNED = FOC_NONE the WHERE statement does not work correctly. I liked where I tried to Concatenate the quotes initially but the spaces really messed me up. Not to mention if I run into an apostrophe in my data. Is there a happy medium where I can set my global variable without having to use QUOTEDSTRING in my Where statement?

Thanks,

Tim


WebFocus 7.610
WindowsXP
 
Posts: 8 | Registered: January 26, 2009Report This Post
Virtuoso
posted Hide Post
Tim

if you put your global variables in your startup file, it's not needed anymore to include them in each fex.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Expert
posted Hide Post
As Ginny says, the FOC_NONE means the statement gets ignored. its a catch22.
so with quote-needy parms, i do this:

-*SET &FRED = FOC_NONE ;
-SET &FRED = 'R jones ' ;

-SET &filter = IF &FRED IS FOC_NONE THEN ' ' ELSE 'IF TVSTAR IS '''| &FRED ||'''';
-TYPE fred is &FRED
-TYPE filter is &filter

then in my fex, instead of
WHERE TVSTAR IS &FRED.QUOTEDSTRING

i use
&filter

and if i need more text on the same line, then
&filter.EVAL

and the results of this sample are:
 fred is R jones
 filter is IF TVSTAR IS 'R jones'

If i run it with SET &FRED = FOC_NONE
then i get
 fred is FOC_NONE
 filter is  




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Variables with spaces in data

Copyright © 1996-2020 Information Builders