Question regarding relation between .cgi scripts and .sas scripts.

Posts: 30

Question regarding relation between .cgi scripts and .sas scripts.

Hi I am at beginner level in sas..

I have a question. I want to know the relation between .cgi scripts and .sas scripts.. (Given URL and path to log in)

How to use emacs unix editor? i.e. how to open a .cgi script given path and url name? pls help..

How are they related in anyway? Any suggestions appreciated..

Posts: 1,307

Re: Question regarding relation between .cgi scripts and .sas scripts.

Posted in reply to swathi123

.cgi scripts are not related to SAS at all. They are executed when certain web pages are requested.

.sas files are not scripts at all. They are SAS programs, and the SAS environment needs to be running to execute them. They can either be executed interactively by someone running SAS at a terminal, or in batch. SAS has an excellent documentation base online; you can learn more about this there. Here's a link:

Since emacs isn't a SAS product, you probably won't get much advice on this forum. I suggest you try a Unix-oriented one. Both .cgi and .sas files are just text files, so they can be edited with emacs.

Good luck!


Posts: 9,365

Re: Question regarding relation between .cgi scripts and .sas scripts.

Posted in reply to swathi123


  As Tom indicates, a .CGI file is not related to SAS or .SAS files at all. CGI stands for "Common Gateway Interface" and it is typically a file that is used on a web server in order to "broker" or deliver content between a web server and a requesting browser. But, as shown in this Wikipedia article, a CGI script does not necessarily have the file extension of .CGI -- they show a script with an extension of .PL (Common Gateway Interface - Wikipedia, the free encyclopedia).

  A .SAS file is not a "script" it is a SAS program and needs to be run by a SAS.EXE executable program or by a process that knows how to get the program executed in a batch or non-interactive mode.

  SAS has a product called SAS/Intrnet, which uses the Common Gateway Interface framework in order for a browser to request that a SAS program stored in a special library should execute. The browser makes an HTTP request that gets sent to a "broker.exe" program stored on a web server; the broker program knows how to retrieve the requested program, invoke sas and returns the formatted results to the requesting browser using an HTTP stream. Generally, this request/response "transaction" has an HTML form as the front end; the SAS program is stored in an Application Dispatcher library that is accessible to the web server broker program; a SAS server executes the requested program and returns the results to the broker program; which, in turn, sends the results back to the requesting browser machine.

Two different products, the SAS Information Delivery Portal and the SAS Stored Process Web Application (both part of the BI Platform) work by a similar, but not exactly the same mechanism. They uses different metadata, libraries and methods to cause the .SAS program to be executed and get the results returned to the client browser.

  CGI technology, files, or languages have nothing to do with SAS, necessarily, unless you were talking specifically about SAS/IntrNet and using the Common Gateway Interface to return SAS program results to a browser. There are many ways to use CGI technology and CGI scripts without using SAS at all.


Ask a Question
Discussion stats
  • 2 replies
  • 3 in conversation