I am trying to generate date stamps for SAS output files. It's like this: For every output (xls and csv files) that a SAS program generates, I want the output file names to automatically take the current date. Eg. If the program is run on 07-26-2007 then some of the files it will generate will be named 07-26-2007_out.industry.xls, 07-26-2007_out.AAA.xls, etc ... So basically, the suffix remains constant, only the prefix (date ) will change. I guess one can also write a shell scrip for it. Trying to figure that out as well.
Another question: Is there a good way to enhance SAS outputs. I can use ODS, but I want generate a much prettier output. Not sure if ODS can be customized.
Thanks so much for your response. When I say enhancing outputs, I mean making it prettier. Like giving the heading rows a shade, giving the table a frame, etc. I am not looking at anything too sophisticated, just a simple table with a few shades ... basically, something good enough to be presented before business users.
I think you can do a LOT with ODS. It really depends on your destination of choice and WHERE (what application) you're using to render or present the output.
For example, if you are running SAS 8 and you use ODS HTML, the output looks pretty good in Excel and Word with a simple STYLE=SASWEB change to the ODS invocation. However, in SAS 9, with the move to HTML 4.0 compliant tags, Microsoft does not play nice with HTML 4.0 -- Office much prefers either 3.2 compliant HTML tags or --better -- Microsoft HTML tags or Microsoft Spreadsheet XML tags (for Excel).
Sometimes, you have to change the style template to really go down the "pretty" road -- but again, it depends on where your output will ultimately be presented.
With PROC PRINT, PROC REPORT and PROC TABULATE, you have the chance to extensively control the colors and fonts, table attributes, etc. You will find that something that looks great in a browser might need a bit of tweaking to look better in Excel or Word or Acrobat Reader.
This is just something to test out and then open each result file in the application where you finally want to see the results. Starting with Office 97, you could open HTML files with Word and Excel. The MSOFFICE2K file is designed specifically for the kind of HTML used with Office 2000 and higher. And the EXCELXP file is designed specifically for Excel 2002 and higher (earlier versions of Excel will not open the XML). You should start with the ODS result file that looks the best in your viewing application and then start making changes from there.
As you can see, I've done a bit of header changing with PROC REPORT. If I wanted to do that same kind of header changing for the PROC FREQ, I'd have to use a different technique (Style and/or table template).