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     Problem using excel spreadsheet (CSV) as a data source

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Problem using excel spreadsheet (CSV) as a data source
 Login/Join
 
Member
posted
Hi everyone,
I am having a problem using a CSV text file as a source of data in Webfocus. I have searched previous discussions and I have used these as a guide, but I cannot figure out where I am going wrong.

I have cut the file down to two fields and two records. The MFD now looks like this :
FILE=STANDARDS, SUFFIX=COMT
SEGNAME=ROOT_SEG, SEGTYPE=S1, $
FIELD=YEAR, ALIAS=Year, USAGE=A20, ACTUAL=A4, $
FIELD=MONTH, ALIAS=MONTH, USAGE=A4, ACTUAL=A4, $

The CSV file (STANDARDS.CSV) was created from an Excel spreadsheet, saved as CSV (MS DOS) format. The text file looks like this when I edit it :
2006,Jan
2006,Feb
When I try to run the following code :
-RUN
CHECK FILE STANDARDS
FILEDEF STANDARDS DISK C:\2005\OEE\SPREADSHEET\STANDARDS.CSV
-RUN

TABLE FILE STANDARDS
PRINT *
END

I get the error message FOC416 MORE VALUES SUPPLIED THAN FIELDS IN THE MASTER FILE DESCRIPTION

I have checked the FILEDEF using the query menu, its pointing to the right file. I have no idea what I'm doing wrong. Any suggestions will be greatly appreciated.
Regards,
Trevor Wilson
CPP Trostre Works, Wales
 
Posts: 12 | Location: Llanelli, South Wales, UK | Registered: November 17, 2005Report This Post
<Special-K>
posted
Try one of these, dunno if it will work

1) If the file is CSV shouldnt the suffix be FIX?
2) ALIAS for YEAR is lowercase, dunno if that matters?
3) The SEGNAME statement should not have a $ at the end of line
 
Report This Post
<JG>
posted
YOu need to add SET PCOMMA = ON to your code
 
Report This Post
Member
posted Hide Post
Hi Special - K, thanks for the advice.
I tried all three changes at the same time, the MFD now reads :

FILE=STANDARDS, SUFFIX=FIX
SEGNAME=ROOT_SEG, SEGTYPE=S1,
FIELD=YEAR, ALIAS=YEAR, USAGE=A4, ACTUAL=A4, $
FIELD=MONTH, ALIAS=MONTH, USAGE=A4, ACTUAL=A4, $

I am now able to get a report, so I'm halfway there. Trouble is the report includes commas in the 'MONTH' field. I could work around this with an EDIT (MASK) but I don't know yet the effect the commas will have once I start introducing decimal fields.
PAGE 1


YEAR MONTH

2006 ,Jan
2006 ,Feb

In addition, there is another text field I need to include which will have entries of different lengths, so I need the comma to specify the end of the record.

Thanks for your help so far.
Regards
Trevor
 
Posts: 12 | Location: Llanelli, South Wales, UK | Registered: November 17, 2005Report This Post
Member
posted Hide Post
Thanks JG, that did the job perfectly.

Thanks again to you all for your help, and for putting up with a Webfocus 'newbie' like me.

Kindest regards,
Trevor Wilson
 
Posts: 12 | Location: Llanelli, South Wales, UK | Registered: November 17, 2005Report 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     Problem using excel spreadsheet (CSV) as a data source

Copyright © 1996-2020 Information Builders