Date: Mon, 28 Jun 2004 15:49:50 -0700
Reply-To: cassell.david@EPAMAIL.EPA.GOV
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "David L. Cassell" <cassell.david@EPAMAIL.EPA.GOV>
Subject: Re: SAS Generated GIFs to Directory Structure (messy question)
Content-type: text/plain; charset=US-ASCII
A Little Birdie(tm) sent me this note. I thought this should
be shared.
----------- LITTLE BIRDIE SAYS: -----------------------------
Here's a couple of tagset solutions. :)
I had to see how easy it might be..
Of course this can be easily extended to actually write a
perl, shell or python script that could manipulate the
files for you.
It might also be worth taking a look at ODS document. It
can manipulate the output objects in all sorts of ways.
/*---------------------------------------------------------------eric-*/
/*-- This works at 8.2. --*/
/*------------------------------------------------------------28Jun04-*/
proc template;
define tagset tagsets.gifs;
define event branch;
put label " ";
end;
define event image;
put url nl;
end;
end;
run;
/*---------------------------------------------------------------eric-*/
/*-- This one uses 9.? features. --*/
/*-- --*/
/*-- A datastep function and a variable. Its prettier. --*/
/*------------------------------------------------------------28Jun04-*/
proc template;
define tagset tagsets.gifs2;
define event branch;
set $name scan(label, 2, '='); ;
end;
define event image;
put url " " $name nl;
end;
end;
run;
ods listing close;
/*
ods tagsets.event_map file="junk.xml";
*/
ods tagsets.gifs file="junk.txt"
gpath="temp" ;
ods tagsets.gifs2 file="junk2.txt"
gpath="temp" ;
goptions reset=all goutmode=replace device=gif;
proc gplot data=sashelp.class;
by name;
plot weight*height;
run;
ods _all_ close;
/*
data _null_;
set sashelp.class;
by name;
if _n_=1 then n=0;
if n=0 then dir="c:\temp\gplot.gif";
else dir="c:\temp\gplot"||trim(put(n,best. -l))||".gif";
put dir ' ' name;
if first.name then n+1;
run;
*/