Sample 50668: Display a SAS/GRAPH® image created on a remote host locally using the default image viewer
The sample code on the
Full Code tab illustrates how to display an image created on a remote host locally using SAS/CONNECT, the DOWNLOAD procedure, and the X command.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
The sample code below illustrates how to display an image created on a remote host locally using SAS/CONNECT®, the DOWNLOAD procedure, and the X command.
/* Your remote SIGN ON code will go here */
/* Assign the path to the file on the local host */
filename locref 'c:\grafloc.png';
/* Remote submit the code on the local machine */
rsubmit;
/* Close all ODS Destinations */
ods _all_ close;
/* Open the Lisgint destination */
ods listing;
/* Assign the file path on the remote host */
filename grafout 'c:\remfile.png';
/* Set up the graphics environment to create a */
/* Portable Network Graph (PNG) image on the REMOTE host */
goptions reset=all device=png targetdevice=png gsfname=grafout gsfmode=replace
ftext='Albany AMT' ftitle='Albany AMT/bold'
htext=11pt htitle=14pt;
/* Create the graph */
proc gchart data=sashelp.cars;
pie Make;
where MSRP <= 15000;
run;
quit;
/* Use the DOWNLOAD procedure to transfer the file from the REMOTE host to the LOCAL host as BINARY. */
/* It is important to transfer the file as BINARY to retain the file's original structure. */
proc download infile='c:\remfile.png' outfile=locref BINARY;
run;
/* End remote submit*/
endrsubmit;
/* The X command is used to display the GRAFLOC.PNG file using */
/* the default image viewer on your Windows system. */
x "c:\grafloc.png";
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample illustrates how to display a SAS/GRAPH® image created on a remote host locally using the default image viewer.
Date Modified: | 2013-08-20 14:03:14 |
Date Created: | 2013-08-07 10:10:51 |
Operating System and Release Information
SAS System | N/A | Apple Mobile Operating System | | |
Macintosh | | |
Macintosh on x64 | | |
Microsoft Windows 2000 Professional | | |
Microsoft Windows Server 2003 for x64 | | |
Microsoft Windows Server 2008 for x64 | | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | | |
Microsoft Windows XP 64-bit Edition | | |
Microsoft® Windows® for x64 | | |
OS/2 | | |
Microsoft Windows 8 Enterprise 32-bit | | |
Microsoft Windows 8 Enterprise x64 | | |
Microsoft Windows 8 Pro 32-bit | | |
Microsoft Windows 8 Pro x64 | | |
Microsoft Windows 95/98 | | |
Microsoft Windows 2000 Advanced Server | | |
Microsoft Windows 2000 Datacenter Server | | |
Microsoft Windows 2000 Server | | |
Microsoft Windows NT Workstation | | |
Microsoft Windows Server 2003 Datacenter Edition | | |
Microsoft Windows Server 2003 Enterprise Edition | | |
Microsoft Windows Server 2003 Standard Edition | | |
Microsoft Windows Server 2008 | | |
Microsoft Windows Server 2008 R2 | | |
Microsoft Windows Server 2012 Datacenter | | |
Microsoft Windows Server 2012 Std | | |
Microsoft Windows XP Professional | | |
Windows 7 Enterprise 32 bit | | |
Windows 7 Enterprise x64 | | |
Windows 7 Home Premium 32 bit | | |
Windows 7 Home Premium x64 | | |
Windows 7 Professional 32 bit | | |
Windows 7 Professional x64 | | |
Windows 7 Ultimate 32 bit | | |
Windows 7 Ultimate x64 | | |
Windows Millennium Edition (Me) | | |
Windows Vista | | |
Windows Vista for x64 | | |