To do this without a high level of integration, there are two steps. The first is to ensure that your SAS software on your server can successfully access your MySQL data. This is done using the SAS/Access product, either the MySQL or the ODBC options. This is completely independent from PHP, and will allow your SAS programs to use MySQL data. Once this is working, you need to create your SAS code (which can be done dynamically), save it in a text format dataset, and call SAS from PHP, referencing your SAS code. I'm not a PHP programmer myself, but from a quick look at the documentation it appears the exec() function would be ideal for this. On my PC, to execute SAS and have it run a program stored in "C:\SAS_PROGRAMS\TestProgram.SAS", I run the following command under Windows: "C:\Program Files\SASHome\SASFoundation\9.3\sas.exe" -SYSIN C:\SAS_PROGRAMS\TestProgram.SAS -CONFIG "C:\Program Files\SASHome\SASFoundation\9.3\nls\en\sasv9.cfg" As a demonstration, my program (TestProgram.SAS) looks like this: data sasuser.test_output; set sashelp.shoes; SalesPerStore = Sales / Stores; format SalesPerStore Dollar12.; run; You would probably substitute a MySQL library for my use of sashelp, and you might send your output to a text file instead of a SAS dataset, but those changes are very easy. I don't believe that you'll find any major problems, but I'm sure there will be a couple of bumps in the road. Just post your questions back to this discussion board; there's a LOT of expertise reading it. Good luck, Tom
... View more