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] CSV master file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] CSV master file
 Login/Join
 
Platinum Member
posted
I've got a pre-existing CSV file on the drive and want to access it in WF. I tried to create synonym via every tool in the WF playbook, typically by right-clicking the Delimited Flat File adapter, add synonym and it just doesn't work. I put in the directory location, filename, extension. Nothing works. (imagine that!)
So I had to create it manually in DM. Good, so I got it working on my laptop, but when I did the same thing on the WF server I get an empty record set (no error).

The master file I created has SUFFIX=DFIX, but I don't think that's the best way. I think COMT is the way to do this, but I can't find the exact syntax description, other than:
FILENAME=filename, SUFFIX=COMT,
SEGMENT=segment, SEGTYPE=segtype,

And of course, none of the WF interface tools are letting me do it either, so the questions are:
1. Is this the right syntax? If so, are there any "$" at end of lines?
2. What goes in "filename"? the full path?

I've tried the following with an error:
FILE="C:\Documents and Settings\myname\My Documents\directory1\myfile.csv" ,SUFFIX=COMT ,$
SEGNAME=FLT_IMPORT ,SEGTYPE=S0,$

It's very frustrating b/c the tools don't work, and there's little documentation on how to do this manually (again, it figures)
I'm on WF 764/Win.

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


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Report This Post
Expert
posted Hide Post
I just recently uploaded a csv file to a Unix box and created a DFIX master and access file and it worked just fine.

Another thing you can do since you have 7.6 is to do an import of your csv file into your WebFOCUS architecture. You do this in Dev Studio. If you are using the virtual directories, you would right click Master File and then select New and then Upload Data File. I have done that a number of times even to Unix and it works just fine. You have to tweak the field formats a little.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Virtuoso
posted Hide Post
Mark

What is your CSV file look like.
If it is real CSV then I would expect commas between the fields.
Did you try COM? or FIX?
COMT means tab delimited.

The filename might be C:\... but that is the C:\ drive on the server and not on your pc.
If you put the text file in the baseapp and the master also I think the location is not needed since that is the default.

Post the first line of your text file and your master, we might help better.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Virtuoso
posted Hide Post
mark,

I thought it was something like:
FILENAME=MYCOMT, SUFFIX=COMT, DATASET="C:\Documents and Settings\myname\My Documents\directory1\myfile.csv" ,$
SEGNAME=FLT_IMPORT ,SEGTYPE=S0,$


Using COMT means that you have a comma-separated file with the column titles in the first row. Is that the case? If there are no column titles, use SUFFIX=COM.

Hope this helps ...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Platinum Member
posted Hide Post
I read somewhere in WF docs that COMT = comma delimited with column headings.


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Report This Post
Platinum Member
posted Hide Post
I'll try an import in 7.6, see if that helps.

Dutch, yes, I'm trying to refer to the server's hard drive. Here's the first line of the CSV
API,MeasureDate,MeasureTime,PumpSettingDepth,JointsToSeatingNipple,JointsToFluid
4223700088,2/20/2009,12:16 PM,2210,75,71


Here's the master:
FILENAME=MYCOMT, SUFFIX=COMT, DATASET="c:\ibi\apps\heputils\flt_imp.csv" ,$
SEGNAME=FLT_IMPORT ,SEGTYPE=S0,$
    FIELDNAME=API, ALIAS=API, USAGE=A10, ACTUAL=A10, $
    FIELDNAME=MEASUREDATE, ALIAS=MeasureDate, USAGE=MDYY, ACTUAL=A9, $
    FIELDNAME=MEASURETIME, ALIAS=MeasureTime, USAGE=A8, ACTUAL=A8B, $
    FIELDNAME=PUMPSETTINGDEPTH, ALIAS=PumpSettingDepth, USAGE=I6, ACTUAL=A6, $
    FIELDNAME=JOINTSTOSEATINGNIPPLE, ALIAS=JointsToSeatingNipple, USAGE=I3, ACTUAL=A3, $
    FIELDNAME=JOINTSTOFLUID, ALIAS=JointsToFluid, USAGE=I3, ACTUAL=A3, $
    DEFINE MDATEA/A8MDYY  WITH API=MEASUREDATE; $
    DEFINE MTIMEA/A8  WITH API=LOCASE(8,MEASURETIME,'A8'); $
    DEFINE MDT/A20  WITH API=EDIT(MDATEA,'99/99/9999') | ' ' | MTIMEA; $


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Report This Post
Expert
posted Hide Post
at the risk of buying you a vowel when you don't need one,
you've got SET PCOMMA = ON
yes?

yes comt means ignore the 1st row, but make sure that the names in that first row don't blow you out of your column width specs in the master..i've had that pain.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Platinum Member
posted Hide Post
ok, got it working. thank you all.

Ginny, I got the CSV master file created by doing the import as you suggested. I changed the type to COMT and put my real CSV file in the dir.


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Report This Post
Expert
posted Hide Post
Excellent! I'm happy it worked for you.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 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     [SOLVED] CSV master file

Copyright © 1996-2020 Information Builders