BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Kamal5522
Obsidian | Level 7
Hi
I want to create a data set from .txt file containg below data
Name Age
Rao 30
Tom 40

I want to use code as below
Data Test;
Infile "path of .txt file";
?
Run;

my question is what code I should use so that first row should be read as varaible and rest observation from txt. file?
1 ACCEPTED SOLUTION

Accepted Solutions
ghosh
Barite | Level 11
data test;
infile "datafile.txt" firstobs=2;
input Name $ Age;
run;

View solution in original post

2 REPLIES 2
ghosh
Barite | Level 11
data test;
infile "datafile.txt" firstobs=2;
input Name $ Age;
run;
Kamal5522
Obsidian | Level 7
Thanks

CFC_SAS_Communities_400x225.jpg

Call for content now open!

It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.

Submit your proposal →

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1634 views
  • 0 likes
  • 2 in conversation