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     Missing values in cross reference file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Missing values in cross reference file
 Login/Join
 
Gold member
posted
I've searched for a possible solution, but cannot find.

I am joining two tables on ID. It's an outer join with ALL=ON. Because of this, all the fields in the cross reference table are also missing. Is there a way to plug a dummy value in for the missing values.

JOIN TABLE1.ID IN TABLE1 TO ALL TABLE2.ID IN TABLE2
END
DEFINE FILE TABLE1
NAME_MOD/A10 MISSING ON = IF TABLE2.NAME IS MISSING THEN '0' ELSE 'TABLE2.NAME';
END
TABLE FILE PRINT
PRINT
TABLE1.ID
NAME_MOD
END

Basically, I want a character value in NAME_MOD for every record regardless.

Thanks all.


WF (App Studio) 8.2.01m / Windows
Mainframe FOCUS 8
 
Posts: 93 | Registered: February 20, 2008Report This Post
Master
posted Hide Post
quote:
all the fields in the cross reference table are also missing


Are you saying that you are not coming up with values from TABLE2 or are they not what you expect them to be?

quote:
NAME_MOD/A10 MISSING ON = IF TABLE2.NAME IS MISSING THEN '0' ELSE 'TABLE2.NAME';


If NAME_MOD is a required field remove the MISSING ON and the quotes around 'TABLE2.NAME'

MATCH might serve you better in this case, try searching on it.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report This Post
Gold member
posted Hide Post
The fields in Table2 are missing only where there is not a match between the two tables on ID.


WF (App Studio) 8.2.01m / Windows
Mainframe FOCUS 8
 
Posts: 93 | Registered: February 20, 2008Report This Post
Master
posted Hide Post
There's a bit of subtlety required here.

If the target field you are joining to does not have MISSING=ON then a non matching value will retrieve blanks. (I personally always use the missing attribute on keys in an RDBMS for this reason).

DEFINE FILE TABLE1
NAME_MOD/A10 MISSING ON = IF TABLE2.NAME IS MISSING OR TABLE2.NAME EQ ' ' THEN '0' ELSE 'TABLE2.NAME';
END


Should do the trick.



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
Virtuoso
posted Hide Post
As Pat says, if you always want a value for the field NAME_MOD, there is no need for the "MISSING ON." That only means that the value of NAME_MOD could sometimes be missing - which is NOT what you asked for.

When you put TABLE2.NAME inside of tick marks, WF thinks you are setting the value of NAME_MOD to a literal (which in this case is 11 characters so it would give you an error anyway.) This should work.

NAME_MOD/A10=IF TABLE2.NAME IS MISSING THEN '0' ELSE TABLE2.NAME;

If TABLE2.NAME is blank you would also need to add OR TABLE2.NAME EQ ''.


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
Guru
posted Hide Post
Bobv,

First of all you should use a left_outer join to make sure that all records from table1 are included even if there is no match on table2.
Hold the results in a hold file. You can then create a 'Define' field that will check for '' or missing.


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
 
Posts: 398 | Registered: February 04, 2008Report 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     Missing values in cross reference file

Copyright © 1996-2020 Information Builders