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.

New TIBCO Community Coming Soon
In early summer, TIBCO plans to launch a new community—with a new user experience, enhanced search, and expanded capabilities for member engagement with answers and discussions! In advance of that, the current myibi community will be retired on April 30. We will continue to provide updates here on both the retirement of myibi and the new community launch.

What You Need to Know about Our New Community
We value the wealth of knowledge and engagement shared by community members and hope the new community will continue cultivating networking, knowledge sharing, and discussion.

During the transition period, from April 20th until the new community is launched this summer, myibi users should access the TIBCO WebFOCUS page to engage.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Using IsInFile
 Login/Join
 
Member
posted
I want to be able to use the 'IsInFile()' function in DQS to determine if a string is found within a file.

Specifically, I have a set of database columns any of which may contain a country name anywhere in the data (for example, it may have a postal code or not in the column. I want to compare that against a list of known country names.

When I attempt to use:
isInFile([Address1], ISO_country_list.txt)
in an AlterFormat, an error appears:
Undefined data source for 'ISO_country_list.txt' at 32-56 in 'isInFile([OriginatorAddress1], ISO_country_list_plus.txt)'.

Function 'isInFile' is not applicable for arguments {STRING, } at 1-8 in 'isInFile([OriginatorAddress1], ISO_country_list.txt)'.

Please advise. I would prefer to not have to parse the string into words, then compare against the country code list (which I can put in a table).

Thank you-
-Kurt

This message has been edited. Last edited by: FP Mod Chuck,
 
Posts: 3 | Registered: September 25, 2016Report This Post
Virtuoso
posted Hide Post
Hi Kurt

Since no one has responded I suggest you open a case with techsupport..


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2128 | Location: Customer Support | Registered: April 12, 2005Report This Post
Member
posted Hide Post
Hi Kurt,
you have to create a lookup file in DQS in order to use the IsInFile function. Following is what the help docs says.

boolean isInFile(string srcStr, string fileName)

Searches for the string srcStr in a file defined by the parameter fileName. The parameter fileName must be a constant expression and must point to a dictionary with simple values. The function returns TRUE if srcStr is found in the dictionary, and FALSE otherwise. Before the search starts, the value of srcStr is trimmed (all whitespaces from the beginning and end of the string are removed) which may possibly lead to NULL value of the search value.

See DQS Tutorial Project Section 04 (Using Lookup) -> 04.05 Lookup functions.plan to see an example

Hope this helps.

Jikku


WebFOCUS 8
Windows, All Outputs
 
Posts: 7 | Registered: August 05, 2015Report This Post
Member
posted Hide Post
Thanks Chuck and Jikku, I have a workaround for the moment, if I encounter challenges, this will help.

Best-
-Kurt


WebFOCUS 8
Windows, All Outputs
 
Posts: 3 | Registered: September 25, 2016Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders