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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Uninvited spaces...
 Login/Join
 
Virtuoso
posted
See below code. Where are those spaces coming from?!?
More importantly, how do I prevent them?

-DEFAULTH &FOO = '';
-DEFAULTH &BAR = 'B';
-DEFAULTH &BAZ = '';
-SET &CONCAT = &FOO || &BAR || &BAZ;

-HTMLFORM BEGIN
<pre>[&CONCAT|]
-HTMLFORM END
</pre>


The result is:
[B  ]

I'm running into this issue while generating reference ID's in a number of scripts dealing with generating various sections for compound reports. The extra spaces are messing things up!


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
Virtuoso
posted Hide Post
1. In dialog manager, a variable's value is always at least one character long. So your
-DEFAULTH &FOO = '';
is equaivalent to
-DEFAULTH &FOO = ' ';

2. Hard catenation does not eliminate blanks, it simply moves them to the end of the string.

Thus the length of &CONCAT after
-SET &CONCAT = &FOO || &BAR || &BAZ;
will always be at least 3, and in this case exactly 3.

But you can use TRUNCATE() to drop the trailing spaces.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Virtuoso
posted Hide Post
Hmm... is there anything that a homebrew parser inside a combination of HttpRequestFilter and HttpResponseFilter can't do that dialog manager can? The more I use DM, the more I'm tempted to replace it with something sane.


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
Guru
posted Hide Post
Does TRUNCATE help you at all?
  
-DEFAULTH &FOO = '';
-DEFAULTH &BAR = 'B';
-DEFAULTH &BAZ = '';
-SET &CONCAT_X = &FOO || &BAR || &BAZ;
-SET &CONCAT   = TRUNCATE(&CONCAT_X);

-HTMLFORM BEGIN
<pre>[&CONCAT|]
-HTMLFORM END
</pre>


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
 
Posts: 320 | Location: Memphis, TN | Registered: February 12, 2008Report This Post
Expert
posted Hide Post
  
-DEFAULTH &FOO = '';
-DEFAULTH &BAR = 'B';
-DEFAULTH &BAZ = '';
-SET &CONCAT = &FOO | &BAR | &BAZ;

-HTMLFORM BEGIN
<pre>
{!IBI.AMP.CONCAT;}
</pre>
-HTMLFORM END


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Virtuoso
posted Hide Post
TRUNCATE is what I ended up using. I have a LOT of string concatenations in this report-template, so I was hoping I wouldn't need to wrap nearly every concatenation inside TRUNCATE().

I don't think !IBI.AMP works in compound layout definitions? My actual output isn't HTML; I need these variables to generate compound page layout names and such. Most of these variables' values are identifiers, which is why those trailing spaces seriously get in my way.

This report is quite complicated enough without dialog manager's antics. I'm not even sure I'll be able to do it using WebFOCUS, it appears I'm running into the limits of what compound layouts can do.


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
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders