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     Join and not drop records?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Join and not drop records?
 Login/Join
 
Member
posted
I know there is an easy way to do what I want but at the moment it is escaping me. I have two files I need to read in. One is a valid Zip code file, the other is a list of addresses (a one to many relationship). Anyway, I need to read in the list of addresses and if the zip code matches a zip code on the valid zip code list, I need to set a flag to 0. If it does not match I need to set the flag to 1. Can I do a join and force it not to drop records? Should I do a match? Please help.


Thanks in advance for your help!!!!
 
Posts: 13 | Registered: June 01, 2005Report This Post
Platinum Member
posted Hide Post
According to your posting:

"Anyway, I need to read in the list of addresses and if the zip code matches a zip code on the valid zip code list, I need to set a flag to 0. "

Firstly, does the valid zip code file contain all of the valid zip codes? From what you've posted, it appears that you may have a zip code in the address list that may not appear in the valid zip code list. Is this correct? If so, then why does the address list contain these invalid zips? It must have something to do with the greater picture.

Basically, a join from the address file to the valid zip code list should work for you. If the zip code is not found in the valid zip code table, any data from that file will be null after the join. Don't do the join the other way.

Of course, this is a best guess based on the information you've provided.

Ken
 
Posts: 177 | Location: Calgary, Alberta, Canada | Registered: April 25, 2005Report This Post
Guru
posted Hide Post
You can also add:

SET ALL = ON

Good Luck
Carol
 
Posts: 428 | Location: Springfield, MA | Registered: May 07, 2003Report This Post
Member
posted Hide Post
I have tried/combined both the above ideas however my output is still not right. The join Ken suggested along with using SET ALL = ON gives me all the records, however the Zip Flag is 0 only for the first occurance of that Zip and 1 for all others which is incorrect. Below is a short example of what I have as input, the output I am getting, and the desired output.

Input:

Valid Zip code list
------------------
99901
99902
99903
99914

Address List zip codes
-----------------
99901
99901
99901
99901
99902
99902
99905
99905
99905
99914
99914

Current output:

Address Zip Zip Flag
------------------------
99901 0
99901 1
99901 1
99901 1
99902 0
99902 1
99905 1
99905 1
99905 1
99914 0
99914 1

Desired output:

Address Zip Zip Flag
------------------------
99901 0
99901 0
99901 0
99901 0
99902 0
99902 0
99905 1
99905 1
99905 1
99914 0
99914 0
 
Posts: 13 | Registered: June 01, 2005Report This Post
Virtuoso
posted Hide Post
From your symptoms, I gather these are flat HOLD files (SUFFIX=FIX), both sorted on zip code.

Table processing with a join from Address file to Zip file reads forward in both files after processing a matched pair. That's why the subsequent Address records for a given zip are not matched.

To associate each Address with the corresponding Zip-file reference record, you need a one-to-many join, in the opposite direction:

JOIN zip IN Zips TO ALL zip IN Addresses
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Member
posted Hide Post
I tried doing the join the other way. However I only get records that match in the join. Therefore any aip code on the address file that does not have a match on the valid zip code list is dropped (which I cannot have). If I use SET ALL = ON, I get a bunch of Null records for the Zips on the valid zip code list that I did not use.

I need the input to match the output with exception of the new valid zip flag being set to 0 or 1 (correctly!).
 
Posts: 13 | Registered: June 01, 2005Report This Post
Virtuoso
posted Hide Post
Hold the zip reference file as a focus file, with the zip key indexed,

ON TABLE HOLD AS zipfile FORMAT FOCUS INDEX zipkey

and join from the address file to it (without ALL).
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Member
posted Hide Post
It worked! I finally got it. Thanks to all for all your help.

Focus can be frustrating. However I know it is powerful and just need more experience with it. It will come but in the meantime, this a great resource!

Thanks again!
 
Posts: 13 | Registered: June 01, 2005Report 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     Join and not drop records?

Copyright © 1996-2020 Information Builders