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

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register 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
  • 881 views
  • 0 likes
  • 2 in conversation