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.
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- -KurtThis message has been edited. Last edited by: FP Mod Chuck,
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