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     [SHARING] - Remove Trailing Spaces from text output (Unicode UTF-8)

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SHARING] - Remove Trailing Spaces from text output (Unicode UTF-8)
 Login/Join
 
Member
posted
Hi all,

Just thought I would again share a very simple solution that I'm sure most of you know but is not well documented. Hopefully this is not a piece of useless information.

The issue was that we have a requirement to output data to a text file and ensure that there are x number of spaces at the end of each row.

The row in the Oracle Database is set to A2000V however the maximum length in the row is 130 Characters with spaces after that.

The text file output required was that the end of the row had 8 trailing spaces.
If using a codepage like 1252 then you can set a define field to A138 and the output is fine.

However if using UNICODE the multiplication factor that accounts for the maximum of 3 Bytes will basically triple the space which in our case was adding 200+ spaces in the text file. (Even though it's not really space but bytes)

Anyway what we had to do was stipulate to WebFOCUS the number of bytes to display.
This was done by changing the define field from

DEFINE FILE REPORT_DATA
DF_MERGE_COLUMN/A138 = MERGE_COLUMN

to

DEFINE FILE REPORT_DATA
DF_MERGE_COLUMN/A138B = MERGE_COLUMN

Adding the B at the end of the field length in the define allowed us to have a text file with the correct number of spaces.


WebFOCUS 8203M
O/S Windows 7
 
Posts: 7 | Registered: August 02, 2017Report This Post
Gold member
posted Hide Post
Cool,
Thanks for sharing

Nice Thread


WF 8.2.04
Windows/Unix
All Formats
In Focus since 2006
 
Posts: 74 | Location: UK | Registered: September 17, 2018Report This Post
Gold member
posted Hide Post
I didn't know that, but wish I had; thank you!


WebFocus 8201m on Windows; App Studio 8201; Procedures: WebFocus with SQL; HTML Parameter Pages & Dashboard; Output: Excel, HTML, & PDF.
 
Posts: 88 | Location: MI | Registered: July 23, 2009Report This Post
Gold member
posted Hide Post
However, when I do get a multibyte character in one of my fields, if I use this approach, my field ends up being too narrow, and my next field starts early.

If anybody has a solution to that, I'd love to hear it! One could convert all multibyte characters to ASCII characters at the outset, but that seems uneccessary in 2019. . .


WebFocus 8201m on Windows; App Studio 8201; Procedures: WebFocus with SQL; HTML Parameter Pages & Dashboard; Output: Excel, HTML, & PDF.
 
Posts: 88 | Location: MI | Registered: July 23, 2009Report This Post
Member
posted Hide Post
Can you give me an example of how your data is structured? Specifically where your Multibyte character is.
I haven’t tried this with a blend of ASCII and Multibyte but as we output Chinese Characters I can quite easily create a data source that does this.


WebFOCUS 8203M
O/S Windows 7
 
Posts: 7 | Registered: August 02, 2017Report 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     [SHARING] - Remove Trailing Spaces from text output (Unicode UTF-8)

Copyright © 1996-2020 Information Builders