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.

126 Writing ODS HTML Output Directly to UNIX Chapter 6<br />

ods html close;<br />

The TRANTAB= option generates ASCII stream files. Each line is terminated with a<br />

newline character. You cannot read ASCII stream files with TSO ISPF browse.<br />

You might need to update links between the files after you transfer the files to UNIX.<br />

To avoid the need to update links, use the URL= option in the ODS statement to<br />

identify how you would like to generate the links.<br />

In the UNIX operating environment, use the following FTP command to transfer a<br />

file from the PDSE:<br />

ftp> get ’myuid.exampl.pdse(examplb)’<br />

/u/myuid/public_html/examplb.html<br />

Writing ODS HTML Output Directly to UNIX<br />

The following example uses the FTP access method to write HTML output that is<br />

generated on z/<strong>OS</strong> 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 section on the FILENAME, FTP access<br />

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

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 */<br />

filename mypage ftp ’example_page.htm’ /* Specify page file */<br />

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

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

user=’myuser’ /* Specify user */

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

Saved successfully!

Ooh no, something went wrong!