htmSQL retail1.hsql param=1992
{*--------------------------------------------------------------------*} {* Note: You do not need to save this file from your Web browser. *} {* This file is available in the htmSQL "samples" subdirectory. *} {* *} {* This input file produces a Web page that lists sales information *} {* that is stored in the 'retail' SAS data set of the SASHELP library.*} {*--------------------------------------------------------------------*} <HEAD><TITLE>htmSQL: Retail Data</TITLE></HEAD> <BODY BGCOLOR="FFFFFF"> {*--------------------------------------------------------------------*} {* The following section queries the SAS server that is identified by *} {* the server= parameter and dynamically generates the sales *} {* information. *} {*--------------------------------------------------------------------*} {query server="sampnode.pc.sas.com:5000"} {sql} select sales,date,year,month,day from sashelp.retail where year = {&PARAM} {/sql} {*--------------------------------------------------------------------*} {* We use a table to show the sales information. *} {*--------------------------------------------------------------------*} <TABLE BORDER=1 ALIGN=LEFT> <TR> <TH ALIGN=CENTER VALIGN=MIDDLE BGCOLOR="FF0000" NOWRAP>Sales</TH> <TH ALIGN=CENTER VALIGN=MIDDLE BGCOLOR="FF0000" NOWRAP>Date</TH> <TH ALIGN=CENTER VALIGN=MIDDLE BGCOLOR="FF0000" NOWRAP>Year</TH> <TH ALIGN=CENTER VALIGN=MIDDLE BGCOLOR="FF0000" NOWRAP>Month</TH> <TH ALIGN=CENTER VALIGN=MIDDLE BGCOLOR="FF0000" NOWRAP>Day</TH> </TR> {*--------------------------------------------------------------------*} {* Each row of our results set corresponds to a row in the table *} {*--------------------------------------------------------------------*} {eachrow} <TR> <TD ALIGN=LEFT VALIGN=MIDDLE NOWRAP>{&sales}</TD> <TD ALIGN=LEFT VALIGN=MIDDLE NOWRAP>{&date}</TD> <TD ALIGN=LEFT VALIGN=MIDDLE NOWRAP>{&year}</TD> <TD ALIGN=LEFT VALIGN=MIDDLE NOWRAP>{&month}</TD> <TD ALIGN=LEFT VALIGN=MIDDLE NOWRAP>{&day}</TD> </TR> {/eachrow} </TABLE> {*--------------------------------------------------------------------*} {* End the query section. *} {*--------------------------------------------------------------------*} {/query} </BODY>
{*--------------------------------------------------------------------*} {* Note: You do not need to save this file from your Web browser. *} {* This file is available in the htmSQL "samples" subdirectory. *} {* *} {* This input file produces a Web page that lists sales information *} {* that is stored in the 'retail' SAS data set of the SASHELP library.*} {*--------------------------------------------------------------------*} <HEAD><TITLE>htmSQL: Retail Data</TITLE></HEAD> <BODY BGCOLOR="FFFFFF"> {*--------------------------------------------------------------------*} {* The following section queries the SAS server that is identified by *} {* the data source and dynamically generates the sales information. *} {*--------------------------------------------------------------------*} {query datasrc="retail"} {sql} select sales,date,year,month,day from sashelp.retail where year = {&PARAM} {/sql} {*--------------------------------------------------------------------*} {* We use a table to show the sales information. *} {*--------------------------------------------------------------------*} <TABLE BORDER=1 ALIGN=LEFT> <TR> <TH ALIGN=CENTER VALIGN=MIDDLE BGCOLOR="FF0000" NOWRAP>Sales</TH> <TH ALIGN=CENTER VALIGN=MIDDLE BGCOLOR="FF0000" NOWRAP>Date</TH> <TH ALIGN=CENTER VALIGN=MIDDLE BGCOLOR="FF0000" NOWRAP>Year</TH> <TH ALIGN=CENTER VALIGN=MIDDLE BGCOLOR="FF0000" NOWRAP>Month</TH> <TH ALIGN=CENTER VALIGN=MIDDLE BGCOLOR="FF0000" NOWRAP>Day</TH> </TR> {*--------------------------------------------------------------------*} {* Each row of our results set corresponds to a row in the table *} {*--------------------------------------------------------------------*} {eachrow} <TR> <TD ALIGN=LEFT VALIGN=MIDDLE NOWRAP>{&sales}</TD> <TD ALIGN=LEFT VALIGN=MIDDLE NOWRAP>{&date}</TD> <TD ALIGN=LEFT VALIGN=MIDDLE NOWRAP>{&year}</TD> <TD ALIGN=LEFT VALIGN=MIDDLE NOWRAP>{&month}</TD> <TD ALIGN=LEFT VALIGN=MIDDLE NOWRAP>{&day}</TD> </TR> {/eachrow} </TABLE> {*--------------------------------------------------------------------*} {* End the query section. *} {*--------------------------------------------------------------------*} {/query} </BODY>
*--------------------------------------------------------------- * * Notes about this sample htmSQL data source file. * * o You do not need to save this file from your Web browser. * This file is available in the htmSQL "samples" subdirectory. * * o This data source definition file specifies one data source * named 'retail'. * * o The retail data source specifies theSAS/SHARE server * 'sampnode.shr10'. * * o The server name is derived as follows: * * TheSAS/SHARE server is running on sampnode.pc.sas.com * (machine name). The ID (which is also the TCP/IP service name) * is shr10. The following job is running on * sampnode.pc.sas.com: * * options comamid=tcp; * proc server id=shr10; * run; * * o A data source definition file can include one or more * libraries. However, because the library we are using, * SASHELP, is already predefined to the server, you do * not need to define it in the data source file. * * o Note that the 'retail' data source is referenced in * the associated 'retail.hsql' file. Similarly, the 'sashelp' * library is also referenced in 'retail.hsql'. * *--------------------------------------------------------------- * -------------------------------------------------------------- * Identify Data Sources * * In this example, the data source is named 'retail'. * * -------------------------------------------------------------- Data Source Name:retail=sas * -------------------------------------------------------------- * Define Method * -------------------------------------------------------------- Method tcp:COMMEXE=wqetcp Methods:tcp= * -------------------------------------------------------------- * Define Server * * In this example, the server is named 'sampnode.shr10'. * * -------------------------------------------------------------- Server sampnode.shr10:AM=tcp Server sampnode.shr10:SASSHARE=yes Server sampnode.shr10:Server Version=6 Server sampnode.shr10:ServerAddress=sampnode.pc.sas.com Server sampnode.shr10:TraceFlags=0 Servers:sampnode.shr10= * -------------------------------------------------------------- * Define Data Sources * * In this example, the data source is named 'retail'. * Note that this data source is identified under the * 'Identify Data Sources' section of this file. * * -------------------------------------------------------------- retail:Description=Retail Data Source retail:Server=sampnode.shr10 retail:UndoRequired=y