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     [CLOSED] Unwanted Space

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Unwanted Space
 Login/Join
 
Master
posted
I'm not sure what happen, but all of a sudden we have spaces in our variables that we can't remove.

I've tried both TRIM_ and TRUNCATE and there is still a space there, but the default is '', no space at all, so where is this space coming from?

Code:
-SET &CLIENTPATH = '';
-TYPE CLIENTPATH = >>&CLIENTPATH<<
-SET &CLIENTPATH = TRIM_(BOTH, ' ', &CLIENTPATH);
-TYPE CLIENTPATH = >>&CLIENTPATH<<
-SET &CLIENTPATH = TRUNCATE(&CLIENTPATH);
-TYPE CLIENTPATH = >>&CLIENTPATH<<


Response:
CLIENTPATH = >> <<
CLIENTPATH = >> <<
CLIENTPATH = >> <<

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



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Expert
posted Hide Post
Is it a space ?

Can you try using UFMT to check.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Member
posted Hide Post
Hi GavinL,
I don't think so, it is a space because when i apply ARGLEN function on the variable it is giving zero length.

-SET &CLIENTPATH ='';
-TYPE CLIENTPATH = >>&CLIENTPATH<<

-SET &LENGTH=ARGLEN(50, &CLIENTPATH, 'I2');
-TYPE &LENGTH

Thanks

WebFCOUS
8.1.04
 
Posts: 13 | Registered: May 31, 2016Report This Post
Platinum Member
posted Hide Post
My understanding is that variables always have at least one character, zero length values are not supported.


WebFOCUS 8.2.06
 
Posts: 210 | Location: Sterling Heights, Michigan | Registered: October 19, 2010Report This Post
Master
posted Hide Post
Well, I just did another test and I guess WebFOCUS evaluates spaces with blanks.. This day an age, not able to evaluate spaces. What odd results..

-SET &CLIENTPATH = '';
-SET &MC = &CLIENTPATH.LENGTH;
-SET &MV = IF &CLIENTPATH EQ ' ' THEN 'YES' ELSE 'NO';
-SET &MV2 = IF &CLIENTPATH EQ '' THEN 'YES' ELSE 'NO';
-TYPE MC = >>&MC<<
-TYPE MV = >>&MV<<
-TYPE MV2 = >>&MV2<<
-TYPE CLIENTPATH = >>&CLIENTPATH<<
-SET &CLIENTPATH = TRIM_(BOTH, ' ', &CLIENTPATH);
-TYPE CLIENTPATH = >>&CLIENTPATH<<
-SET &CLIENTPATH = TRUNCATE(&CLIENTPATH);
-TYPE CLIENTPATH = >>&CLIENTPATH<<
-SET &STROUT = STRREP (&CLIENTPATH.LENGTH, &CLIENTPATH, 1, ' ', 0, '', &CLIENTPATH.LENGTH, 'A&CLIENTPATH.LENGTH');
-TYPE STROUT = >>&STROUT<<


Results:
 MC = >>01<<
 MV = >>YES<<
 MV2 = >>YES<<
 CLIENTPATH = >> <<
 CLIENTPATH = >> <<
 CLIENTPATH = >> <<
 STROUT = >> <<



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Expert
posted Hide Post
Here's something interesting:

-SET &MYVAR0 = ;
-SET &MYVAR1 = '';
-SET &MYVAR2 = ' ';
-SET &MYVAR3 = '  ';
-TYPE MYVAR0 LENGTH: &MYVAR0.LENGTH
-TYPE MYVAR1 LENGTH: &MYVAR1.LENGTH
-TYPE MYVAR2 LENGTH: &MYVAR2.LENGTH
-TYPE MYVAR3 LENGTH: &MYVAR3.LENGTH


&MYVAR0 has a length of zero. I don't know if this code is valid.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Master
posted Hide Post
Interesting in deed! I think you found an undocumented feature. Smiler

Even set to _FOC_NULL returns 09. You found the only thing that returns what is expected.



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Expert
posted Hide Post
Francesco, add this
-TYPE MYVAR0 LENGTH: &MYVAR0.LENGTH &MYVAR0.EXIST
-TYPE MYVAR1 LENGTH: &MYVAR1.LENGTH &MYVAR1.EXIST

and you'll see that myvar0 doesn't exist, but myvar1 does
so I use that feature to nuke some &vars that I've been messing with in a fex to make sure they don't overstay their welcome.
-SET &myvar0 = ;
and its gone




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
Expert
posted Hide Post
"I see", said the blind man as he fell over the cliff...


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Yes, we use -SET &var =; to effectively null the variable.

In fact its a way to stop prompting if you don't want to use -DEFAULTH


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
quote:
Originally posted by Francis Mariani:
"I see", said the blind man as he fell over the cliff...

Miracle cure!


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 :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Expert
posted Hide Post
Have you considered CTRAN?




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report 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     [CLOSED] Unwanted Space

Copyright © 1996-2020 Information Builders