BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Bal23
Lapis Lazuli | Level 10

I tried to use sas to read a large raw dataset. It can read the first 100+ variables but the rest values are all missing.

INPUT  
@8 id $1.	 @@;
run;

SAS ran very slowly without error message. Any advice?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Riteshdell
Quartz | Level 8

why you are using double trail option to read it...

@@ is used to divide varible name in to two observation.....any specific requirement for using double trail?

View solution in original post

8 REPLIES 8
Astounding
PROC Star

Advice:  don't retest this under any circumstances.

 

It's likely that someone canceled the job.  This is an infinite loop, that continuously reads the contents of column 8 from the first line of raw data. 

 

Perhaps there are later statements that might cause the program to eventually finish on its own.  More likely, it began taking up so much disk space that an administrator took action.

Riteshdell
Quartz | Level 8

I am not understadning your question completly, but I am guessing , your record length is less.

 

So just try to increase the length of input data file.

 

syntax:

 

LINESIZE=n | MIN | MAX | hexX

 

give maximum length of record.

 

LS= 1024(I am assuming max number).

 

try this or let us know complete issue.

 

Bal23
Lapis Lazuli | Level 10
LINESIZE=256

 

LS= 1024

I do not know I understand it correctly, when i add @@ and put these two you mentioned, it still ran so slowly and had to terminate each time

 

Riteshdell
Quartz | Level 8

why you are using double trail option to read it...

@@ is used to divide varible name in to two observation.....any specific requirement for using double trail?

Bal23
Lapis Lazuli | Level 10

Thanks. no i only want sas not stop readding

 

 I only want SAS to read all those  correctly. Now it can only read the first 100+ variables, leaving the rest 50 variables missing values/blank

I have set linesize=32767

still same

Reeza
Super User

Can you post a sample of your data? Is it possible you have a line feed character that would cause reading a line to be truncated?

Bal23
Lapis Lazuli | Level 10

Would you please let me know the line feed chacters.

I tried to create a sample dataset, it wonot work

 

currently the code can read the first 180 variables, only 20 var values are missing. Because many obs lack of values for many variables,   it is hard to tell exactly which variable it stops at

I find it canot read a certain date

 

it might be the format of date, any advice for that

or maybe because of space for next page?

Astounding
PROC Star

It would also help to see the full INPUT statement.  The one you posted doesn't match the results you are describing.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

Discussion stats
  • 8 replies
  • 1868 views
  • 0 likes
  • 4 in conversation