BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ
Hi:
Just a few comments. the DLM= option goes on the INFILE statement, not the INPUT statement. My guess is that you are getting error messages in the SAS log.

Also, if your data is as shown in your screen shot, with a header row of column names, then you might also want the FIRSTOBS= option in the INFILE statement too. That way, SAS will start reading your data at row 2. You'll find both DLM= and FIRSTOBS= here https://go.documentation.sas.com/?docsetId=lestmtsref&docsetTarget=n1rill4udj0tfun1fvce3j401plo.htm&... in the documentation.
Cynthia

View solution in original post

10 REPLIES 10
Tom
Super User Tom
Super User

Your photographs as nice. 

What is your question?

Did you run some code to make that dataset?  What code?

Show the lines from the SAS log, as text not photographs.

tianerhu
Pyrite | Level 9
I want to transfer text data set to SAS data set , but the result, as you see, is empty .
The following is my code:
data recovery;
infile "my text data set physical address";
input ID dosage age duration score1-score4;
run;
proc print data = recovery;
run;
Kurt_Bremser
Super User

Please post your code and log.

From what I see, you have a tab-delimited file and should use '09'x as delimiter.

For tested code, copy/paste a few lines of the input file into a window opened with </>.

tianerhu
Pyrite | Level 9
data recovery;
infile "C:\Users\liao\Documents\My SAS Files\9.4\bio\project\recovery.txt";
input  ID $ dosage  age duration   score1-score4  dlm = '09'x;
run;
proc print data = recovery ;
run;
tianerhu
Pyrite | Level 9
The picture above is output.
Reeza
Super User

Post your LOG. That will indicate if the issue is your code or the file or something else. 

 

tianerhu
Pyrite | Level 9
Thank you for your reply
Cynthia_sas
SAS Super FREQ
Hi:
Just a few comments. the DLM= option goes on the INFILE statement, not the INPUT statement. My guess is that you are getting error messages in the SAS log.

Also, if your data is as shown in your screen shot, with a header row of column names, then you might also want the FIRSTOBS= option in the INFILE statement too. That way, SAS will start reading your data at row 2. You'll find both DLM= and FIRSTOBS= here https://go.documentation.sas.com/?docsetId=lestmtsref&docsetTarget=n1rill4udj0tfun1fvce3j401plo.htm&... in the documentation.
Cynthia
tianerhu
Pyrite | Level 9
get it ,it works well. Thank you.

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 10 replies
  • 499 views
  • 0 likes
  • 5 in conversation