BookmarkSubscribeRSS Feed
AmitSri
Pyrite | Level 9

I wanted to load the ; elimited data into CAS. The data looks like:

 

 

servicedvehiclesid;daykey;throughputsid;outletcode;outletname;baumusterkey
1;20140;679;0081;abc Company;123
1;20140;978679;00001;mMo Company;208
7;40331;00509;002;gtr Company;5846

 

I am trying to load this data as:

proc casutil;
   load casdata="export.csv"   incaslib="DBDATA"                     
        importoptions=(filetype="csv" delimiter = ";" getnames="true")
        casout="export_110GB" outcaslib="DBDATA" promote;
run;

 

I am getting the error as:

ERROR: At least one row of input data is invalid: too many columns.
ERROR: The action stopped due to errors.

 

If you have Any suggestions on the coding part or error, Please revert. Thanks!!

2 REPLIES 2
Kurt_Bremser
Super User

Import the file first to a SAS dataset with a data step, and then load it to CAS with load data.

Then you can inspect the result of the import and easier detect wrong lines in the input file.

 

The data step does not produce an ERROR for input lines that have more columns than are read with the input statement.

AmitSri
Pyrite | Level 9
Okay.. I will do it this way. Thanks A lot!!

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 2772 views
  • 2 likes
  • 2 in conversation