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     [SOLVED] Removing leading and trailing zero from a string

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Removing leading and trailing zero from a string
 Login/Join
 
Gold member
posted
I have a string like '00MNDZY0000'
I want to get string value without leading and trailing zero using webfocus language.

Please help.

Thanks in advance!

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


WebFOCUS 7.6.1
Windows, All Outputs
 
Posts: 50 | Location: Scun-thorpe,UK | Registered: November 14, 2012Report This Post
Virtuoso
posted Hide Post
Use the STRIP function to remove the zeroes. This will work for your case only if the zeroes are only leading and/or trailing.


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Expert
posted Hide Post
Where is "S****horpe"?
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Platinum Member
posted Hide Post
Its Scun - thorpe, but the middle letters spell a rather naughty word and some internet filters can't tell the difference between a real place and an attempt to swear at people.


WF 7.6.11
Output: HTML, PDF, Excel
 
Posts: 123 | Location: UK | Registered: October 09, 2003Report This Post
Expert
posted Hide Post
I can't sell scr-ews on the Internet.


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
Gold member
posted Hide Post
I have written S****horpe,UK in the location section of forum my profile.

I don't know why it is showing "S****horpe".
I think it may be forum site problem.


WebFOCUS 7.6.1
Windows, All Outputs
 
Posts: 50 | Location: Scun-thorpe,UK | Registered: November 14, 2012Report This Post
Gold member
posted Hide Post
Thank you Tewy for your help.

I have also found another solution.

  
-SET &AF = '00MNDZY0000';
-SET &NEWAF  = GETTOK(&AF,&AF.LENGTH,1,'0',&AF.LENGTH-1,'A&AF.LENGTH');
-SET &NEWAF1=TRUNCATE(&NEWAF);
-TYPE &NEWAF1;



WebFOCUS 7.6.1
Windows, All Outputs
 
Posts: 50 | Location: Scun-thorpe,UK | Registered: November 14, 2012Report This Post
Expert
posted Hide Post
You could also have used TRIM -

-SET &NEWAF = TRIM(B, &AF.QUOTEDSTRING, &AF.LENGTH, '0', 1, 'A.&AF.LENGTH');
-TYPE &NEWAF1


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, 2004Report This Post
Gold member
posted Hide Post
Thank you Waz.

It is also working for me.


WebFOCUS 7.6.1
Windows, All Outputs
 
Posts: 50 | Location: Scun-thorpe,UK | Registered: November 14, 2012Report 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     [SOLVED] Removing leading and trailing zero from a string

Copyright © 1996-2020 Information Builders