Hey,
Is it possible for SAS to search for other SAS Programs in a given directory, and then open up the program and search for a specific name?
For example, in every SAS Program I write, I put my name in the Code Header. I would like to find all the SAS programs that include my name within a particular directory.
Many thanks in advance ,
Kriss Harris
You can probability find really good examples by searching these forums
You will need to learn about
It's really quite easy I do it all the time.
Thank you for your guidance! It's well appreciated I have seen other papers mentioning the PIPE statement too so I will research the above.
I was just looking into the systask command too, but the above way seems like the way to go!
Thank you.
Regards Kriss
You could use SYSTASK to run a DIR command and use output redirection to send the output to a file and then read that file using SAS INFILE.
With PIPE the file(DIR COMMAND) is executed when the file is opened with INFILE and the output is sent to SAS as if it were any other file. The same but different.
Okay I see now.
Thanks for the clarification!
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.