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     testing missing value from left outter join result

Read-Only Read-Only Topic
Go
Search
Notify
Tools
testing missing value from left outter join result
 Login/Join
 
Guru
posted
I like to give a default value "BVI001" to my field SETID whenever there is no matching record found in the secondary file of a left outter join. I have trouble with it. Can someone tell me what is wrong with my codes:

SET ALL=PASS
JOIN
LEFT_OUTER HOLD.SEG01.A7KMCD AND HOLD.SEG01.A7KNCD IN HOLD TO IF0800P.IF0800P.IF8ALCD AND IF0800P.IF0800P.IF8AFCD IN IF0800P AS J2
END
DEFINE FILE HOLD
SETID/A10=IF IF8EXCE EQ MISSING THEN 'BVI001' ELSE IF0800P.IF0800P.IF8EXCE;
END
TABLE FILE HOLD
PRINT
'HOLD.SEG01.A7KKCD'
'HOLD.SEG01.MAP'
'HOLD.SEG01.LEVEL1'
'HOLD.SEG01.A7EPNB'
'HOLD.SEG01.A7KMCD'
'HOLD.SEG01.A7KNCD'
'HOLD.SEG01.A7DIVA01'
'IF0800P.IF0800P.IF8EXCE'
'IF0800P.IF0800P.SETID'
HEADING
""
FOOTING
""
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
 
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008Report This Post
Gold member
posted Hide Post
quote:
IF IF8EXCE EQ MISSING

The correct syntax is: IF IF8EXCE IS MISSING

Use it with missing on

SETID/A10 MISSING ON = IF IF8EXCE IS MISSING THEN 'BVI001' ELSE IF0800P.IF0800P.IF8EXCE;


Try that

This message has been edited. Last edited by: LEX-IA,


PROD: WebFOCUS 7.1.0 on Linux/Tomcat 5.5.12 (standalone)/Informix on AIX
TEST: WebFOCUS 7.1.3 on Linux/Tomcat 5.5.16 (standalone)/Informix on AIX
 
Posts: 53 | Location: Montreal,Quebec,Canada | Registered: February 13, 2006Report This Post
Master
posted Hide Post
If IF8EXCE is numeric try

SETID/A10=IF IF8EXCE EQ MISSING OR IF8EXCE EQ 0 THEN 'BVI001' ELSE IF0800P.IF0800P.IF8EXCE;

If alpha try

SETID/A10=IF IF8EXCE EQ MISSING OR IF8EXCE EQ ' ' THEN 'BVI001' ELSE IF0800P.IF0800P.IF8EXCE;

See similar posts for explanation.



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
Guru
posted Hide Post
quote:
Originally posted by hammo1j:
If IF8EXCE is numeric try

SETID/A10=IF IF8EXCE EQ MISSING OR IF8EXCE EQ 0 THEN 'BVI001' ELSE IF0800P.IF0800P.IF8EXCE;

If alpha try

SETID/A10=IF IF8EXCE EQ MISSING OR IF8EXCE EQ ' ' THEN 'BVI001' ELSE IF0800P.IF0800P.IF8EXCE;

See similar posts for explanation.


Thank you both Lex-IA and hammo1j!
I tried both sugguestions, and hammo1j's works in my case. Lex-IA's seemed quite logical.


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
 
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008Report This Post
Virtuoso
posted Hide Post
We just addressed this same issue in a post a day or two ago. One point that was made (and not to be critical, just to make sure that correct information is posted) - the MISSING ON parameter on the left side of the expression has nothing to do with missing values in fields being evaluated (on the right side). What it does do is it allows the evaluated value of the expression to be missing/null based on the criteria.

For example, say the value of a FLD1 is null. So

DEFFLD/A10 MISSING ON = IF FLD1 EQ MISSING THEN MISSING ELSE 'FLDVALUE01';

would be evaluated to NULL but

DEFFLD/A10 = IF FLD1 EQ MISSING THEN MISSING ELSE 'FLDVALUE01';

would be evaluated to ' ' even though you've specified that the value should be missing.

Hope the explanation is clear enough.


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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     testing missing value from left outter join result

Copyright © 1996-2020 Information Builders