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.
Are you sure that the data field contains spaces and not carriage returns and/or linefeeds? That would explain the apparent split into two lines (unless you are using WIDTH and WRAP in your stylesheet ).
You can use STRREP to replace any possible combination of chars in a string, even of uneven length.
Unfortunately I do not know if a sample file contains a field with CRLF chars, but you can show the result easily using the CAR file -
DEFINE FILE CAR
MODEL_CRLF/A50 = STRREP(50, MODEL, 1, ' ', 2, HEXBYT(13, 'A1')|HEXBYT(10, 'A1'), 50, 'A50');
MODEL_NOCRLF/A50 = STRREP(50, MODEL_CRLF, 2, HEXBYT(13, 'A1')|HEXBYT(10, 'A1'), 1, ' ', 50, 'A50');
END
TABLE FILE CAR
PRINT MODEL_CRLF
MODEL_NOCRLF
BY CAR
ON TABLE PCHOLD FORMAT EXL2K
END
A bit ugly but it shows you what I mean, and you can see that it's just a case of reversing the STRREP components to get what you want.
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
Sorry for the delay in picking this back up, anyway have had a chance to revisit today.
quote:
Originally posted by N.Selph: The new version 7.6 is supposed to have a new SET command, that preserves the spaces in HTML and Excel. But I haven't tried it yet. SET SHOWBLANKS=ON
Thanks, guess I will just have to push for that upgrade!!
quote:
Originally posted by Tony A: Mark,
Are you sure that the data field contains spaces and not carriage returns and/or linefeeds? That would explain the apparent split into two lines (unless you are using WIDTH and WRAP in your stylesheet ).
You can use STRREP to replace any possible combination of chars in a string, even of uneven length.
Unfortunately I do not know if a sample file contains a field with CRLF chars, but you can show the result easily using the CAR file -
DEFINE FILE CAR
MODEL_CRLF/A50 = STRREP(50, MODEL, 1, ' ', 2, HEXBYT(13, 'A1')|HEXBYT(10, 'A1'), 50, 'A50');
MODEL_NOCRLF/A50 = STRREP(50, MODEL_CRLF, 2, HEXBYT(13, 'A1')|HEXBYT(10, 'A1'), 1, ' ', 50, 'A50');
END
TABLE FILE CAR
PRINT MODEL_CRLF
MODEL_NOCRLF
BY CAR
ON TABLE PCHOLD FORMAT EXL2K
END
A bit ugly but it shows you what I mean, and you can see that it's just a case of reversing the STRREP components to get what you want.
T
Hi Tony,
There are definitely no other characters in the field. However I do not know what I had done before, because on re-testing the method in my original post it does work ok! The only slight issue is that the field is in a fixed-pitch font - something I have found out happens when using PRE
My only problem now is the inclusion of the PRE tags means that my field length has to be increased by 11 in the COMPUTE statement. So I have now got rid of missing blanks in the middle of my string, but have gained extra spaces at the end that shouldn't be there!!
WebFocus 765. iSeries v5r4
Posts: 175 | Location: England | Registered: April 11, 2006