好啊,这是一个自带的宏
%macro ds2tree(ndata=,
npw=,
htmlfile=,
htmlfref=,
xmlfile=,
xmlfref=,
xmlurl=,
runmode=b,
pagepart=all,
makehtml=y,
makexml=y,
cutoff=,
catext=,
cnode=,
spread=,
openmode=replace,
encode=y,
xmltype=inline,
nid=,
nlabel=,
ntip=,
nurl=,
ncolor=,
nparent=,
lcolor=,
lwidth=,
center=n,
doctype=3.2,
charset=,
sstype1=,
sstype2=,
sstype3=,
sstype4=,
sstype5=,
ssrel1=,
ssrel2=,
ssrel3=,
ssrel4=,
ssrel5=,
ssrev1=,
ssrev2=,
ssrev3=,
ssrev4=,
ssrev5=,
sshref1=,
sshref2=,
sshref3=,
sshref4=,
sshref5=,
sstitle1=,
sstitle2=,
sstitle3=,
sstitle4=,
sstitle5=,
ssmedia1=,
ssmedia2=,
ssmedia3=,
ssmedia4=,
ssmedia5=,
ssfile1=,
ssfile2=,
ssfile3=,
ssfile4=,
ssfile5=,
ssfref1=,
ssfref2=,
ssfref3=,
ssfref4=,
ssfref5=,
name=,
code=TreeLens.class,
width=800,
height=600,
alt=SAS Institute Inc. TreeView Applet,
archive=%str(sas.graph.treeview.jar,)
%str(sas.graph.nld.jar, sas.graph.j2d.jar),
object=,
codebase=,
align=,
vspace=,
hspace=,
bgtype=none,
bg=,
septype=rule,
seploc=,
saspower=,
brtitle=,
ctext=,
ttag=preformatted + header 3,
tface=,
tcolor=,
tsize=,
ftag=preformatted + header 3,
fface=,
fcolor=,
fsize=,
labels=y,
nwhere=,
round=,
tranlist=,
tclass=,
tid=,
fclass=,
fid=,
bdclass=,
bdid=,
spclass=,
spid=,
sepclass=,
sepid=,
catname=,
viewer=tree,
debug=n,
cback=,
driltarg=,
cselect=,
factor=,
ncolfmt=,
ntipfmt=,
lcolfmt=,
ahunits=pixels,
awunits=pixels,
ibackloc=,
ibackurl=,
ibackpos=,
ibackx=,
ibacky=,
chandle=,
fntname=,
fntstyl=,
fntsize=,
nodesep=,
selifunc=,
sellfunc=,
selufunc=,
nodebdr=,
dupcheck=N,
clink=,
angle=,
tips=y,
rbsizing=N,
action=,
naction=,
ntextcol=,
nfntname=,
nfntstyl=,
nfntsize=,
lstip=,
lstipfac=,
nsdata=,
nspw=,
nswhere=,
nsid=,
nscback=,
nsctext=,
nsfntnam=,
nsfntsiz=,
nsfntsty=,
nstyle=,
border=N,
treedir=CIRCULAR,
treespan=,
depth=,
ltip=,
ltipfmt=,
fisheye=Y,
scriptable=Y,
id=,
showver=N);
%*********************************************************************;
%*
%* MACRO: DS2TREE
%*
%* USAGE: %ds2tree(arg1=value, arg2=value, ... argN=valueN);
%*
%* DESCRIPTION:
%* This macro is used to build XML and HTML for the TreeView
%* Applet.
%*
%* NOTES:
%* None.
%*
%* SUPPORT: sasvcd
%*
%* VERSION: 9.1
%*
%*********************************************************************;
%local ndata npw
notes htmlfile htmlfref xmlfile xmlfref xmlurl
runmode pagepart makehtml makexml cutoff catext cnode spread
openmode encode xmltype nid nlabel ntip nurl ncolor
nparent
lcolor lwidth center doctype charset i eflag
sstype1 sstype2 sstype3 sstype4 sstype5 ssrel1 ssrel2
ssrel3 ssrel4 ssrel5 ssrev1 ssrev2 ssrev3 ssrev4 ssrev5
sshref1 sshref2 sshref3 sshref4 sshref5 sstitle1 sstitle2
sstitle3 sstitle4 sstitle5 ssmedia1 ssmedia2 ssmedia3
ssmedia4 ssmedia5 ssfile1 ssfile2 ssfile3 ssfile4 ssfile5
ssfref1 ssfref2 ssfref3 ssfref4 ssfref5
name code width height alt archive object codebase align
vspace hspace
bgtype bg septype seploc saspower brtitle ctext
ttag tface tcolor tsize ftag fface fcolor fsize labels
nwhere round tranlist tclass tid fclass fid bdclass
bdid spclass spid sepclass sepid showver
tempstr tempstr1 catname viewer debug cback driltarg
cselect factor ncolfmt ntipfmt lcolfmt ahunits awunits
ibackloc ibackurl ibackpos ibackx ibacky chandle fntname
fntstyl fntsize nodesep selifunc sellfunc
selufunc action naction ntextcol nfntname nfntstyl nfntsize
lstip lstipfac ltip ltipfmt
nodebdr dupcheck clink angle tips rbsizing
nsdata nspw nswhere nsid nscback nsctext nsfntnam nsfntsiz
nsfntsty nstyle border treedir treespan depth fisheye
scriptable id;
%global _TXMLRC;
%let notes=%sysfunc(getoption(notes));
options nonotes;
%if (%cmpres(&catname) eq )
%then %let catname=WORK._HTMLG_._TEMP2_.OUTPUT;
%let _TXMLRC = 0;
%grafhlp1(ndata=%bquote(&ndata),
npw=%bquote(&npw),
htmlfile=%bquote(&htmlfile),
htmlfref=%bquote(&htmlfref),
xmlfile=%bquote(&xmlfile),
xmlfref=%bquote(&xmlfref),
xmlurl=%bquote(&xmlurl),
runmode=%bquote(&runmode),
pagepart=%bquote(&pagepart),
makehtml=%bquote(&makehtml),
makexml=%bquote(&makexml),
cutoff=%bquote(&cutoff),
catext=%bquote(&catext),
cnode=%bquote(&cnode),
spread=%bquote(&spread),
openmode=%bquote(&openmode),
encode=%bquote(&encode),
xmltype=%bquote(&xmltype),
nid=%bquote(&nid),
nlabel=%bquote(&nlabel),
ntip=%bquote(&ntip),
nurl=%bquote(&nurl),
ncolor=%bquote(&ncolor),
nparent=%bquote(&nparent),
lcolor=%bquote(&lcolor),
lwidth=%bquote(&lwidth),
center=%bquote(¢er),
doctype=%bquote(&doctype),
charset=%bquote(&charset),
sstype1=%bquote(&sstype1),
sstype2=%bquote(&sstype2),
sstype3=%bquote(&sstype3),
sstype4=%bquote(&sstype4),
sstype5=%bquote(&sstype5),
ssrel1=%bquote(&ssrel1),
ssrel2=%bquote(&ssrel2),
ssrel3=%bquote(&ssrel3),
ssrel4=%bquote(&ssrel4),
ssrel5=%bquote(&ssrel5),
ssrev1=%bquote(&ssrev1),
ssrev2=%bquote(&ssrev2),
ssrev3=%bquote(&ssrev3),
ssrev4=%bquote(&ssrev4),
ssrev5=%bquote(&ssrev5),
sshref1=%bquote(&sshref1),
sshref2=%bquote(&sshref2),
sshref3=%bquote(&sshref3),
sshref4=%bquote(&sshref4),
sshref5=%bquote(&sshref5),
sstitle1=%bquote(&sstitle1),
sstitle2=%bquote(&sstitle2),
sstitle3=%bquote(&sstitle3),
sstitle4=%bquote(&sstitle4),
sstitle5=%bquote(&sstitle5),
ssmedia1=%bquote(&ssmedia1),
ssmedia2=%bquote(&ssmedia2),
ssmedia3=%bquote(&ssmedia3),
ssmedia4=%bquote(&ssmedia4),
ssmedia5=%bquote(&ssmedia5),
ssfile1=%bquote(&ssfile1),
ssfile2=%bquote(&ssfile2),
ssfile3=%bquote(&ssfile3),
ssfile4=%bquote(&ssfile4),
ssfile5=%bquote(&ssfile5),
ssfref1=%bquote(&ssfref1),
ssfref2=%bquote(&ssfref2),
ssfref3=%bquote(&ssfref3),
ssfref4=%bquote(&ssfref4),
ssfref5=%bquote(&ssfref5),
name=%bquote(&name),
code=%bquote(&code),
width=%bquote(&width),
height=%bquote(&height),
alt=%bquote(&alt),
archive=%bquote(&archive),
object=%bquote(&object),
codebase=%bquote(&codebase),
align=%bquote(&align),
vspace=%bquote(&vspace),
hspace=%bquote(&hspace),
bgtype=%bquote(&bgtype),
bg=%bquote(&bg),
septype=%bquote(&septype),
seploc=%bquote(&seploc),
saspower=%bquote(&saspower),
brtitle=%bquote(&brtitle),
ctext=%bquote(&ctext),
ttag=%bquote(&ttag),
tface=%bquote(&tface),
tcolor=%bquote(&tcolor),
tsize=%bquote(&tsize),
ftag=%bquote(&ftag),
fface=%bquote(&fface),
fcolor=%bquote(&fcolor),
fsize=%bquote(&fsize),
labels=%bquote(&labels),
nwhere=%bquote(&nwhere),
round=%bquote(&round),
tranlist=%bquote(&tranlist),
tclass=%bquote(&tclass),
tid=%bquote(&tid),
fclass=%bquote(&fclass),
fid=%bquote(&fid),
bdclass=%bquote(&bdclass),
bdid=%bquote(&bdid),
spclass=%bquote(&spclass),
spid=%bquote(&spid),
sepclass=%bquote(&sepclass),
sepid=%bquote(&sepid),
catname=%bquote(&catname),
viewer=%bquote(&viewer),
debug=%bquote(&debug),
cback=%bquote(&cback),
driltarg=%bquote(&driltarg),
cselect=%bquote(&cselect),
factor=%bquote(&factor),
ncolfmt=%bquote(&ncolfmt),
ntipfmt=%bquote(&ntipfmt),
lcolfmt=%bquote(&lcolfmt),
ahunits=%bquote(&ahunits),
awunits=%bquote(&awunits),
ibackloc=%bquote(&ibackloc),
ibackurl=%bquote(&ibackurl),
ibackpos=%bquote(&ibackpos),
ibackx=%bquote(&ibackx),
ibacky=%bquote(&ibacky),
chandle=%bquote(&chandle),
fntname=%bquote(&fntname),
fntstyl=%bquote(&fntstyl),
fntsize=%bquote(&fntsize),
nodesep=%bquote(&nodesep),
selifunc=%bquote(&selifunc),
sellfunc=%bquote(&sellfunc),
selufunc=%bquote(&selufunc),
nodebdr=%bquote(&nodebdr),
dupcheck=%bquote(&dupcheck),
clink=%bquote(&clink),
angle=%bquote(&angle),
tips=%bquote(&tips),
rbsizing=%bquote(&rbsizing),
action=%bquote(&action),
naction=%bquote(&naction),
ntextcol=%bquote(&ntextcol),
nfntname=%bquote(&nfntname),
nfntstyl=%bquote(&nfntstyl),
nfntsize=%bquote(&nfntsize),
lstip=%bquote(&lstip),
lstipfac=%bquote(&lstipfac),
nsdata=%bquote(&nsdata),
nspw=%bquote(&nspw),
nswhere=%bquote(&nswhere),
nsid=%bquote(&nsid),
nscback=%bquote(&nscback),
nsctext=%bquote(&nsctext),
nsfntnam=%bquote(&nsfntnam),
nsfntsiz=%bquote(&nsfntsiz),
nsfntsty=%bquote(&nsfntsty),
nstyle=%bquote(&nstyle),
border=%bquote(&border),
treedir=%bquote(&treedir),
treespan=%bquote(&treespan),
depth=%bquote(&depth),
ltip=%bquote(<ip),
ltipfmt=%bquote(<ipfmt),
fisheye=%bquote(&fisheye),
scriptable=%bquote(&scriptable),
showver=%bquote(&showver));
%if (&_TXMLRC ne 0) %then %goto exit;
%let debug=%upcase(%substr(&debug, 1, 1));
%let center=%upcase(%substr(¢er, 1, 1));
%let makehtml=%upcase(%substr(&makehtml, 1, 1));
%let makexml=%upcase(%substr(&makexml, 1, 1));
%let encode=%upcase(%substr(&encode, 1, 1));
%let labels=%upcase(%substr(&labels, 1, 1));
%let dupcheck=%upcase(%substr(&dupcheck, 1, 1));
%let tips=%upcase(%substr(&tips, 1, 1));
%let rbsizing=%upcase(%substr(&rbsizing, 1, 1));
%let border=%upcase(%substr(&border, 1, 1));
%let fisheye=%upcase(%substr(&fisheye, 1, 1));
%let scriptable=%upcase(%substr(&scriptable, 1, 1));
proc display c=sashelp.javagrf.ds2tree.scl; run;
%exit:
%if (%bquote(%upcase(&showver)) eq Y) or
(%bquote(%upcase(&showver)) eq YES)
%then %do;
options notes;
%put NOTE: DS2TREE Macro Version: 9.1;
options nonotes;
%end;
options ¬es;
%mend ds2tree;