SAS/IntrNet 9.1: htmSQL |
You can invoke htmSQL
From your Web browser, you can either use an HTML form or specify a URL to invoke htmSQL.
The HTML form must use the URL for your Web page
as the value of the ACTION
attribute of the HTML
FORM
element. You can also use the optional
METHOD
attribute to specify the CGI method to use for
sending form data:
<form action="http://yourserver/dir/executable_file/input-file" [method=get|post]>
yourserver
is your Web server host name (and
port, if required).
dir
is the path of the Web server CGI
program directory that contains htmSQL.
executable_file
is the htmSQL program name.
For UNIX and z/OS,
the program name is htmSQL. For Windows, the program name
is htmSQL.exe.
input-file
is your input file as
a relative pathname under the Web server's root directory (which can
include a Web server alias).
GET
and POST
are the two CGI methods for
sending form data.
method=get
method=post
stdin
.On the form, use HTML INPUT
elements to collect
variable values. For the NAME
attribute of the
INPUT
element, use the same variable names that
you use for your variable references. When the form is submitted,
the browser automatically generates the query string
var1=value1&var2=value2&...varN=valueN
from the form input and appends it to the URL that is specified by the
ACTION
attribute (for the GET
method) or sends it
in the body of the HTTP request (for the POST
method).
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.
Specify the URL either on an existing Web page or on your Web browser command line. A URL for htmSQL must include the pathname for an input file and must be of the form:
http://yourserver/dir/executable_file/input-file[?query-string]
yourserver
is your Web server host name (and
port, if required).
dir
is the path of the Web server CGI
program directory that contains htmSQL.
executable_file
is the htmSQL program name.
For UNIX and z/OS,
the program name is htmSQL. For Windows, the program name
is htmSQL.exe.
input-file
is your input file as
a relative pathname under the Web server's root directory (which can
include a Web server alias).
query-string
specifies values for one or more of the
variables that are referenced in the input file. This parameter is
optional. The variable name and
value pairs are separated by ampersands (&) and are specified using
the following format:
var1=value1&var2=value2&...varN=valueN
Be sure to properly encode any nonalphabetic characters that are in the query string: spaces become plus signs (+) and other characters are replaced by a percent sign (%) and the two-digit ASCII representation.
The following example shows a URL that is used to invoke htmSQL:
http://support.sas.com/cgi_bin/htmSQL/empdata.hsql?first=fname&last=lname&middle=mi
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.
The output that htmSQL
generates is sent to stdout
(usually your terminal
display). You can capture the generated output by redirecting
stdout
to a file. Use this method of invocation to test an
htmSQL input file or to produce a static page that contains SAS
data.
The following is the syntax for the htmSQL command
(parameters that are within square brackets ([]
) are optional):
htmSQL input-file ["query-string"] [-rc config-file] [-dsf datasrc-file]
input-file
specifies the pathname for
your input file.
query_string
specifies values for one
or more of the variables that are referenced in the input file.
The variable name and value pairs are separated by ampersands (&) and are
specified using the following format:
var1=value1&var2=value2&...varN=valueN
You do not need to encode nonalphabetic characters that are in the query string.
-rc config-file
specifies the pathname
of the configuration file to use.
You can name the file whatever you want and locate the
file in whichever path you choose.
htmSQL will not run if the specified file cannot be opened.
This parameter is optional. For information on running htmSQL without explicitly specifying a configuration pathname, see Specifying and Naming the Configuration File.
-dsf datasrc-file
specifies the pathname of the data source
definition file. If you specify a simple filename, htmSQL looks in
the current directory for the file. This option
overrides any data source definition file
that is specified in the configuration file.
The file does not have to be named
htmSQL.datasrc, htmSQL.dsf, or HTMSQL DATASRC.
the -rc
and -dsf
parameters can be placed
anywhere after the htmSQL command name.
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.
SAS/IntrNet 9.1: htmSQL |