سؤال

I would like to submit a proc SQL via a webfrontend, where the user has the possibility to modify 1 or 2 statements.

I found sascgi via google. but are there alternatives? I could, for example, write everything in a database (with php) and then somehow submit a sas script reading from that database. but that would be one step more then the "direct" way.

Is there another way?

هل كانت مفيدة؟

المحلول

Yes. The easiest and best way is to license SAS EBI and setup a parameterized stored process. If this is not an option then the next easiest/best way would be to license the SAS/Intranet module.

There are also other alternatives but they are both a bit of a hack (and probably have security vulnerabilities so if your website is externally facing I would not recommend). They also have the downside of requiring additional effort to setup.

  1. If your webserver is on the same network as your SAS machine you can have the webserver launch the SAS process remotely. Pass in the information you need using the SAS -sysin command line parameter. In a windows environment you can launch a process on a remote machine using psexec which is a download available via the Microsoft site. In UNIX you could use ssh or rsh. If your webserver and your SAS server are the same machine then just use PHP to launch a system process.

    psexec.exe -u DOMAIN\username -p password -w d:\working_folder \\computer_with_sas d:\batchfile.bat "parameters to pass in via SAS -sysin option"

  2. Build a socket server. There's plenty of articles on this and in theory a PHP app can communicate directly with the socket server. Just google 'sas socket server'. If you choose this option consider using srvany.exe in Windows to setup your socket server as a service. In *nix you can just launch the program as a background task.

Let me know more details about which environment you are running and I can expand on this answer if necessary. This should give you plenty to start with though.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top