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;
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.