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     convert zero to blank

Read-Only Read-Only Topic
Go
Search
Notify
Tools
convert zero to blank
 Login/Join
 
<M_RIOS75>
posted
I am having issues with this...

DEFINE FILE DBLOG
REMEST1/D12C = IF (P_FLAG EQ 'Premium') THEN REMEST0 ELSE 0;
END

This works fine.. but instead of a zero, I'd like a blank ' '. But it keeps complaining about the format...

Any help??

Marvin
 
Report This Post
Guru
posted Hide Post
Marvin,

If want null/missing try:

DEFINE FILE DBLOG
REMEST1/D12C MISSING ON= IF (P_FLAG EQ 'Premium') THEN REMEST0 ELSE MISSING;
END


Then set NA to ''

If you truly want a blank then convert the numeric column into an alpha.

Fernando


Prod WF 8.1.04, QA WF 8.2.03, Dev WF 8.2.03
 
Posts: 278 | Registered: October 10, 2006Report This Post
Virtuoso
posted Hide Post
Use the format option to surpress zeroes.
D12S should do it as D inserts commas if my mind is working.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Virtuoso
posted Hide Post
You've already two correct answers, but to explain further, you can't just set the value to a blank because a blank is an alpha character and your expression's format is defined as numeric (D12C). It will depend on what you need it for, but you'll probably experience fewer problems by just changing the display format as Leah suggests, rather than setting the value to null. (Null values could affect averages and proper handling if used in selection criteria, among other things.)


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Platinum Member
posted Hide Post
D12C means Comma delimited.
D12CS would mean same as D12C + Zero Suppress
Cobol talking persons would say Blank When Zero.
The Missing Approach is interesting too but it has to do with
1) The Missing Attribute (Typical DB2)
2) A question of cardinality linkes to the Way a join is Established (Unique => No Missing, Join to ALL ans SET ALL = ON
3) The 'portability' of the Missing character of a Field thru Defines (Missing ON, Missing on All, etc ...)
All these aspects being strongly debated, ... in the 80'ies ...
I probably don't explain well, but I know what you mean. Perhaps I'm not (yet) such an Old Fool.
Thank you so much for reassuring me (a little)


Focus Mainframe 7.6.11
Dev Studio 7.6.11 and !!!
PC Focus, Focus for OS/2, FFW Six, MSO
 
Posts: 134 | Registered: November 06, 2007Report This Post
Virtuoso
posted Hide Post
the DISPLAY of a field as D12CS is something else than the value in the database.

Displaying has only impact on the report, you decide to show the value or the calculation.
You can decide either that value as "0" or as "-" or as "0.0" or "NONE" or wathever you like.
It does not influence the further calculation.

If you put the result of that calculation in a database again, there will be a value of zero "0" be in the database. If you choose to display it as "NONE" there still is "0" in the database and not NULL.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
<M_RIOS75>
posted
Thanks, I appreciate all the help. I really just needed to suppress the zeros to blanks and the D12CS is working perfect.

It was a field that would always be zero (part of more commplex report) and it was requested to have a blank in its place.
 
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     convert zero to blank

Copyright © 1996-2020 Information Builders