Contents SAS/IntrNet 9.1: htmSQL Previous Next

Understanding How htmSQL Works: The Technical View

htmSQL is a CGI program that is written in the C language and resides on your Web server. It can process special directives that are embedded in an HTML file. These directives describe one or more SQL statements and incorporate formatted results into the Web page that is created by the HTML file.

htmSQL passes your SQL to a SAS/SHARE server, performs the requested updates and queries, and retrieves the results sets. The desired page is created dynamically and returned through the Web server to the browser. See the data flow and required components in the following diagram:

[htmSQL diagram]

The Web server calls htmSQL each time it receives a URL that specifies the htmSQL program name. htmSQL supports both the GET and POST CGI methods for sending form data.

htmSQL reads the input file for information that is contained within any of its directives. It processes this information and returns the results to the Web server. It returns all HTML information to the Web server just as it appears in the input file.

The following example illustrates a URL for htmSQL:

http://yourserver/dir/executable_file/filename.hsql?query_string

Note: Some Web servers can be configured to recognize an input file by its file extension and to automatically call the appropriate CGI program to process the file. If your Web server can be configured this way, you can omit the path to htmSQL when you specify the URL (that is, you can omit the dir and executable_file values). Consult your Web server documentation for details on whether and how your server can be so configured.

For more information about CGI and CGI scripting, refer to the Common Gateway Interface. documentation provided by W3C


Processing an htmSQL Input File

htmSQL uses a defined set of processing rules to process the information in the input file:

Note: z/OS is the successor to the OS/390 and MVS operating systems. SAS/IntrNet 9.1 for z/OS is supported on the MVS, OS/390, and z/OS operating systems and, throughout this document, any reference to z/OS also applies to OS/390 and MVS, unless otherwise stated.


Contents SAS/IntrNet 9.1: htmSQL Previous Next