rsubmit; data presidnt; length fname lname $8 party $1 lady1 $10; input fname lname party year_in lady1; datalines; John Kennedy D 1961 Jackie Lyndon Johnson D 1963 LadyBird Richard Nixon R 1969 Pat Gerald Ford R 1974 Betty Jimmy Carter D 1977 Rosalynn Ronald Reagan R 1981 Nancy George Bush R 1989 Barbara Bill Clinton D 1993 Hillary George W Bush R 2002 Laura ; run; proc sql nocheck; create view democrat as select fname,lname,party,lady1 from presidnt where party='D'; quit; endrsubmit; /* Use ODS to create HTML from the output */ filename rsub "rsub.html" mod; filename rsubc "rsubc.html" mod; filename rsubf "rsubf.html" mod; ods html file=rsub; contents=rsubc; frame=rsubf; /* Remote SQL PassThru to SQL view */ proc sql nocheck; connect to remote (server=rmthost); title 'RSPT: Democrats'; select fname,lname,lady1 from connection to remote (select * from democrat); quit; /* mix remote-submitted SQL with client SQL */ title 'RSPT: Republicans'; rsubmit; proc sql nocheck; select fname,lname,lady1 from presidnt where party='R'; quit; endrsubmit; ods html close; /* Use ODS to create a SAS data set */ ods output output="rdata"; rsubmit; proc print data=democrat; run; endrsubmit;