03-28-2018 01:59 PM
I am trying to create a SAS table from a flat file while excluding headers. Currently I have set the writer to start on line two. However it still pulls my headers from line one.
Is there an easy solution to creating a SAS table from a flat file without reading in headers?
03-28-2018 02:52 PM
One suggestion: bypass the import task and simply submit the desired code. e.g., if it's 3 numeric columns:
data want; infile '/folders/myfolders/testdata.txt' firstobs=2; input col1-col3; run;
Art, CEO, AnalystFinder.com
03-28-2018 03:31 PM
Are you using DI Studio or SAS Base?
If you're using SAS BASE you can try the datarow option in PROC IMPORT or FIRSTOBS in a data step.
03-29-2018 12:11 AM
Do you mean that you want to ignore the variable names in the first row and have SAS just assign variable names?
Do you mean that your file doesn't have variable names in the first row?
Do you mean that SAS is trying the read the variable names in the first row as part of the data?
Or that you want to find the variable names in a later row? Perhaps you are reading from some type of report that has one or more report titles before the lines of data?