You can specify name/value
pairs in a URL by using Application Broker CGI-parameter syntax. For
example, the URL
http://yourserver/cgi-bin/broker?
_service=default&_program=sample.webhello.sas
specifies two name/value
pairs. Note the question mark (?) that follows BROKER. The section
of the URL that follows the question mark is called the
query string. The query string contains the name/value
pair data that is input to the application. Each name is separated
from the following value by an equal sign (=). Multiple name/value
pairs are separated by ampersands (&). In this example, the _SERVICE=DEFAULT
pair specifies the service that handles this request, and the _PROGRAM=SAMPLE.WEBHELLO.SAS
pair specifies the request program that is executed.
The Web browser has
strict rules about the format of the query string. Any special characters
(including spaces) in a value must be URL encoded. Spaces can be encoded
as a plus sign (+) or %20. For example, if you want to pass the name
AUTHOR with a value of John Doe, specify it in the URL as
AUTHOR=John+Doe
or
AUTHOR=John%20Doe
. See
HTML Syntax Reference and the
URLENCODE function for more complete information.
URLs with name/value
pairs can be manually typed in a Web browser location field, saved
as a Web browser bookmark, included as an HREF attribute of an anchor
tag, included as an SRC attribute of an IMG tag, or used anywhere
a URL can be used. Java or ActiveX components such as the
SAS/GRAPH
thin-client graphic components might generate URLs with name/value
pairs to activate Application Dispatcher programs.
URLs with name/value
pairs that are included in an HTML page (for example, as an HREF=
or SRC= attribute) must be properly encoded to prevent incorrect interpretation
of the ampersand characters. For example, the anchor tag
<A HREF="http://yourserver/cgi-bin/broker?
_program=lib.pgm.sas©=true">
causes the Web
browser to interpret © as the character entity reference for
a copyright character. The correct way to encode this URL is
<A HREF="http://yourserver/cgi-bin/broker?
_program=lib.pgm.sas&copy=true">
In addition, some Web
browsers incorrectly identify a character entity reference even if
it is not terminated by punctuation. For example, ®ION=EAST
might be interpreted as ®ION=EAST by some (but not all) Web
browsers. To avoid this problem, encode all ampersands that separate
name/value pairs in a URL as
&
when
used in an HTML tag.