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] DEFINE field not computing

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] DEFINE field not computing
 Login/Join
 
Gold member
posted
I am doing a define as..

field1 + field2 + field3.

All fields are D20.2

if it is 1+1+1 it works, however sometimes tehre are nulls.. so 1+null+1. Technically a null answer is correct, however i need that to be 2 Smiler . HOw can i configure the field to ignore nulls?

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


AS Version: 8201
Gen: 10202016
Windows, All Outputs
 
Posts: 49 | Location: St. Louis | Registered: December 13, 2016Report This Post
Expert
posted Hide Post
MISSING values give me a pain in the DEFINE FILE.

You may have to check each field for MISSING and cater for it.


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
Platinum Member
posted Hide Post
Can you default a null with 0 in the previous hold?


Cheers,
H.

WebFOCUS 8.1.05M
Oracle 11g - DB2
RedHat
 
Posts: 115 | Location: Brighton UK | Registered: February 19, 2005Report This Post
Virtuoso
posted Hide Post
How about using an IF THEN ELSE to substitute? Something like this:

FIELD_1A/I9=IF FIELD_1 EQ MISSING THEN 0 ELSE FIELD_1;
FIELD_2A/I9=IF FIELD_2 EQ MISSING THEN 0 ELSE FIELD_2;
FIELD_3A/I9=IF FIELD_3 EQ MISSING THEN 0 ELSE FIELD_3;

NEW_FIELD/I9=FIELD_1A + FIELD_2A + FIELD_3A;
  


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Platinum Member
posted Hide Post
Try the DEFINE with MISSING OFF.

FIELDT1/D20.2 MISSING OFF = FIELD1 + FIELD2 + FIELD3 ;

Working example CAR file:
DEFINE FILE CAR
  FIELD1/D20.2              = 1 ;
  FIELD2/D20.2 MISSING ON   = MISSING ;
  FIELD3/D20.2              = 1 ;
  FIELDT1/D20.2 MISSING OFF = FIELD1 + FIELD2 + FIELD3 ;
  FIELDT2/D20.2 MISSING ON  = FIELD1 + FIELD2 + FIELD3 ;
END

TABLE FILE CAR
  PRINT 
    COUNTRY
    FIELDT1 AS 'with MISSING OFF' ;
    FIELDT2 AS 'with MISSING ON' ;
  IF RECORDLIMIT EQ 1
END


Output:
COUNTRY  with MISSING OFFF  with MISSING ON
ENGLAND  2.0                .


Regards. Mikel.


WebFOCUS 8.1.05, 8.2.01
 
Posts: 173 | Location: Madrid, Spain | Registered: May 09, 2003Report This Post
Gold member
posted Hide Post
{SOLVED} thanks!


AS Version: 8201
Gen: 10202016
Windows, All Outputs
 
Posts: 49 | Location: St. Louis | Registered: December 13, 2016Report This Post
Expert
posted Hide Post
Please edit your first post in this thread and add [SOLVED] to the title.


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
  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] DEFINE field not computing

Copyright © 1996-2020 Information Builders