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;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.