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     SOLVED - External Text File as Data Source?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
SOLVED - External Text File as Data Source?
 Login/Join
 
Platinum Member
posted
I have a text file that is a single primary key field.

I want to somehow import this file into my WebFOCUS query to then join to an existing master file or hold file.

I'm hoping to either copy/paste the records in the text file as a single string that becomes the where clause, or use it as some sort of where/join (where ID is in the text file).

Is something like this possible with WebFOCUS, and if so, what keywords should I be searching the IBI documentation for?

Thank you.

This message has been edited. Last edited by: ColdWhiteMilk,


Production - 7.6.4
Sandbox - 7.6.4
 
Posts: 241 | Location: Bethesda, MD | Registered: August 14, 2007Report This Post
Expert
posted Hide Post
The file should be located somewhere WebFOCUS can access. Then you FILEDEF it. Then you use it in a WHERE IN FILE statement. In this example, the file is located in one of the application folders:

FILEDEF PRIMARY1 DISK baseapp/primary1.txt
-RUN

TABLE FILE ____
PRINT *
WHERE PRIMARY_KEY_COL IN FILE PRIMARY1
END
-RUN


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Master
posted Hide Post
create a master file, use dataset attribute to refer to the text file and then use it in JOIN.
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Report This Post
Expert
posted Hide Post
If the number of records is less than 1000 then it is more efficient against a SQL source to use the syntax suggested by Francis as it will be used within an IN statement in your SQL (depending upon how you code it maybe).

I would definitely NOT use it in a join (parent OR child) whilst it was a flat file.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Platinum Member
posted Hide Post
The file will end up with less than 1000 rows. Most likely less than 500 rows.


Production - 7.6.4
Sandbox - 7.6.4
 
Posts: 241 | Location: Bethesda, MD | Registered: August 14, 2007Report This Post
Guru
posted Hide Post
Make it a CSV or Excel.. Upload it using "Upload File" option in synonym/Master Files folder. Then use it in your code. 500 to 1000 rows, this would work perfectly.

Thanks, Ram.


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
 
Posts: 394 | Location: Chennai | Registered: December 02, 2009Report This Post
Platinum Member
posted Hide Post
The solution from Francis appears to be working.

Thank you for your help!


Production - 7.6.4
Sandbox - 7.6.4
 
Posts: 241 | Location: Bethesda, MD | Registered: August 14, 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     SOLVED - External Text File as Data Source?

Copyright © 1996-2020 Information Builders