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     How to remove trailing blank spaces?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
How to remove trailing blank spaces?
 Login/Join
 
<new2focus>
posted
-DEFAULT &cntry='';
TABLE FILE CAR
PRINT COUNTRY CAR
ON TABLE SAVE AS CARHLD
END
-RUN
-SET &NBR = &LINES;
-REPEAT L_LOOP1 &NBR TIMES
-READ CARHLD NOCLOSE &CTR.10. &CAR.16.

-SET &cntry=&CTR
-*How can I remove the trailing blank spaces from the &cntry variable here? I tried TRIM with no success!
-L_LOOP1
END
 
Report This Post
Expert
posted Hide Post
This depends on what you want to do with &cntry.
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
<new2focus>
posted
&cntry is being displayed on the sub head portion of an included report. The problem is that the subhead style is defined with underline. So the trailing black spaces generating a trailing line after the value.
 
Report This Post
Expert
posted Hide Post
If &cntry is on it's own on the SUBHEAD line, you could try:

-SET &cntry = 'England ';
-SET &SUBHEAD1 = '"' || &cntry || '"';

TABLE FILE CAR
PRINT CAR
BY MODEL
ON MODEL SUBHEAD
&SUBHEAD1
" "
ON TABLE SET STYLESHEET *
TYPE=REPORT, GRID=OFF,
FONT='VERDANA', SIZE=8, $
TYPE=SUBHEAD, LINE=1, STYLE=UNDERLINE, $
ENDSTYLE
END

(In this example, there are many blanks after 'England').
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
<JG>
posted
Depends on the version of WebFocus but the truncate function is what you need

-SET &VAR2= TRUNCATE(&VAR1);
 
Report This Post
Guru
posted Hide Post
Give this a try:

-DEFAULT &CNTRY1='';
TABLE FILE CAR
PRINT COUNTRY CAR
ON TABLE SAVE AS CARHLD
END
-RUN
-SET &NBR = &LINES;
-REPEAT L_LOOP1 &NBR TIMES
-READ CARHLD NOCLOSE &CTR.10. &CAR.16.

-SET &CNTRY1= &CTR;
-SET &LEN = ARGLEN(&CNTRY1.LENGTH,&CNTRY1,'I2');
-SET &CNTRY2=TRIM('B',&CNTRY1,&CNTRY1.LENGTH, ' ', 1, 'A&LEN.EVAL');
-TYPE > &CNTRY1 < &LEN > &CNTRY2 <
-L_LOOP1
END

This message has been edited. Last edited by: <Mabel>,
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Report This Post
<new2focus>
posted
TRUNCATE solved the problem. Thanks for all your help. Have a gr8 weekend!
 
Report 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     How to remove trailing blank spaces?

Copyright © 1996-2020 Information Builders