data where_infile; infile'/home/u35263349/My_Folder/class_ds.txt'; input Name$ Sex$ Age Height Weight ; if Sex='F'; run;Here i am import sashelp.class txt file and filter with if Clause
where cannot work with infile statement
but i didn't get output even if using IF statement where went work
Open the text file with an editor and copy a few lines into a code box here.
Also post the log from your step into a code box.
@BrahmanandaRao wrote:
data where_infile; infile'/home/u35263349/My_Folder/class_ds.txt'; input Name$ Sex$ Age Height Weight ; if Sex='F'; run;Here i am import sashelp.class txt file and filter with if Clause
where cannot work with infile statement
but i didn't get output even if using IF statement where went work
Show the log that was created when the code ran.
Always when output was not as expected.
Copy the text from the LOG and paste into a text box opened on the forum with the </> icon.
Hello @BrahmanandaRao
It is possible that the columns are tab separated. Other wise Your code code should work. If it is indeed tab separated use the following modification
data where_infile;
infile'/home/u35263349/My_Folder/class_ds.txt' dlm ='09'x dsd missover;
input Name $ Sex $ Age Height Weight ;
if Sex='F';
run;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
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!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.