04-26-2012 11:57 AM
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 ,
04-26-2012 12:37 PM
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.
04-26-2012 12:49 PM
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!
04-26-2012 12:58 PM
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.