这是SAS/log中的显示没有错误,但不能显示
1 /* 1. Define the name and storage location of the HTML output file */
2 /* and the location of the jar files. */
3 %let htmlfile = your_path_and_filename.htm;
4 %let jarfiles = http://your_path_to_archive;
5
6 /* 2. Define a data set that contains parent-child relationships. */
7 data myorg;
8 input name $ empno mgrno deptname $22. deptcode $;
9 cards;
NOTE: The data set WORK.MYORG has 11 observations and 5 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
21 ;
22 run;
23
24 /* 3. Specify titles and footnotes: (optional). */
25 title1 'Organizational Chart';
26 footnote1 'To display the department name, place the cursor over a node.';
27 footnote2 'To rotate the chart, click and drag a node.';
28
29 /* 4. Run the DS2TREE macro. */
30 /* You must change the CODEBASE= argument (using either http:// */
31 /* or a directory path such as C:/) to specify the location of your */
32 /* sas.graph.treeview.jar file and its associated jar files */
33 /* (sas.graph.nld.jar, sas.graph.j2d.jar). See the CODEBASE= argument in: */
34 /* Arguments for the APPLET Tag*/
35 /* Make sure that the ods listing destination is open. */
36 ods listing;
37 %ds2tree(ndata=myorg, /* data sets and files */
38 codebase=&jarfiles,
39 xmltype=inline,
40 htmlfile=&htmlfile,
41 nid=empno, /* roles of variables */
42 nparent=mgrno,
43 ntip=deptname,
44 nlabel=name,
45 height=500, /* appearance */
46 width=600,
47 tcolor=navy,
48 fcolor=black);
NOTE: XML file successfully generated.
NOTE: HTML file successfully generated.
谢谢大家
[此贴子已经被作者于2009-6-1 11:42:53编辑过]

请你把看到的错误指出来,我谢谢您了
你把你的%macro ds2tree(......)这个宏过程贴出来看看,
或者你核查一下你的macro的变量与你现在定义的%ds2tree下面的变量之间有什么疏漏的地方嘛?
如果没有定义变量上面的疏漏,很可能是你%macro 本身的问题!
递交程序的时候一段一段递交;追踪数据走到哪里停住了
好啊,这是一个自带的宏
%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;
扫码加好友,拉您进群



收藏
