Help using Base SAS procedures

Facing issues while importing data from TSV file

Reply
Contributor
Posts: 69

Facing issues while importing data from TSV file

Dear All,

Can anyone please help me on the following code.

I am facing difficulty while downloading the data from TSV file, the issue is the code that I have mentioned below is not reading all the characters per column and stops reading the data afterwards including the rest of the columns in the same row ( column / variable is having 350+ characters.)

getting following errors.

ERROR: Limit set by ERRORS= option reached. Further errors of this type will not be printed.

 

ERROR: Import unsuccessful. See SAS Log for details.

 

filename in 'Path\meetings.tsv' encoding='utf8';

proc import datafile=in
     out=tele.base_data
     dbms=dlm
     replace;
     delimiter='09'x;
     datarow=2;
run;

Regards,

Siddhartha

Regular Contributor
Posts: 229

Facing issues while importing data from TSV file

can u send the log and ERROR your are getting.

PROC Star
Posts: 7,363

Facing issues while importing data from TSV file

In addition to the log, it will also help if can you post the first 3 lines or so of your datafile.

PROC Star
Posts: 1,091

Facing issues while importing data from TSV file

I think your PROC IMPORT code is fine. SAS limits the size of OS datasets, and that can jump up and bite you at unexpected times. Try changing your FILENAME statement to

filename in 'Path\meetings.tsv' encoding='utf8' lrecl=32767;

Tom

Super User
Posts: 9,681

Facing issues while importing data from TSV file

I think your data is not matched with your variable type. Did you try 'gussingrow=' option to let SAS decide the right variable type and write some error check?

The best way is to use data step to make all variables are character Like: (var1-var200) (: $200.)

Ksharp

Ask a Question
Discussion stats
  • 4 replies
  • 2192 views
  • 0 likes
  • 5 in conversation