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.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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