%!PS-Adobe-2.0 %%Creator: dvipsk 5.58f Copyright 1986, 1994 Radical Eye Software %%Title: sugi22.dvi %%Pages: 6 %%PageOrder: Ascend %%BoundingBox: 0 0 612 792 %%DocumentFonts: Times-Roman Times-Bold Courier Times-Italic %%+ Courier-Bold %%DocumentPaperSizes: Letter %%EndComments %DVIPSCommandLine: dvips -o sugi22.ps -P CIL_hp4 sugi22.dvi %DVIPSParameters: dpi=600, comments removed %DVIPSSource: TeX output 1997.03.20:1627 %%BeginProcSet: tex.pro /TeXDict 250 dict def TeXDict begin /N{def}def /B{bind def}N /S{exch}N /X{S N}B /TR{translate}N /isls false N /vsize 11 72 mul N /hsize 8.5 72 mul N /landplus90{false}def /@rigin{isls{[0 landplus90{1 -1}{-1 1} ifelse 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[matrix currentmatrix{dup dup round sub abs 0.00001 lt{round}if} forall round exch round exch]setmatrix}N /@landscape{/isls true N}B /@manualfeed{statusdict /manualfeed true put}B /@copies{/#copies X}B /FMat[1 0 0 -1 0 0]N /FBB[0 0 0 0]N /nn 0 N /IE 0 N /ctr 0 N /df-tail{ /nn 8 dict N nn begin /FontType 3 N /FontMatrix fntrx N /FontBBox FBB N string /base X array /BitMaps X /BuildChar{CharBuilder}N /Encoding IE N end dup{/foo setfont}2 array copy cvx N load 0 nn put /ctr 0 N[}B /df{ /sf 1 N /fntrx FMat N df-tail}B /dfs{div /sf X /fntrx[sf 0 0 sf neg 0 0] N df-tail}B /E{pop nn dup definefont setfont}B /ch-width{ch-data dup length 5 sub get}B /ch-height{ch-data dup length 4 sub get}B /ch-xoff{ 128 ch-data dup length 3 sub get sub}B /ch-yoff{ch-data dup length 2 sub get 127 sub}B /ch-dx{ch-data dup length 1 sub get}B /ch-image{ch-data dup type /stringtype ne{ctr get /ctr ctr 1 add N}if}B /id 0 N /rw 0 N /rc 0 N /gp 0 N /cp 0 N /G 0 N /sf 0 N /CharBuilder{save 3 1 roll S dup /base get 2 index get S /BitMaps get S get /ch-data X pop /ctr 0 N ch-dx 0 ch-xoff ch-yoff ch-height sub ch-xoff ch-width add ch-yoff setcachedevice ch-width ch-height true[1 0 0 -1 -.1 ch-xoff sub ch-yoff .1 sub]{ch-image}imagemask restore}B /D{/cc X dup type /stringtype ne{]} if nn /base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{dup dup length 1 sub dup 2 index S get sf div put}if put /ctr ctr 1 add N}B /I{ cc 1 add D}B /bop{userdict /bop-hook known{bop-hook}if /SI save N @rigin 0 0 moveto /V matrix currentmatrix dup 1 get dup mul exch 0 get dup mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N /eop{SI restore userdict /eop-hook known{eop-hook}if showpage}N /@start{userdict /start-hook known{start-hook}if pop /VResolution X /Resolution X 1000 div /DVImag X /IE 256 array N 0 1 255{IE S 1 string dup 0 3 index put cvn put}for 65781.76 div /vsize X 65781.76 div /hsize X}N /p{show}N /RMat[1 0 0 -1 0 0]N /BDot 260 string N /rulex 0 N /ruley 0 N /v{/ruley X /rulex X V}B /V {}B /RV statusdict begin /product where{pop product dup length 7 ge{0 7 getinterval dup(Display)eq exch 0 4 getinterval(NeXT)eq or}{pop false} ifelse}{false}ifelse end{{gsave TR -.1 .1 TR 1 1 scale rulex ruley false RMat{BDot}imagemask grestore}}{{gsave TR -.1 .1 TR rulex ruley scale 1 1 false RMat{BDot}imagemask grestore}}ifelse B /QV{gsave newpath transform round exch round exch itransform moveto rulex 0 rlineto 0 ruley neg rlineto rulex neg 0 rlineto fill grestore}B /a{moveto}B /delta 0 N /tail {dup /delta X 0 rmoveto}B /M{S p delta add tail}B /b{S p tail}B /c{-4 M} B /d{-3 M}B /e{-2 M}B /f{-1 M}B /g{0 M}B /h{1 M}B /i{2 M}B /j{3 M}B /k{ 4 M}B /w{0 rmoveto}B /l{p -4 w}B /m{p -3 w}B /n{p -2 w}B /o{p -1 w}B /q{ p 1 w}B /r{p 2 w}B /s{p 3 w}B /t{p 4 w}B /x{0 S rmoveto}B /y{3 2 roll p a}B /bos{/SS save N}B /eos{SS restore}B end %%EndProcSet %%BeginFont: Times-Roman % @@psencodingfile@{ % author = "S. Rahtz, P. MacKay, Alan Jeffrey, B. Horn, K. Berry", % version = "0.6", % date = "22 June 1996", % filename = "8r.enc", % email = "kb@@mail.tug.org", % address = "135 Center Hill Rd. // Plymouth, MA 02360", % codetable = "ISO/ASCII", % checksum = "119 662 4424", % docstring = "Encoding for TrueType or Type 1 fonts to be used with TeX." % @} % % Idea is to have all the characters normally included in Type 1 fonts % available for typesetting. This is effectively the characters in Adobe % Standard Encoding + ISO Latin 1 + extra characters from Lucida. % % Character code assignments were made as follows: % % (1) the Windows ANSI characters are almost all in their Windows ANSI % positions, because some Windows users cannot easily reencode the % fonts, and it makes no difference on other systems. The only Windows % ANSI characters not available are those that make no sense for % typesetting -- rubout (127 decimal), nobreakspace (160), softhyphen % (173). quotesingle and grave are moved just because it's such an % irritation not having them in TeX positions. % % (2) Remaining characters are assigned arbitrarily to the lower part % of the range, avoiding 0, 10 and 13 in case we meet dumb software. % % (3) Y&Y Lucida Bright includes some extra text characters; in the % hopes that other PostScript fonts, perhaps created for public % consumption, will include them, they are included starting at 0x12. % % (4) Remaining positions left undefined are for use in (hopefully) % upward-compatible revisions, if someday more characters are generally % available. % % (5) hyphen appears twice for compatibility with both ASCII and Windows. % /TeXBase1Encoding [ % 0x00 (encoded characters from Adobe Standard not in Windows 3.1) /.notdef /dotaccent /fi /fl /fraction /hungarumlaut /Lslash /lslash /ogonek /ring /.notdef /breve /minus /.notdef % These are the only two remaining unencoded characters, so may as % well include them. /Zcaron /zcaron % 0x10 /caron /dotlessi % (unusual TeX characters available in, e.g., Lucida Bright) /dotlessj /ff /ffi /ffl /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef % very contentious; it's so painful not having quoteleft and quoteright % at 96 and 145 that we move the things normally found there down to here. /grave /quotesingle % 0x20 (ASCII begins) /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash % 0x30 /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question % 0x40 /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O % 0x50 /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore % 0x60 /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o % 0x70 /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef % rubout; ASCII ends % 0x80 /.notdef /.notdef /quotesinglbase /florin /quotedblbase /ellipsis /dagger /daggerdbl /circumflex /perthousand /Scaron /guilsinglleft /OE /.notdef /.notdef /.notdef % 0x90 /.notdef /.notdef /.notdef /quotedblleft /quotedblright /bullet /endash /emdash /tilde /trademark /scaron /guilsinglright /oe /.notdef /.notdef /Ydieresis % 0xA0 /.notdef % nobreakspace /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen % Y&Y (also at 45); Windows' softhyphen /registered /macron % 0xD0 /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown % 0xC0 /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis % 0xD0 /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls % 0xE0 /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis % 0xF0 /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis ] def %%EndFont %%BeginProcSet: texps.pro TeXDict begin /rf{findfont dup length 1 add dict begin{1 index /FID ne 2 index /UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]/Metrics exch def dict begin Encoding{exch dup type /integertype ne{pop pop 1 sub dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get div def} ifelse}forall Metrics /Metrics currentdict end def[2 index currentdict end definefont 3 -1 roll makefont /setfont load]cvx def}def /ObliqueSlant{dup sin S cos div neg}B /SlantFont{4 index mul add}def /ExtendFont{3 -1 roll mul exch}def /ReEncodeFont{/Encoding exch def}def end %%EndProcSet TeXDict begin 40258431 52099146 1000 600 600 (sugi22.dvi) @start /Fa 190[42 65[{ TeXBase1Encoding ReEncodeFont }1 58.333336 /Times-Roman rf /Fb 138[45 2[45 3[45 46[45 63[{ TeXBase1Encoding ReEncodeFont }4 75.000000 /Courier-Bold rf /Fc 140[60 6[60 2[60 2[60 60 3[60 97[{ TeXBase1Encoding ReEncodeFont }6 100.000000 /Courier rf /Fd 138[46 28 32 37 1[46 42 46 69 23 2[23 46 42 1[37 46 37 1[42 11[60 55 46 60 65 51 65 1[78 55 2[32 65 65 51 55 60 1[55 60 1[42 25[83 37[{ TeXBase1Encoding ReEncodeFont }35 83.333336 /Times-Bold rf /Fe 140[72 9[72 1[72 3[72 1[72 97[{ TeXBase1Encoding ReEncodeFont }5 119.999947 /Courier rf /Ff 1 59 df<1C007F00FF80FF80FF80FF80FF807F001C000909798817>58 D E /Fg 134[37 3[42 23 32 32 1[42 42 42 60 23 2[23 42 42 23 37 42 37 1[42 9[69 1[60 46 42 5[69 5[60 3[55 1[51 19[28 45[{ TeXBase1Encoding ReEncodeFont }27 83.333336 /Times-Italic rf /Fh 134[50 50 50 50 50 50 50 50 1[50 50 50 50 50 50 1[50 50 50 50 50 50 50 50 50 1[50 5[50 50 2[50 50 50 50 1[50 50 50 50 50 2[50 50 50 50 50 50 50 50 50 1[50 50 50 50 1[50 50 2[50 50 50 50 1[50 50 50 50 50 3[50 50 50 1[50 50 1[50 34[{ TeXBase1Encoding ReEncodeFont }65 83.333336 /Courier rf /Fi 103[45 26[45 45 45 1[45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 1[45 45 45 45 45 45 45 45 45 1[45 1[45 45 45 1[45 45 45 45 45 45 45 45 45 45 45 45 45 45 2[45 45 45 45 45 45 45 45 45 1[45 45 45 45 45 45 3[45 1[45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 33[{ TeXBase1Encoding ReEncodeFont }82 75.000000 /Courier rf /Fj 134[40 1[40 1[40 40 1[40 2[40 40 40 40 40 1[40 40 1[40 40 40 40 1[40 13[40 15[40 2[40 16[40 40 46[{ TeXBase1Encoding ReEncodeFont }22 66.666664 /Courier rf /Fk 134[33 2[33 33 18 26 22 1[33 33 33 52 18 33 1[18 33 33 1[29 33 29 1[29 7[48 3[48 41 3[37 48 48 59 2[26 5[48 44 1[48 6[18 6[33 1[33 2[17 1[17 4[22 39[{ TeXBase1Encoding ReEncodeFont }36 66.666664 /Times-Roman rf /Fl 1 4 df<006000007000006000006000406020E06070F861F07E67E01FFF8007FE 0000F00007FE001FFF807E67E0F861F0E060704060200060000060000070000060001415 7B9620>3 D E /Fm 134[50 1[72 50 55 33 39 44 1[55 50 55 83 28 2[28 55 50 33 44 55 44 55 50 9[100 2[66 55 2[61 3[66 2[39 1[78 2[72 72 1[72 18[25 33 7[100 34[55 2[{ TeXBase1Encoding ReEncodeFont }35 100.000000 /Times-Bold rf /Fn 1 16 df<000FE000007FFC0000FFFE0003FFFF8007FFFFC00FFFFFE01FFFFFF0 3FFFFFF83FFFFFF87FFFFFFC7FFFFFFC7FFFFFFCFFFFFFFEFFFFFFFEFFFFFFFEFFFFFFFE FFFFFFFEFFFFFFFEFFFFFFFEFFFFFFFE7FFFFFFC7FFFFFFC7FFFFFFC3FFFFFF83FFFFFF8 1FFFFFF00FFFFFE007FFFFC003FFFF8000FFFE00007FFC00000FE0001F207BA42A>15 D E /Fo 104[83 42 1[37 37 24[37 42 42 60 42 42 23 32 28 42 42 42 42 65 23 42 23 23 42 42 28 37 42 37 42 37 3[28 1[28 1[60 60 78 60 60 51 46 55 60 46 60 60 74 51 1[32 28 60 60 46 51 60 55 55 60 1[37 3[23 23 42 2[42 42 42 42 42 42 42 23 21 28 21 2[28 28 28 1[69 34[46 2[{ TeXBase1Encoding ReEncodeFont }76 83.333336 /Times-Roman rf /Fp 134[60 1[86 60 66 40 47 53 1[66 60 66 100 33 2[33 1[60 40 53 66 53 66 60 9[120 3[66 86 1[73 6[47 93 93 73 2[86 1[86 6[40 4[60 60 60 60 60 1[33 1[40 45[{ TeXBase1Encoding ReEncodeFont }38 119.999947 /Times-Bold rf /Fq 1 4 df<000C0000001E0000001E0000001E0000001E0000001E0000601E018078 1E0780FC0C0FC07F0C3F803F8C7F0007CCF80001FFE000007F8000001E0000007F800001 FFE00007CCF8003F8C7F007F0C3F80FC0C0FC0781E0780601E0180001E0000001E000000 1E0000001E0000001E0000000C00001A1D7C9E23>3 D E /Fr 134[50 2[50 1[28 39 33 2[50 50 1[28 50 1[28 50 2[44 50 44 1[44 7[72 3[72 7[89 6[55 70[{ TeXBase1Encoding ReEncodeFont }19 100.000000 /Times-Roman rf /Fs 1 14 df<0000000FFF00000000000000FFFFF000 0000000003FFFFFC00000000000FFFFFFF00000000003FF801FFC000000000FF80001FF0 00000001FE000007F800000007F8000001FE0000000FE00000007F0000001F800000001F 8000003F000000000FC000007E0000000007E00000FC0000000003F00001F80000000001 F80001F00000000000F80003E000000000007C0007E000000000007E0007C00000000000 3E000F8000000000001F000F8000000000001F001F0000000000000F801F000000000000 0F803E00000000000007C03E00000000000007C03C00000000000003C07C000000000000 03E07C00000000000003E07800000000000001E07800000000000001E0F8000000000000 01F0F800000000000001F0F000000000000000F0F000000000000000F0F0000000000000 00F0F000000000000000F0F000000000000000F0F000000000000000F0F0000000000000 00F0F000000000000000F0F000000000000000F0F800000000000001F0F8000000000000 01F07800000000000001E07800000000000001E07C00000000000003E07C000000000000 03E03C00000000000003C03E00000000000007C03E00000000000007C01F000000000000 0F801F0000000000000F800F8000000000001F000F8000000000001F0007C00000000000 3E0007E000000000007E0003E000000000007C0001F00000000000F80001F80000000001 F80000FC0000000003F000007E0000000007E000003F000000000FC000001F800000001F 8000000FE00000007F00000007F8000001FE00000001FE000007F800000000FF80001FF0 000000003FF801FFC0000000000FFFFFFF000000000003FFFFFC000000000000FFFFF000 00000000000FFF0000000044477CB54D>13 D E /Ft 173[40 82[{ TeXBase1Encoding ReEncodeFont }1 59.999973 /Times-Roman rf /Fu 134[72 3[72 40 56 3[72 72 112 3[40 72 72 1[64 2[72 10[135 3[80 96 16[104 65[{ TeXBase1Encoding ReEncodeFont }16 144.000000 /Times-Roman rf end %%EndProlog %%BeginSetup %%Feature: *Resolution 600dpi TeXDict begin %%PaperSize: Letter %%EndSetup %%Page: 1 1 1 0 bop 837 296 a Fu(Running)34 b(the)i(SAS)1862 229 y Ft(R)1843 231 y Fs(\015)1954 296 y Fu(System)f(on)g(the)g(W)-11 b(eb)1605 537 y Fr(Michael)25 b(Friendly)2295 500 y Fq(\003)1632 653 y Fr(Y)-11 b(ork)25 b(Uni)n(v)o(ersity)-180 978 y Fp(Abstract)-180 1166 y Fo(At)d(the)f(most)g(basic)h(le)n(v)o(el)e(the) i(WWW)g(pro)o(vides)e(the)h(means)g(to)g(share)-180 1266 y(SAS)36 b(datasets,)j(programs,)e(macros,)h(etc.)70 b(using)34 b(a)i(more)e(con)m(v)o(e-)-180 1365 y(nient)17 b(interf)o(ace)f(than)h(w)o(as)h(pro)o(vided)d(for)i(these)g(functions) f(pre)n(viously)-180 1465 y(by)28 b(other)g(internet)h(protocols)e (\(FTP)-9 b(,)29 b(email,)h(listserv)o(es,)i(discussion)-180 1564 y(groups\).)49 b(And,)30 b(starting)e(with)h(SAS)h(6.11,)f(SAS)h (itself)f(can)f(access)-180 1664 y(remote)23 b(datasets)h(and)f (\002les)i(using)e(the)g(WWW)-5 b(-based)24 b(URL)g(method)-180 1764 y(pro)o(vided)d(by)i(the)g(\002lename)g(statement.)34 b(But)24 b(what)f(possibilities)h(e)o(x-)-180 1863 y(ist)h(for)e (connecting)f(SAS)j(more)e(directly)h(to)g(the)g(web,)g(and)g(ho)n(w)f (can)-180 1963 y(these)d(possibilities)h(be)f(e)o(xplored?)-97 2064 y(This)32 b(paper)e(describes)h(some)g(of)g(my)g(e)o(xperiments)f (and)h(e)o(xperi-)-180 2163 y(ences)16 b(which)g(e)o(xplore)e(possible) i(forms)g(of)g(interaction)f(between)g(SAS)-180 2263 y(and)20 b(the)g(W)-7 b(orld)20 b(W)m(ide)g(W)-7 b(eb,)21 b(including)-97 2432 y Fn(\017)41 b Fo(writing)24 b(custom)f(CGI)i (scripts)f(for)g(statistical)h(and)f(graphic)e(ap-)-14 2532 y(plications)-97 2631 y Fn(\017)41 b Fo(a)21 b(general)e (SAS\226web)h(CGI)g(gate)n(w)o(ay)-97 2731 y Fn(\017)41 b Fo(serving)19 b(SAS)i(programs)e(intelligently)g(to)h(remote)f(users) -180 3017 y Fp(1)119 b(Intr)n(oduction)-180 3205 y Fo(Se)n(v)o(eral)21 b(years)h(ago)f(I)i(be)o(gan)d(to)i(con)m(v)o(ert)e(SAS-related)h (course)g(mate-)-180 3304 y(rials)c(for)f(se)n(v)o(eral)g(courses)g (\([1)n(],)i([2)o(]\))e(from)f(a)i(mainframe)e(to)h(a)h(No)o(v)o(ell-) -180 3404 y(based)h(PC)i(lab)m(.)k(Course)19 b(documents)e(were)i(con)m (v)o(erted)d(to)j(HTML)g(and)-180 3504 y(link)o(ed)g(to)i(SAS)g (\002les)g(on)f(the)g(serv)o(er)-5 b(.)-97 3604 y(Although)17 b(this)i(had)f(man)o(y)f(bene\002cial)h(ef)n(fects,)g(it)h(created)f (tw)o(o)h(dis-)-180 3704 y(connected)c(en)m(vironments)e(for)j(the)h (students')f(w)o(ork:)22 b(the)o(y)16 b(could)g(read)-180 3804 y(course)29 b(materials)g(and)g(the)g(link)o(ed)g(SAS)h(\002les)g (with)g(Netscape,)h(b)n(ut)-180 3903 y(had)25 b(to)h(use)f(cut/paste)h (or)f(\002nd)g(the)h(\002les)g(on)f(the)h(local)f(\002lesystem)h(to) -180 4003 y(run)19 b(them)f(with)i(SAS.)g(So,)f(it)h(made)f(some)g (sense)h(to)f(look)g(for)f(w)o(ays)i(to)-180 4102 y(connect)f(SAS)i (programs)d(more)i(dynamically)e(to)i(web)g(documents.)-180 4346 y Fm(Ser)o(v)o(er)l(-side)27 b(vs.)j(Client-side)25 b(SAS)h(pr)n(ocessing)-180 4504 y Fo(The)c(client-serv)o(er)f(model)h (pro)o(vides)f(for)h(processing)g(to)g(be)h(split)g(co-)-180 4603 y(operati)n(v)o(ely)16 b(between)i(a)h(local)f(machine)g(and)g(a)g (remote)g(host;)h(ideally)-5 b(,)-180 4703 y(each)20 b(machine)f(is)i(dele)o(gated)d(those)i(parts)g(of)g(the)h(task)f(it)h (can)f(pro)o(vide)-180 4803 y(most)25 b(readily)-5 b(.)38 b(SAS)26 b(processing)d(can)i(be)g(carried)f(out)h(either)f(on)h(the) -180 4902 y(client')-5 b(s)16 b(local)g(machine)f(\(using)h(either)f (the)h(SAS-supplied)f(Plugin)h(for)-180 5002 y(Netscape)26 b(or)g(MSIE,)f(or)h(by)g(de\002ning)e(SAS)j(as)g(a)f(\223helper)f (App\224)h(for)-180 5101 y(your)16 b(bro)n(wser\),)g(or)h(on)f(the)h (serv)o(er)g(by)f(use)i(of)e(CGI)i(scripts.)24 b(Lik)o(e)n(wise,)-180 5201 y(data)f(resources)f(and)h(SAS)h(programs)d(can)i(be)g(located)f (an)o(ywhere)f(on)p -180 5276 836 4 v -96 5330 a Fl(\003)-60 5353 y Fk(Author')l(s)57 b(address:)102 b(Psychology)59 b(Dept.,)66 b(Y)-7 b(ork)57 b(Uni)n(v)o(ersity)l(,)68 b(T)-5 b(oronto,)-180 5432 y(ON,)44 b(Canada)j(M3J)d(1P3.)105 b(email:)78 b Fj(friendly@yorku.ca)42 b Fk(home)k(page:)-180 5511 y Fj(www.math.yorku.ca/SCS/friendly.html)1992 978 y Fo(the)26 b(netw)o(ork.)44 b(The)27 b(trick)g(is)g(to)h(connect)d (them)i(together)e(so)j(\223it)f(just)1992 1078 y(w)o(orks\224.)1992 1369 y Fp(2)119 b(Ser)o(v)o(er)l(-side:)d(Running)71 b(SAS)g(fr)n(om)d(a)2171 1518 y(CGI)30 b(script)1992 1707 y Fo(W)-7 b(eb)30 b(bro)n(wsers)g(can)f(be)h(allo)n(wed)g(to)g (mak)o(e)g(use)g(of)g(the)g(computing)1992 1807 y(po)n(wer)m(,)24 b(programs,)g(or)h(data)g(pro)o(vided)e(by)h(a)i(serv)o(er)e(by)g (setting)i(up)e(a)1992 1906 y(CGI)i(script)f(on)g(the)h(serv)o(er)-5 b(.)40 b(The)26 b(CGI)g(script)f(is)i(simply)e(a)h(program)1992 2006 y(running)g(on)j(the)g(serv)o(er)f(which)g(recei)n(v)o(es)g(a)i (request)e(from)g(the)h(web)1992 2106 y(serv)o(er)m(,)18 b(runs)i(a)g(SAS)h(process)e(to)h(meet)g(that)g(request,)f(and)h (returns)f(the)1992 2205 y(results)27 b(to)h(the)f(web)g(serv)o(er)-5 b(.)47 b(The)27 b(web)g(serv)o(er)m(,)h(in)f(turn,)h(passes)h(the)1992 2305 y(results)20 b(back)g(to)g(the)g(bro)n(wser)f(lik)o(e)i(an)o(y)e (other)g(HTML)h(information.)2075 2398 y(In)h(the)h(simplest)g(case,)h (the)e(CGI)i(script)f(is)g(a)h(Unix)e(shell)h(script)g(\(or)1992 2489 y(other)c(e)o(x)o(ecutable)g(program\))f(which)i(passes)i(the)e (request)g(to)h(the)g(SAS)1992 2581 y(program)e(via)i(standard)f (input,)1992 2746 y Fi(#!/bin/sh)1992 2837 y(sas)44 b(-stdio)g(<)g (myWebApp.sas)f(>)i(myWebApp.lst)1992 2929 y(cat)f(myWebApp.lst)2075 3100 y Fo(This)36 b(method,)i(\002rst)e(illustrated)g(by)f(Larry)g(Ho)o (yle)h(\([3)o(],[4)n(]\))g(re-)1992 3200 y(quires)24 b(v)o(ery)g(little)i(in)g(the)f(w)o(ay)g(of)g(Shell)h(programming,)c(b) n(ut)k(places)1992 3300 y(the)e(b)n(urden)e(of)i(parsing)f(the)h (peculiar)f(format)g(in)h(which)f(the)h(request)1992 3399 y(is)d(sent)f(by)g(the)g(bro)n(wser)f(on)h(the)g(SAS)h(program.) 1992 3647 y Fm(P)n(erl)j(CGI)h(scripts)1992 3807 y Fo(Ov)o(er)16 b(the)i(last)h(year)e(I)h(wrote)f(se)n(v)o(eral)g(custom)g(CGI)h (programs)e(in)i(Perl.)1992 3906 y(Perl)f(is)h(particularly)d(attracti) n(v)o(e)h(for)h(CGI)g(scripts)g(because)g(of)f(its)i(po)n(w-)1992 4006 y(erful)h(parsing)g(and)g(pattern-matching)e(e)o(xpressions,)h (strong)h(security)1992 4105 y(features,)32 b(and)e(because)g(a)h(lar)o (ge)f(library)f(of)i(object-oriented)d(mod-)1992 4205 y(ules)23 b(for)g(WWW)i(applications)d(is)i(a)n(v)n(ailable)f(with)h (the)f(standard)f(dis-)1992 4305 y(trib)n(ution)14 b(or)i(on)f(the)h (CP)-8 b(AN)17 b(ftp)f(sites)g(\(e.g.,)g Fh(ftp://ftp.funet.)1992 4404 y(fi/pub/languages/perl/CPAN/)p Fo(\).)73 b(I)38 b(particularly)e(rec-)1992 4504 y(ommend)21 b(Lincoln)i(Stein')-5 b(s)24 b Fh(CGI.pm)f Fo(\(v)o(ersion)f(2.3)h(or)g(later\))g(which)1992 4604 y(handles)c(most)h(of)g(the)g(details)h(of)f(CGI)g(processing.) 1992 4852 y Fm(W)-6 b(ebP)n(o)o(wer)1992 5011 y Fo(Determining)15 b(the)i(sample)g(size)g(for)g(a)g(f)o(actor)f(or)h(ef)n(fect)g(in)g(an) g(ANO)l(V)-11 b(A)1992 5111 y(design)22 b(is)j(usually)e(dif)n (\002cult)f(because)h(of)g(the)h(need)f(to)g(specify)g Fg(all)h Fo(of)1992 5210 y(the)c(treatment)f(means)i(in)f(order)f(to)i (calculate)f(the)g(non-centrality)e(pa-)1992 5310 y(rameter)h(of)h(the) g(F-distrib)n(ution,)e(on)i(which)g(po)n(wer)f(depends.)2075 5411 y(The)26 b(W)-7 b(ebPo)n(wer)26 b(form)g(\()p Fh (http://www.math.yorku.ca/)1992 5511 y(SCS/Online/power/)p Fo(\))21 b(runs)j(a)g(SAS)h(program)d(that)j(calculates)1929 5760 y(1)p eop %%Page: 2 2 2 1 bop -180 30 a Fo(po)n(wer)28 b(or)h(sample)f(size)i(needed)e(to)h (attain)g(a)h(gi)n(v)o(en)d(po)n(wer)h(for)h(one)-180 130 y(ef)n(fect)24 b(in)h(a)g(f)o(actorial)f(ANO)l(V)-11 b(A)24 b(design.)37 b(The)24 b(program)f(is)i(based)f(on)-180 229 y(specifying)29 b(the)j(range)e(of)g(treatment)g(means,)k(and)c (calculating)g(the)-180 329 y(minimum)19 b(po)n(wer)m(,)f(or)i(maximum) f(required)f(sample)i(size.)-97 430 y(The)31 b(form)g(in)m(v)n(ok)o(es) f(the)h(perl)h(CGI)f(script,)k Fh(power.pl)p Fo(,)e(which)-180 529 y(parses)h(the)h(request)f(parameters,)i(writes)f(a)g(temporary)d (SAS)j(pro-)-180 629 y(gram,)22 b(runs)h(that)f(program,)f(and)i (returns)e(the)i(listing)g(\002le)h(to)e(the)h(web)-180 728 y(bro)n(wser)-5 b(.)-97 821 y(The)59 b(SAS)i(program)c(itself)j (simply)g(calls)g(a)g(SAS)g(macro,)-180 912 y Fh(fpower.sas)p Fo(,)21 b(with)i(the)f(user')-5 b(s)23 b(input)f(v)n(alues)g (substituted)g(for)f(')p Fh($)p Fo(')-180 1003 y(v)n(ariables)e Fh($a)p Fo(,)i Fh($b)p Fo(,)f Fh($delta)p Fo(,)f Fh($alpha)p Fo(,)g(and)h Fh($out)p Fo(:)-180 1164 y Fi(options)44 b(nodate)f(nocenter)h(nonumber;)-180 1256 y(title)g('Power)g(analysis)f (for)i(ANOVA)f(designs';)-180 1347 y(\045include)f("$power";)-180 1438 y(\045fpower\(a=$a,)g(b=$b,)h(delta=\045str\($delta\),)-1 1530 y(alpha=$alpha,)f($out\);)-97 1698 y Fh(power.pl)24 b Fo(uses)i(one)f(of)g(the)g(standard)f(Perl)i(CGI)g(utility)f(pack-) -180 1798 y(ages)40 b(to)f(parse)h(the)f(request)g(parameters)f(passed) i(to)f(it)i(from)d(the)-180 1897 y(form.)48 b(It)28 b(does)g(some)g (rudimentary)e(error)h(checking)f(to)i(mak)o(e)g(sure)-180 1997 y(that)c(the)g(request)g(parameters)f(are)h(v)n(alid,)g(and)g (checks)g(that)g(the)g(SAS)-180 2097 y(program)37 b(ran)i(correctly)-5 b(,)42 b(producing)36 b(a)k(listing)f(\002le)h(with)f(the)g(re-)-180 2196 y(sults.)58 b(The)31 b(output)f(is)i(returned)d(as)j (pre-formatted)c(te)o(xt)j(\(wrapped)-180 2296 y(in)19 b Fh(
)p Ff(:)14 b(:)g(:)o Fh()k Fo(tags\),)h(b)n(ut)g(it)g (w)o(ould)f(be)h(easy)g(enough)e(to)i(use)-180 2396 y(a)e(SAS)g(macro)f (to)h(return)e(the)i(output)e(in)i(the)g(form)e(of)h(an)h(HTML)f (table.)-97 2496 y(Although)22 b(the)i(SAS)h(program)c(is)k(quite)f (simple)g(and)f Fh(power.pl)-180 2596 y Fo(uses)29 b(the)g(Perl)g(CGI)g (package,)g(error)e(trapping)g(and)h(formatting)f(the)-180 2695 y(query)17 b(parameters)g(for)h(insertion)g(in)g(the)h(program)d (template)i(did)g(tak)o(e)-180 2795 y(some)i(additional)f(ef)n(fort.) -180 3037 y Fm(Sie)o(v)o(e)25 b(Diagrams)-180 3195 y Fo(A)42 b(second)e(web)h(application)f(\()p Fh(http://www.math.yorku.) -180 3294 y(ca/SCS/Online/sieve)p Fo(\))g(pro)o(vides)i(a)h(web)h (interf)o(ace)e(to)i(a)-180 3394 y(SAS/IML)29 b(program)d(to)j(dra)o(w) e(sie)n(v)o(e)i(diagrams)e(for)h(data)h(in)f(a)h(tw)o(o-)-180 3493 y(w)o(ay)d(contingenc)o(y)d(table.)43 b(The)26 b(CGI)h(script,)g Fh(sieve.pl)p Fo(,)g(w)o(as)f(de-)-180 3593 y(signed)20 b(to:)-97 3762 y Fn(\017)41 b Fo(print)20 b(the)g(initial)g(HTML)g (form,)-97 3861 y Fn(\017)41 b Fo(retrie)n(v)o(e)23 b(the)h(input)g (parameters)f(\(ro)n(w)g(and)h(column)f(labels)i(and)-14 3961 y(the)20 b(frequenc)o(y)e(table\),)-97 4060 y Fn(\017)41 b Fo(write)26 b(a)g(SAS)g(program,)f(interpolating)e(the)j(user')-5 b(s)26 b(data)f(into)h(a)-14 4160 y(template,)-97 4260 y Fn(\017)41 b Fo(run)18 b(the)h(program,)e(producing)f(either)i(a)h (PostScript)g(or)g(GIF)g(\002le,)-97 4359 y Fn(\017)41 b Fo(return)21 b(the)g(image)h(to)g(the)f(bro)n(wser)m(,)g(together)f (with)i(links)g(to)g(the)-14 4459 y(SAS)f(program)d(and)i(the)g(output) f(listing)h(\002le.)-180 4619 y(The)f(program)d(template)j(again)f (looks)g(quite)h(simple)g(\(although)e(a)i(f)o(air)-180 4711 y(bit)29 b(of)g(ef)n(fort)f(in)h(the)g(script)f(w)o(as)i(de)n(v)n (oted)e(to)h(massaging)f(the)h(input)-180 4802 y(from)19 b(the)h(form)g(to)g(be)g(syntactically)f(correct)h(in)g(SAS/IML\):)-180 4963 y Fi(\045let)44 b(gsasfile=)f(\045sysget\(GSASFILE\);)-180 5054 y(\045let)h(title)134 b(=)44 b(\045sysget\(TITLE\);)-180 5146 y(\045let)g(data)179 b(=)44 b(\045sysget\(DATA\);)-180 5237 y(filename)f(gsasfile)89 b("&gsasfile";)-180 5328 y(goptions)43 b(device=pscolor)-46 5420 y(gsfname=gsasfile)g (gsfmode=replace;)-180 5511 y(title)h("&title";)1992 30 y(proc)g(iml;)2126 122 y(\045include)f("$sieve";)2126 213 y(f)i(=)f({)h($data)f(};)2126 304 y(vnames)g(=)g({)h($var)f(};)2126 396 y(lnames)g(=)g({)h($lab)f(};)2126 487 y(title)g(=)h('$title')e(;) 2126 578 y(font)h(=)h('$font';)2126 669 y(run)f(sieve\(f,)g(vnames,)f (lnames,)h(title)g(\);)2126 761 y(quit;)1992 896 y Fo(Note)22 b(again)f(that)h(all)h(the)f(')p Fh($)p Fo(')g(names)f(are)h(Perl)h(v)n (ariables)e(whose)h(v)n(al-)1992 996 y(ues)16 b(are)g(substituted)f (when)g(the)h(SAS)h(\002le)g(is)g(written.)23 b(Ho)n(we)n(v)o(er)m(,)15 b(some)1992 1095 y(parameters)28 b(in)i(the)g(program)e(\()p Fh(GSASFILE)p Fo(,)g Fh(TITLE)p Fo(,)i(and)f Fh(DATA)p Fo(\))1992 1195 y(are)16 b(passed)h(in)g(the)g(en)m(vironment,)e(then)h (retrie)n(v)o(ed)f(to)i(macro)f(v)n(ariables)1992 1295 y(using)j(the)h Fh(\045sysget\(\))f Fo(function.)2075 1394 y(Writing\227and)e(deb)n(ugging\227)p Fh(sieve.pl)p Fo(,)d(ho)n(we)n(v)o(er)m(,)i(con)m(vinced)1992 1494 y(me)29 b(that)g(there)f(ought)g(to)h(be)g(a)g(better)g(w)o(ay)-5 b(,)30 b(so)g(I)f(wrote)g(a)g(general-)1992 1593 y(purpose)18 b(program)g(to)i(connect)f Fg(any)h Fo(SAS)h(program)d(to)i(a)h(web)f (form.)1992 1867 y Fp(3)119 b Fe(sascgi)p Fp(:)35 b(a)30 b(SAS-WWW)f(gateway)1992 2052 y Fh(sascgi)h Fo(is)i(a)f(Perl)g(CGI)g (script)g(designed)f(to)h(pro)o(vide)d(a)k(gate)n(w)o(ay)1992 2152 y(between)18 b(a)h(web)g(serv)o(er)f(and)g(a)h(SAS)h(program)d (which)h(returns)g(results)1992 2252 y(to)27 b(the)h(web)f(bro)n(wser) -5 b(.)46 b(My)27 b(intention)g(w)o(as)h(to)f(pro)o(vide)f(a)i(relati)n (v)o(ely)1992 2351 y(uncluttered,)e(general)f(protocol)g(for)h(running) f(SAS)i(on)g(the)f(web,)i(so)1992 2451 y(that)j(the)g(SAS)g (application)f(can)h(be)f(made)h(as)g(simple)g(as)h(possible,)1992 2550 y(and)26 b(a)h(single)f(script)h(could)f(serv)o(e)g(a)h(wide)g(v)n (ariety)f(of)g(applications.)1992 2650 y(The)21 b(script)i(handles)e (most)h(of)g(the)g(interaction)f(with)i(the)f(web)g(serv)o(er)m(,)1992 2750 y(making)i(it)i(much)f(easier)h(to)g(write)g(SAS)h(applications)d (to)i(be)g(run)f(on)1992 2849 y(the)20 b(web)m(.)2075 2949 y(It)32 b(w)o(orks)g(lik)o(e)h(this.)61 b(Y)-9 b(ou)32 b(ha)n(v)o(e)g(a)g(SAS)h(application)e(you)g(w)o(ant)1992 3049 y(to)e(mak)o(e)f(accessible)i(to)f(users)g(on)g(the)g(web)m(.)51 b(That)29 b(application)f(re-)1992 3148 y(quires)16 b(some)g(input)g (from)g(the)h(user)m(,)g(to)g(select)g(records)f(or)g(v)n(ariables)g (to)1992 3248 y(be)23 b(processed,)g(or)g(to)h(set)h(parameters)d(for)h (some)g(computation.)33 b(Y)-9 b(ou)1992 3347 y(write)24 b(an)h(HTML)f(form)g(in)g(which)g(the)h(user)f(can)h(enter)f(the)g (required)1992 3447 y(information.)45 b(When)28 b(the)g(user)g(presses) g(the)g(SUBMIT)g(b)n(utton,)h(the)1992 3547 y(bro)n(wser)d(calls)i Fh(sascgi)p Fo(,)h(passing)e(the)g(parameters)f(de\002ned)h(in)h(the) 1992 3646 y(form;)19 b Fh(sascgi)h Fo(retrie)n(v)o(es)g(the)h (parameters,)e(runs)h(SAS,)h(and)f(returns)1992 3746 y(the)g(results)g(to)h(the)f(user)-5 b(.)2075 3846 y(The)26 b(script)g(passes)i(input)d(parameters)h(to)g(the)h(SAS)g(program)e (via)1992 3945 y(the)16 b(en)m(vironment,)e(which)i(is)h(much)f(easier) g(than)g(trying)g(to)g(parse)h(stdin)1992 4045 y(in)22 b(SAS.)g(The)g(SAS)h(program)d(is)j(assumed)f(to)g(retrie)n(v)o(e)f (these)h(param-)1992 4144 y(eters)32 b(via)f Fh(\045sysget\(PARAM\))p Fo(,)f(or)i Fh(sysget\('PARAM'\))d Fo(in)j(a)1992 4244 y(data)24 b(step.)40 b(The)25 b(SAS)h(program)d(can)i(return)f(results) h(to)h(the)f(bro)n(wser)1992 4344 y(by)19 b(one)h(of)g(three)g (methods:)2075 4479 y Fn(\017)41 b Fo(Printing)20 b(to)h(standard)e (output)h(\(STDOUT\))g(from)g(a)h(D)m(A)-9 b(T)h(A)21 b(step)2158 4579 y(or)e(via)i(PR)m(OC)g(PRINT)o(O)2075 4678 y Fn(\017)41 b Fo(Printing)19 b(to)h(a)h(listing)f(\002le)2075 4778 y Fn(\017)41 b Fo(Producing)24 b(one)i(or)g(more)f(graphic)g (output)h(\002les)h(in)g(PostScript)2158 4878 y(or)19 b(GIF)i(format.)2075 5013 y(The)f(SAS)i(program)c(can)j(communicate)e (success)i(or)g(f)o(ailure)f(\(with)1992 5112 y(an)27 b(error)g(message\))g(by)g(writing)h(a)g(message)f(to)h(a)g Fh(.err)g Fo(\002le)g(or)g(by)1992 5212 y(returning)18 b(a)i(message)g(starting)g(with)g('ERR)m(OR:')h(to)f(STDOUT)-6 b(.)2075 5312 y(The)28 b(script)g(is)h(used)g(in)f(an)h(HTML)f (document)e(by)i(embedding)e(a)1992 5411 y Fh()-180 1231 y Fo(The)d Fh()f Fo(tags)h(de\002ne)g(names)f(of)h(parameters)f(which)g (are)-180 1330 y(passed)19 b(to)h(the)g(SAS)g(program.)i(Use)e Fh(type="hidden")e Fo(when)h(you)-180 1430 y(don')o(t)28 b(w)o(ant)i(the)h(user)e(to)i(select)f(or)g(change)f(the)h(v)n(alue;)k (otherwise,)-180 1530 y(you)19 b(can)h(use)h Fg(any)e Fo(form)g(element)h(which)g(generates)f(a)i(v)n(alue.)-180 1786 y Fm(P)o(arameters)-180 1948 y Fo(All)38 b(query)f(parameters)g (de\002ned)f(in)i(the)g(form)f(are)h(processed)e(by)-180 2047 y Fh(sascgi)p Fo(;)g(ho)n(we)n(v)o(er)m(,)31 b(only)f(those)g (parameters)g(which)g(are)h(gi)n(v)o(en)f(a)-180 2147 y(v)n(alue)19 b(in)g(the)h(form)e(\(by)h(def)o(ault,)f(or)i(entered)e (by)h(the)g(user\))g(are)h(placed)-180 2247 y(in)25 b(the)g(SAS)g(en)m (vironment.)36 b(Fi)n(v)o(e)24 b(form)g(parameters)g(ha)n(v)o(e)g(a)h (special)-180 2346 y(meaning)19 b(to)h Fh(sascgi)p Fo(:)-180 2522 y Fd(SASFILE)43 b Fo(The)22 b(v)n(alue)g(de\002nes)g(the)h(name)f (of)g(the)h(SAS)g(program)e(to)-14 2622 y(be)f(run.)-180 2722 y Fd(TITLE)43 b Fo(The)20 b(v)n(alue)g(is)h(used)f(as)h(a)f(title) h(for)f(the)g(output.)-180 2821 y Fd(OUTPUT)p 171 2821 25 4 v 30 w(METHOD)42 b Fo(The)24 b(v)n(alue)h(tells)h Fh(sascgi)e Fo(ho)n(w)h(the)g(SAS)-14 2921 y(program)18 b(intends)i(to)g(return)f(results.)25 b(Possible)c(v)n(alues)f(are:)86 3060 y Fn(\017)41 b Fh(STDOUT)18 b Fo(assumes)h(the)g(SAS)h(program)d (produces)g(output)169 3160 y(which)31 b(can)h(be)f(sent)h(directly)g (to)f(the)h(bro)n(wser)m(,)h(e.g.,)h(as)169 3260 y(wrapped)14 b(with)i(HTML)g(tags)h(lik)o(e)f Fh(
)p Ff(:)e(:)g(:)o Fh()h Fo(or)169 3359 y Fh(
)p Ff(:)14 b(:)g(:)o Fh()36 b Fo(by)h Fh(sascgi)p Fo(,)i(formfeeds)c(are)169 3658 y(translated)20 b(to)g(a)h(horizontal)e(rule)h(\()p Fh(
";)2564 1447 y(...)h(\(output)e(results\))h(...)2475 1538 y(put)g("";)2340 1670 y Fo(My)25 b Fh(\045htmltab)g Fo(macro)f(can)h(also)h(be)f(used)g(to)h(produce)2340 1769 y(output)f(to)h Fh(STDOUT)f Fo(containing)f(either)i(a)g (preformatted)2340 1869 y(printout)19 b(or)h(an)g(HTML)g(table)g(from)f (a)i(SAS)g(dataset.)2257 1969 y Fn(\017)41 b Fo(F)o(or)17 b Fh(OUTPUT_METHOD)47 b(=)j(IMAGE)p Fo(,)16 b(obtain)g(the)h(name)2340 2068 y(of)25 b(the)f Fh(GSASFILE)g Fo(from)g(the)h(en)m(vironment,)d (and)i(use)h(a)2340 2168 y Fh(GOPTIONS)e Fo(statement)h(with)g Fh(GSFNAME=)f Fo(referring)e(to)2340 2268 y(this)g(\002leref:)2340 2406 y Fi(*--)45 b(Retrieve)e(output)h(file)g(name;)2340 2498 y(\045let)g(gsasfile)g(=)h(\045sysget\(GSASFILE\);)2340 2589 y(filename)f(gsasfile)88 b("&gsasfile";)2340 2772 y(*--)45 b(Device)e(options;)2340 2863 y(goptions)h(device=pscolor)2475 2954 y(gsfname=gsasfile)e(gsfmode=replace;)1992 3191 y Fm(\045include)25 b(\002les)1992 3338 y Fo(If)e(your)f(application)g (uses)i(\002les,)g(dataset,)g(or)g(macros,)f(you)f(can)h(sim-)1992 3430 y(plify)31 b(your)f(applications)g(by)i(de\002ning)e(an)i (autocall)f(library)-5 b(,)33 b(or)e(by)1992 3521 y(appropriate)d Fh(filename)j Fo(statements)g(in)h(the)f Fh(config.sas)f Fo(\002le)1992 3612 y(which)15 b(is)i(used)f(by)g Fh(sascgi)p Fo(.)23 b(F)o(or)16 b(e)o(xample,)f(if)i(your)e Fh(config.sas)1992 3704 y Fo(contains)1992 3857 y Fi(filename)43 b(macros)2126 3949 y(\('\230web/sasuser/macros',)2126 4040 y (\('\230web/sasuser/webmacros'\);)1992 4193 y Fo(an)20 b(application)e(could)i(use)1992 4347 y Fi(\045include)43 b(macros\(htmltab\);)2075 4509 y Fo(Alternati)n(v)o(ely)-5 b(,)20 b(specify)h(the)h(full)g(pathname)f(to)h(the)g(\002le)h(on)f (the)g(in-)1992 4608 y(clude)d(statement.)1992 4845 y Fm(T)-9 b(esting)25 b(y)n(our)f(application)1992 4992 y Fo(Y)-9 b(ou)21 b(should)g(be)h(able)g(to)g(test)g(your)f (application)g(from)g(the)h(command)1992 5084 y(line)k(by)h(itself,)h (by)e(placing)g(an)o(y)g(required)f(parameters)g(in)i(the)g(en)m(vi-) 1992 5175 y(ronment:)1992 5328 y Fi(>setenv)43 b(LISTS)h(1)1992 5420 y(>setenv)f(ITEMS)h(20)1992 5511 y(>sas)g(getlist)1929 5760 y Fo(3)p eop %%Page: 4 4 4 3 bop -97 30 a Fh(sascgi)19 b Fo(is)h(also)g(designed)e(so)i(that)g (it)g(can)f(be)g(run)g(from)f(the)i(com-)-180 122 y(mand)f(line)i(for)e (deb)n(ugging,)e(e.g.,)-180 273 y Fi(>setenv)44 b(DEBUG)g(1)-180 364 y(>./sascgi)f('SASFILE=getlist.sas&LISTS=1&ITEMS=20')-180 524 y Fo(The)33 b(parameters)e Fh(OUTPUT_METHOD)p Fo(,)g Fh(SASFILE)p Fo(,)h Fh(TITLE)p Fo(,)h(and)-180 624 y Fh(DEBUG)22 b Fo(may)h(all)g(be)g(passed)g(to)g(this)g(script)g(via)g (the)f(form)g(or)h(the)f(en-)-180 723 y(vironment.)-97 823 y(Se)n(v)o(eral)i(w)o(orking)f(e)o(xamples,)h(along)g(with)h (source)f(code)g(and)g(fur)n(-)-180 923 y(ther)18 b(e)o(xplanation)d (are)j(a)n(v)n(ailable)g(online)f(at)h Fh(http://www.math.)-180 1022 y(yorku.ca/SCS/Online/sascgi)p Fo(.)-180 1242 y Fd(Enhancements)-180 1398 y Fh(sascgi)i Fo(can)g(be)g(enhanced)e(in)i (se)n(v)o(eral)g(w)o(ays:)-97 1558 y Fn(\017)41 b Fo(The)22 b(SAS)i(program)c(can)j(be)f(run)g(on)g(a)h(separate)f(serv)o(er)g (\(which)-14 1657 y(may)42 b(ha)n(v)o(e)g(more)f(data)h(or)g (processing)f(resources\).)90 b(On)43 b(a)-14 1757 y(Unix)e(system,)47 b(this)42 b(can)g(be)f(done)g(just)h(by)f(in)m(v)n(oking)e(SAS)-14 1856 y(through)14 b Fh(rsh)50 b($sas_server)d(sas)j($sasfile)15 b Fo(instead)-14 1956 y(of)20 b Fh(sas)49 b($sasfile)p Fo(.)-97 2056 y Fn(\017)41 b Fo(Con\002guration)29 b(information)g (\(serv)o(er)h(name,)j(program)c(paths,)-14 2155 y(etc.\))c(is)20 b(presently)e(contained)g(in)h Fh(sascgi)g Fo(itself,)h(and)f(must)g (be)-14 2255 y(modi\002ed)g(for)g(each)g(serv)o(er)-5 b(.)25 b(Pro)o(viding)18 b(a)i Fh(CONFIG)f Fo(v)n(ariable)g(in)-14 2355 y(the)k(form)g(w)o(ould)f(allo)n(w)i(the)f(con\002guration)e (information)g(to)i(be)-14 2454 y(read)f(from)f(a)i(separate)f(\002le,) h(and)f(w)o(ould)f(allo)n(w)i(se)n(v)o(eral)e(con\002g-)-14 2554 y(urations)e(to)i(be)f(used)g(at)g(one)g(site.)-97 2653 y Fn(\017)41 b Fo(Most)16 b(web)f(applications)f(require)g(only)h (a)g(relati)n(v)o(ely)f(small)i(num-)-14 2753 y(ber)35 b(of)g(user)n(-speci\002ed)f(parameters.)69 b Fh(sascgi)35 b Fo(does)g(not)g(at)-14 2853 y(present)23 b(pro)o(vide)f(the)i (ability)g(for)f(the)h(user)g(to)g(supply)f(an)h(input)-14 2952 y(dataset)j(to)f(be)h(analyzed.)42 b(This)27 b(can)f(be)g(done)g (by)g(making)f(use)-14 3052 y(of)19 b(the)g(\002le)h(upload)e(f)o (acilities)i(in)f(bro)n(wsers)f(\(which)h(are)g(handled)-14 3152 y(by)h(the)g Fh(CGI.pm)f Fo(code\),)g(or)g(by)h(SAS)h(itself,)f (using)g(the)g(URL)g(or)-14 3251 y(FTP)h(methods)e(pro)o(vided)f(by)h (the)i Fh(filename)e Fo(statement.)-180 3530 y Fp(4)119 b(Ser)o(v)o(er)l(-based)30 b(CGI:)g(PHP/FI)-180 3716 y Fo(An)43 b(alternati)n(v)o(e)f(to)h(using)f(custom)g(CGI)i(scripts,) 49 b(or)42 b(a)i(general-)-180 3815 y(purpose)32 b(script)i(lik)o(e)f Fh(sascgi)h Fo(is)g(to)g(embed)e(script-handling)f(ca-)-180 3915 y(pabilities)26 b(into)g(HTML)g(documents)f(in)h(the)g(manner)f (of)h(serv)o(er)n(-side)-180 4014 y(includes)31 b(or)g(Ja)n(v)n (aScript.)59 b(PHP/FI)32 b(\()p Fh(http://www.vex.net/)-180 4114 y(php/)p Fo(\))27 b(is)h(one)f(public-domain)e(package)h(which)h (can)g(be)g(compiled)-180 4214 y(into)c(the)f(Apache)g Fh(httpd)h Fo(serv)o(er)f(as)h(an)g(e)o(xtension)f(module.)31 b(When)-180 4313 y(installed,)f(all)e(pages)g(with)g(the)g(e)o (xtension)e Fh(.phtml)h Fo(are)h(automati-)-180 4413 y(cally)20 b(parsed)g(for)f(PHP)i(commands.)-97 4513 y(This)h(is)i(more)d(con)m(v)o(enient)e(\(the)j(script)h(is)g(part)f (of)f(the)i(document\),)-180 4612 y(more)j(ef)n(\002cient)h(\(no)g (need)f(to)i(fork)e(an)h(additional)f(CGI)i(process)f(for)-180 4712 y(each)f(use\),)i(and)e(also)h(more)f(secure)h(\(security)e(is)j (controlled)d(by)h(the)-180 4811 y(same)20 b(access)h(restrictions)f (used)g(by)g(the)g(serv)o(er)f(itself\).)-97 4903 y(F)o(or)j(e)o (xample,)g(here)g(is)h(a)g(form)f(which)g(allo)n(ws)h(a)g(user)f(to)h (enter)f(bi-)-180 4994 y(v)n(ariate)e(data)g(for)f(a)i(re)o(gression)e (model:)-180 5146 y Fi()2075 1005 y Fo(The)33 b(form)g(A)m(CTION)g(\002le,)38 b Fh(glm-sas.phtml)32 b Fo(is)i(lik)o(e)g(an)g(or)n(-)1992 1096 y(dinary)27 b(html)h(\002le,)j(e)o(xcept)c(that)i(it)g(contains)f(embedded)e(PHP)k (code,)1992 1187 y(brack)o(eted)23 b(by)i Fh()50 b(...)f(>)26 b Fo(delimiters.)40 b(The)25 b(lines)g(belo)n(w)g(process)1992 1279 y(the)33 b(re)o(gression)f(type)h(\(created)g(in)h(PHP)g(as)g(the) g(v)n(ariable)e Fh($type)p Fo(\))1992 1370 y(v)n(alue.)1992 1522 y Fi()1992 1614 y(
";)-90 396 y(while)g(\($i)g(<)h($n\))f({)44 487 y(Echo)g("\045s";)-180 852 y(>)-180 943 y()-180 1035 y()-180 1200 y Fo(This)29 b(tight)g(inte)o(gration)e(of)h(CGI)i(capabilities)e(with)h(HTML)g (should)-180 1300 y(mak)o(e)38 b(it)i(much)e(easier)h(to)g(de)n(v)o (elop)d(po)n(werful)h(web-based)h(appli-)-180 1399 y(cations.)86 b(All)41 b(of)g(the)f(standard)g(capabilities)g(for)g(which)g(people) -180 1499 y(write)22 b(separate)f(CGI)h(scripts)g(\(form)f(mail,)h (page)f(counters,)f(bro)n(wser)n(-)-180 1599 y(sensiti)n(v)o(e)29 b(responses,)i(etc\))e(are)h(b)n(uilt)f(right)g(in,)j(and)d(the)g (script)g(lan-)-180 1698 y(guage)34 b(is)i(rich)f(enough)e(to)j (support)e(interesting)g(forms)g(of)h(client-)-180 1798 y(serv)o(er)f(interaction.)67 b(PHP)35 b(also)g(pro)o(vides)e(\002le)j (upload)d(capability)-180 1897 y(and)18 b(inte)o(grates)h(a)g(v)n (ariety)f(of)h(database)f(and)g(SQL)i(packages)e(\(mSQL,)-180 1997 y(Postgress95,)26 b(Sybase\),)g(and)g(the)f(GD)h(library)f(for)g (GIF)h(creation.)41 b(It)-180 2097 y(w)o(ould)28 b(not)h(be)g(dif)n (\002cult)f(to)h(add)g(support)e(for)i(SAS)h(datasets)f(or)g(for)-180 2196 y(direct)20 b(communication)d(with)j(the)h(SAS)g(System.)-180 2476 y Fp(5)119 b(Client-side)31 b(SAS)h(pr)n(ocessing)-180 2662 y Fo(Serv)o(er)n(-side)c(SAS)i(processing)e(seems)i(most)g(useful) f(and/or)f(appro-)-180 2762 y(priate)18 b(when:)24 b(\(a\))19 b(the)g(result)g(to)g(be)f(returned)f(to)i(the)g(client)g(is)h(a)f (single)-180 2861 y(\002le)g(such)g(as)h(a)f(table)g(or)f(a)h(graph;)f (\(b\))g(the)h(result)g(is)h(based)e(on)h(datasets)-180 2961 y(which)j(must)g(remain)f(with)i(the)f(serv)o(er;)g(\(c\))g(the)g (serv)o(er)g(can)g(handle)f(a)-180 3060 y(possibly)f(lar)o(ge)f(number) f(of)i(processes)g(being)f(run.)-97 3160 y(Ho)n(we)n(v)o(er)m(,)24 b(when)g(one)g(or)g(more)g(of)g(these)h(conditions)e(is)i(not)g(true,) -180 3260 y(it)c(may)f(be)g(more)g(useful)g(for)f(web-based)g (interaction)g(to)i(run)e(SAS)i(on)-180 3359 y(the)f(client)g(machine.) -180 3597 y Fm(SAS)26 b(Plugin)-180 3744 y Fo(The)18 b(recently)f(released)h(SAS)h(Plugin)f(for)g(W)m(indo)n(ws95)e(\()p Fh(www.sas.)-180 3835 y(com/rnd/web/plugin.html)p Fo(\))39 b(allo)n(ws)k(an)f(HTML)h(\002le)g(to)-180 3927 y(embed)31 b(a)h(reference)f(to)h(a)g(remote)f(SAS)i(program,)g(data)f(set,)j(SAS) -180 4018 y(catalog,)18 b(or)g(output)f(\002le.)25 b(The)17 b(HTML)h Fh(
")g($result[$i];)44 578 y($i++;)-1 669 y(})-46 761 y(Echo)h("