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

Catch up on SAS Innovate 2026

Dive into keynotes, announcements and breakthroughs on demand.

Explore Now →
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
  • 1392 views
  • 0 likes
  • 2 in conversation