02.05.2013 Views

SAS(R) 9.1.3 Companion for z/OS

SAS(R) 9.1.3 Companion for z/OS

SAS(R) 9.1.3 Companion for z/OS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

130 Directing Procedure Output: <strong>SAS</strong>/GRAPH Example Chapter 6<br />

The ODS PRINTER statement opens an ODS printer destination, enabling<br />

procedure output to be <strong>for</strong>matted <strong>for</strong> a high-resolution printer. Because the ODS<br />

PRINTER statement does not specify a filename or a fileref, ODS output is sent to<br />

the Universal Printing default printer (PRT23lJ5).<br />

3 Issue a print command:<br />

proc print data=sashelp.shoes;<br />

where region="Canada";<br />

run;<br />

PROC PRINT generates procedure output in ODS <strong>for</strong>mat.<br />

4 Remove the print destination:<br />

ods printer close;<br />

The ODS PRINTER CL<strong>OS</strong>E statement removes the ODS printing destination<br />

and sends the procedure output to PRT23lJ5. Subsequent procedure output is<br />

routed to the default Universal Printing destination.<br />

Directing Procedure Output: <strong>SAS</strong>/GRAPH Example<br />

The following example uses the FTP access method to write <strong>SAS</strong>/GRAPH output<br />

directly to a UNIX file.<br />

Each of the following FILENAME statements uses the FTP access method to specify<br />

a file on a UNIX host. Each file will contain part of the ODS HTML output that is<br />

generated by this <strong>SAS</strong> job. You need to provide the correct host, user, password and<br />

directory in<strong>for</strong>mation <strong>for</strong> your site. See the FILENAME, FTP access method<br />

documentation in the <strong>SAS</strong> Language Reference: Dictionary <strong>for</strong> more in<strong>for</strong>mation about<br />

the FTP access method options.<br />

filename myfram ftp ’example_frame.htm’ /* Specify frame file */<br />

cd=’mydir’ /* Specify directory */<br />

host=’myhost.mycompany.com’ /* Specify your host */<br />

user=’myuser’ /* Specify user */<br />

pass=’mypass’ /* Specify password */<br />

/* or */ /* prompt */ /* Password prompting */<br />

rcmd=’site umask 022’ /* Set permissions to */<br />

/* -rw-r--r-- */<br />

recfm=s /* binary transfer */<br />

debug; /* Write ftp messages */<br />

filename mybody ftp ’example_body.htm’ /* Specify body file */<br />

cd=’mydir’ /* Specify directory */<br />

host=’myhost.mycompany.com’ /* Specify your host */<br />

user=’myuser’ /* Specify user */<br />

pass=’mypass’ /* Specify password */<br />

/* or */ /* prompt */ /* Password prompting */<br />

rcmd=’site umask 022’ /* Set permissions to */<br />

/* -rw-r--r-- */<br />

recfm=s /* binary transfer */<br />

debug; /* Write ftp messages */

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!