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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

128 Writing ODS XML Output to EBCDIC, ASCII Transfer to UNIX Chapter 6<br />

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

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

/* Don’t write to output window */<br />

ods listing close;<br />

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

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

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

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

/* Specify XML file using fileref specified above */<br />

/* Specify ascii representation and do a binary transfer */<br />

ods xml file=myxml<br />

trantab=ascii;<br />

title1 ’z/<strong>OS</strong> ODS XML Example - Binary transfer to UNIX’;<br />

proc plan seed=9544455; factors a=3 b=4 c=5 ordered; run;<br />

title1;<br />

quit;<br />

/* Close the XML destination */<br />

ods xml close;<br />

To view the output file, point your UNIX browser at the file that you moved to UNIX<br />

with FTP, using a URL such as<br />

http://corp.dept.com/~userid/ods_test/odsxml1.xml<br />

Writing ODS XML Output to EBCDIC, ASCII Transfer to UNIX<br />

This example generates ODS XML output in EBCDIC and uses RS=NONE to <strong>for</strong>mat<br />

the output <strong>for</strong> a text (ASCII) transfer to UNIX.<br />

/* Use FTP access method to direct the output to UNIX */<br />

filename myxml ftp ’odsxml2.xml’ /* specify xml file */<br />

cd=’public_html/ods_test’ /* specify directory */<br />

host=’unix.corp.dept.com’ /* specify host */<br />

user=’userid’ /* specify user */<br />

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

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

/* Don’t write to output window */<br />

ods listing close;<br />

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

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

recfm=v /* text transfer */<br />

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

/* Specify XML file using fileref specified above */

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

Saved successfully!

Ooh no, something went wrong!