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     [CLOSED] Read data from CSV file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Read data from CSV file
 Login/Join
 
Silver Member
posted
I can’t get this to working guys…Any help would be appreciated.

I’m working in MRE and I wanted to generate a report out of simple test.csv file. Copied this test.csv file into “other’ folder.
---TEST.CSV --
column_A,column_B,column_C,column_D
A1,B1,C1,D1
A2,B2,C2,D2
A3,B3,C3,D3

My Fex looks like this……..
-*
  
FILE=TEST, SUFFIX=COMT, DATASET='app/test.csv'
SEGNAME=ROOT_SEG, SEGTYPE=S1, $
FIELD=EMP_NAME, ALIAS=EMP_NAME, USAGE=A50, ACTUAL=A50, $
FIELD=EMP_NO, ALIAS=EMP_NO, USAGE=A50, ACTUAL=A50, $
FIELD=EMP_NAME1, ALIAS=EMP_NAME1, USAGE=A50, ACTUAL=A50, $
FIELD=EMP_NAME2, ALIAS=EMP_NAME2, USAGE=A50, ACTUAL=A50, $

TABLE FILE TEST
PRINT *
END

This message has been edited. Last edited by: Kerry,
 
Posts: 36 | Location: Boston MA | Registered: October 12, 2006Report This Post
Expert
posted Hide Post
What is the error ?

I am not sure what happens when your data file is in MRE.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Expert
posted Hide Post
You'll have to read the documentation about the "Other" folder.

FILE=TEST, SUFFIX=COMT, DATASET='app/test.csv'
does not point to MRE.


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
Platinum Member
posted Hide Post
quote:
to MRE.

In DATASET give the full path of the csc file .
and check the master file is located at correct location .

Thanks
Gobinath Velusamy


WebFOCUS 7610
Windows
 
Posts: 121 | Registered: September 25, 2007Report This Post
Silver Member
posted Hide Post
Francis - Can you please point to Documentation link about "Other" Folder.

I tried placing this test.csv file in Standard reports folder too...But doesn't seem to work.

Waz-
Error: Can not find the test.csv file

Any suggestions would helpful.
 
Posts: 36 | Location: Boston MA | Registered: October 12, 2006Report This Post
Platinum Member
posted Hide Post
Hi,

Try FILEDEF to the path to the file of your CSV.

EG. I have CSV file called ABC.csv with PIN (A9).

ABC.mas:
FILENAME=ABC, SUFFIX=COM , $
FIELDNAME=PIN, ALIAS=ID, FORMAT=A9, INDEX=I,
DESC='Personnel ID Number', TITLE='Employee ID', $

runABC.fex:
SET PCOMMA = ON
FILEDEF ABC DISK C:\ibi\apps\Work\ABC.csv

-* File runABC.fex
TABLE FILE ABC
PRINT
PIN
END

See if that works.


DEV: WF 7.6.10
TEST: WF 7.6.10
PROD: WF 7.6.10
MRE: WF 7.6.4
OS/Platform: Windows
Dev Studio: WF 7.7
Output: HTML, EXCEL, PDF, GRAPH, LOTUS, CSV
 
Posts: 117 | Location: Toronto, Ontario, Canada | Registered: February 29, 2008Report This Post
Platinum Member
posted Hide Post
WF Novice,
I think you may be having a problem because your synonym is not finding the dataset.
If you have DevStudio, here are the steps to create the synonym - MRE is on an AIX box and I created the synonym in our test environment.
First you will have to make sure there is an adapter available for the .csv file.

1. FTP the .csv file to the baseapp folder - it will be dsiplayed under other.
2. Right mouse click on Master File folder. Select New Synonym
3. Click on Configure Adapters
4. Click on Add Adapter Configuration
5. Click on Sequential Indexed
6. Click on Delimited Flat File
7. Click on the Configure button to your right
8.Click on Configure button at the bottom of the screen
9. When created, dialog box will appear. Click on the Close button. You will be returned to the DevStudio main page.
10. Repeat the first steps, right-mouse click on Master, New, Synonym. Delimited Flat File will display as an option. Select that option & click OK
11. Double-click on the input boxes to enter information. Make sure the directory path begins and ends with a ‘/’. Click on Select Files.
12. Click in check box next to file you desire, add delimiter value ‘,’ - .csv is comma-delimited file. Chose application folder for the synonym creation. Click on Create Synonym button at the bottom of the dialog box.
13. Click on the Close button at the bottom of the dialog box.
14. You will see the synonym has been created under the baseapp folder.
15.16. Right-mouse click on the master and edit with the test editor. You will see that inside of the master just created it has the path to where the .csv file resides. Make changes fieldnames as desired. Save and file the changes.

FILENAME=MFDCSV1, SUFFIX=DFIX , DATASET=/dir1/dirapp/ibi/apps_test71/baseapp/mfdcsv1.csv, $
SEGMENT=MFDCSV1, SEGTYPE=S0, $

Hope this helps.


WebFOCUS & ReportCaster 8.1.05, 7.7.03 - AIX/LINUX, FOCUS 7.6.13 MVS, Output PDF, XLS-XLSX, DOCX and HTML
 
Posts: 146 | Location: Atlanta, GA | Registered: May 31, 2007Report This Post
Expert
posted Hide Post
As indicated by others, you should not have the CSV in MRE. If you move it to an App Directory under the WF Server, it should work, assuming the master is available in the path and the DATASET is pointing to the right location.

You can have the file in MRE if your WF deployment is on the same machine as the Web server, but this is not an ideal environment.

My rule of thumb for MRE:

MRE is for Launch programs and some Web files.

Any other files, Masters, Data files, core programs should be on the WF server.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report 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     [CLOSED] Read data from CSV file

Copyright © 1996-2020 Information Builders