24.04.2014 Views

Pratique de Sas Windows ...9.3 Volume 2 - Ined

Pratique de Sas Windows ...9.3 Volume 2 - Ined

Pratique de Sas Windows ...9.3 Volume 2 - Ined

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.

2.1.2 Les options système<br />

• DLCREATEDIR<br />

Si dans un libname, on nomme un répertoire inexistant, avec cette option activée, le répertoire est créé sur une<br />

racine préexistante avec une mention sur la log/journal.<br />

options nodlcreatedir;<br />

libname ahah "d:\truc\muche";<br />

options dlcreatedir;<br />

libname ahah "d:\truc\muche";<br />

options dlcreatedir;<br />

libname ahah "d:\notes\muche";<br />

1 options nodlcreatedir;<br />

2 libname ahah "d:\truc\muche";<br />

NOTE: La bibliothèque AHAH n'existe pas.<br />

Racine préexistante ou non : pas <strong>de</strong> création<br />

3 options dlcreatedir;<br />

4 libname ahah "d:\truc\muche";<br />

ERROR: La création <strong>de</strong> la bibliothèque AHAH a échoué.<br />

ERROR: Error in the LIBNAME statement.<br />

Car la racine d:\truc est inexistante<br />

7 options dlcreatedir;<br />

8 libname ahah "d:\notes\muche";<br />

NOTE: La bibliothèque AHAH a été créée.<br />

NOTE: Libref AHAH was successfully assigned as follows:<br />

Engine: V9<br />

Physical Name: d:\notes\muche<br />

• ORIENTATION=<br />

options orientation=landscape obs=5;<br />

proc options option=(ls ps);run;<br />

ods pdf file="danslawork.pdf";<br />

proc print data=<strong>Sas</strong>help.class;run;<br />

options orientation=portrait obs=max;<br />

proc print data=<strong>Sas</strong>help.heart(obs=5); run;<br />

ods pdf close;<br />

* l’orientation portrait a remis les valeurs linesize et pagesize par défaut;<br />

On remarquera qu’il est enfin possible à partir <strong>de</strong> la 9.3 <strong>de</strong> changer d’orientation à l’intérieur d’un un ods pdf !<br />

Cela s’applique aux « universal printers » (que sont pour <strong>Sas</strong> -pdf, svg, ps, pcl5 et allii), mais aussi les<br />

<strong>de</strong>stinations listing ou rtf. Accessoirement, on remarquera la possibilité <strong>de</strong> <strong>de</strong>man<strong>de</strong>r plusieurs options à la fois.<br />

• NOAUTOCORRECT<br />

options noautocorrect;<br />

pric print data=<strong>Sas</strong>help.sas;<br />

run;<br />

options autocorrect;<br />

proc print ddata=<strong>Sas</strong>help.class;<br />

run;<br />

En général cependant, on regar<strong>de</strong> sa<br />

log/journal. Autocorrect par défaut!<br />

1 options noautocorrect;<br />

2 pric print data=<strong>Sas</strong>help.sas;<br />

----<br />

180<br />

ERROR 180-322: Statement is not valid or it is used out of<br />

proper or<strong>de</strong>r.<br />

3 options autocorrect;<br />

4 proc print ddata=<strong>Sas</strong>help.class;run;<br />

-----<br />

1<br />

NOTE: Writing HTML Body file: <strong>Sas</strong>html.htm<br />

WARNING 1-322: Assuming the symbol DATA was misspelled as<br />

ddata.<br />

• URLENCODING=<br />

Deux valeurs session par défaut ou utf8 permettront la bonne interprétation dans une fonction url<strong>de</strong>co<strong>de</strong>.<br />

options urlencoding=utf8;<br />

filename url8<br />

"d:\notes\muche\urlfileutf8.txt";<br />

data bon;<br />

infile url8; input url :$80.;<br />

urlok=url<strong>de</strong>co<strong>de</strong>(url);<br />

run;<br />

options urlencoding=session;<br />

Le fichier externe d’adresses url est encodé en utf8<br />

Le résultat<br />

55 INED Service Informatique Wielki

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

Saved successfully!

Ooh no, something went wrong!