Procedure features: |
|
Other features: |
DATA _NULL_ and DATALINES statements |
DATA _NULL_ and PUT statements |
|
You might want to test your
code without creating a permanent input
XML file. You can use a DATA _NULL_ step to create a temporary input XML file.
|
filename myinput temp lrecl=256;
filename myoutput "c:\myxml\results\weeklyresults.xml" lrecl=256; |
|
data _null_;
file myinput;
input;
put _infile_ ' ';
datalines;
<GetMetadataObjects>
<Reposid>$METAREPOSITORY</Reposid>
<Type>Column</Type>
<Objects/>
<Ns>SAS</Ns>
<Flags>1</Flags>
<Options/>
</GetMetadataObjects>
;;
run;
proc metadata
in=myinput
out=myoutput;
run; |
The following code performs the same task with PUT statements:
|
data _null_;
file myinput;
put "<GetMetadataObjects";
put " <Reposid>$METAREPOSITORY</Reposid>";
put " <Type>Column</Type>";
put " <Objects/>";
put " <Ns>SAS</Ns>";
put " <Flags>1</Flags>";
put " <Options/>";
put "</GetMetadataObjects>";
run;
proc metadata
in=myinput
out=myoutput;
run; |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.