Focal Point
Ignoring header row on MFD source file

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4091024891

November 27, 2006, 11:47 AM
gregson06
Ignoring header row on MFD source file
Is there a way to ignore the first row of data on an MFD? I am trying to avoid having to delete the first row in order to use data in my import file and wonder if there is some sort of key field type to identify row 1 as being a header and not the starting row for data.

Thanks!
November 27, 2006, 01:32 PM
Joao
Are you trying to ignore data from an external data source by using a where\if statement with webfocus table\modify\match\maintain or dialogue manager command?
November 27, 2006, 02:00 PM
Francis Mariani
If the data has an row identifier field than you could filter on that. If not, write a WHERE statement to exclude the first row - choose a field that will have a particular value in the first row and never in any others.


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
November 27, 2006, 02:09 PM
gregson06
Well, I suppose the first value of the first row is always the same, I'll try the WHERE statement. Can I put it in the MFD?

Thanks!
November 27, 2006, 02:26 PM
Francis Mariani
I don't think you can add it to the MFD.

Take a look at "Assigning Screening Conditions to a File" in the "Creating Reports With WebFOCUS Language". This might help.


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
November 27, 2006, 03:01 PM
Joao
Depending on the importance of your concern for this issue, I assume you could also copy or recreate the data source and permanently elimiate the first row during the process to prevent future need of the where statement.
November 28, 2006, 05:02 AM
Piipster
You don't tell us what your import file looks like but if it is comma delimited this might help...

A Master File containing the attribute SUFFIX=COMT can be used to access
comma-delimited sequential data sources in which all of the following conditions are met:
❏ The first record of the data source contains column titles. This record is ignored when
the data source is accessed in a request.
❏ Character values are enclosed in double quotation marks. A double quotation mark
within a field is identified by two consecutive double quotation marks.
❏ Each record is completely contained on one line and terminated with the crlf character
combination.


Similarly SUFFIX=TABT for tab-delimited data.


Check out one of the Describing Data manuals.


ttfn, kp


Access to most releases from R52x, on multiple platforms.
November 28, 2006, 10:09 AM
gregson06
Piipster,

I do apologize, the import file is rather simple, it looks like so:

ROW1,ROW2,ROW3,ROW4
ASCII,PONTIAC,GTO,2006
ASCII,MAZDA,MIATA,2004
ASCII,CHEVROLET,SILVERADO,2006
...

It's not that complicated an import file except that the first row isn't really needed, but I believe I can just use a where statement for that first item called "ROW1" to remove it in the first fetch.

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