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] Replace 0 by '-'

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Solved] Replace 0 by '-'
 Login/Join
 
Gold member
posted
Hi,

I would like to replace 0 by the character '-' in my result.

I tried with this (POUR is I9):

APOUR/A9 = IF POUR EQ 0 THEN '-' ELSE EDIT(POUR);

The problem is that 0 appear like this:

218 becomes 000000218
5214 becomes 000005214
...

Is there a way to convert directlz my 0 in '-'?

This message has been edited. Last edited by: Jérény Deidda,


WebFOCUS 7.6.4 running on Windows
Output formats : PDF, Excel and HTML
My blog
 
Posts: 61 | Location: Luxembourg | Registered: October 31, 2007Report This Post
Gold member
posted Hide Post
Try the CTRAN function

 TABLE FILE EMPLOYEE
PRINT ADDRESS_LN3 AND COMPUTE
ALT_ADDR/A20 = CTRAN(20, ADDRESS_LN3, 48, 45, ALT_ADDR);
BY EMP_ID
WHERE TYPE EQ 'HSM';
END
 


Laure


Prod: WebFOCUS 7.7.03 - MRE, BID, - WindowsXP - Oracle 9i, SQLServer, DevStudio 7.7.3 - Apache Tomcat , Output: HTML, Excel 2013 and PDF
 
Posts: 78 | Location: Florida | Registered: December 07, 2006Report This Post
Guru
posted Hide Post
Use the CTRAN Function.



quote:
APOUR/A9 = CTRAN (9,POUR, 060, 055, APOUR;


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
 
Posts: 398 | Registered: February 04, 2008Report This Post
Gold member
posted Hide Post
Thanks but I become the same result :

25 ---> 000000025


WebFOCUS 7.6.4 running on Windows
Output formats : PDF, Excel and HTML
My blog
 
Posts: 61 | Location: Luxembourg | Registered: October 31, 2007Report This Post
Gold member
posted Hide Post
OK I just understood, I changed my ASCII codes and it runs better ,-)


WebFOCUS 7.6.4 running on Windows
Output formats : PDF, Excel and HTML
My blog
 
Posts: 61 | Location: Luxembourg | Registered: October 31, 2007Report This Post
Expert
posted Hide Post
I would suggest using FTOA.

APOUR/A9 = IF POUR EQ 0 THEN '-' ELSE FTOA(POUR,'F9','A9');


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
Thanks,

the problem is solved with FTOA.

Topic must be closed and marked as solved.


WebFOCUS 7.6.4 running on Windows
Output formats : PDF, Excel and HTML
My blog
 
Posts: 61 | Location: Luxembourg | Registered: October 31, 2007Report This Post
Virtuoso
posted Hide Post
quote:
Topic must be closed and marked as solved.

You are the only one who can do that (apart from the forum admin of course).
Go to your very first post and edit it. That will give you the opportunity to change the desription.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report 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] Replace 0 by '-'

Copyright © 1996-2020 Information Builders