You've got some serious PUT statement syntax issues, related to double- and single-quote marks. Suggest you paste your SAS log in a forum reply, if you would like some assistance / guidance debugging your SAS program?
29 data smith;
30 set sasuser.all_files;
31 file '/directory/smith.txt' PRINT;
32 where owner='smith';
33 put owner '/directory/smith.txt';
NOTE: The file '/directory/smith.txt' is:
Owner Name=xxxxx,Group Name=xxx,
Last Modified=Fri Jul 16 13:31:19 2010
NOTE: 1 record was written to the file '/directory/smith.txt'.
The minimum record length was 31.
The maximum record length was 31.
NOTE: There were 1 observations read from the data set SASUSER.ALL_FILES.
NOTE: The data set WORK.smith has 1 observations and 8 variables.
NOTE: DATA statement used (Total process time):
real time 0.09 seconds
cpu time 0.01 seconds
The problem is with the output. It is creating the file - smith.txt but the data in the file is wrong. It is just putting in the words I used in the 'put' command - ie smith /directory/smith.txt instead of something that should look like this:
165 bytes smith 25JUL2009 /directory/testing/filename.txt - this is the information in the dataset that has been created. There are many listed by various users so I need to create a text file containing all of the files that belong to a particular user.
Sounds like you need to analyze (PROCs CONTENTS, PRINT, FREQ) your input file SASUSER.ALL_FILES and the SAS variables/columns it contains. Your PUT statement must either list SAS variables, literal text (quoted), and / or PUT statement control commands. And if you were told what to code, I'd suggest you refer back to that individual for further guidance or at least take some interest in reading some basics about SAS datasets, variables and DATA step programming.
this line controls what appears in the output report/text file.
> 33 put owner '/directory/smith.txt';
You should replace that with this[pre] put (_all_)(' ') ;[/pre] This puts all variables of sasuser.all_files into the output.
To print just your chosen list of data columns, replace (_all_)(' ') with that list .
Yes, a PUT statement - share what code you have that does not work.
Also, there's much to offer for code examples and supplemental conference topic papers available at the SAS support http://support.sas.com/ website, either using its SEARCH facility or you can use a Google advanced search argument and include the parameter site:sas.com to limit the search to just the SAS website.
Suggested Google advanced search argument, this topic / post: