Hi guys,
Running SAS 9.1.3.
Trying to create a set of customized tagsets.
I am facing a strange behaviour with the event initialize.
When using the proc print, I can see that the initialize event is ran several times with the side effect that the memory variables populated during the tagset execution are being cancelled, if I am using the XML engine in data step I don't have the problem.
Here is the code, if you have any idea about it is welcome otherwise I will ask a defect id with tech support.
ODS PATH work.TMPBIT(UPDATE) SASHELP.TMPLMST(read) ;
proc template;
define tagset tagsets.test2 ;
notes "Keinavo TAGSET ";
indent = 3;
map = '<>&"''';
mapsub = '/</>/&/"/'/';
define event initialize ;
start:
eval $testvar 4;
put "====initialize:start:====" nl;
putvars mem _name_ ": " _value_ nl;
put "===================" nl;
break ;
end ;
define event test ;
eval $testvar 3;
put "test" CR ;
break ;
end ;
define event doc;
start:
trigger test ;
break;
finish:
break;
end;
define event doc_head;
start:
break;
finish:
break;
end;
define event doc_body;
start:
put "******doc_body:start:*********" nl;
putvars mem _name_ ": " _value_ nl;
put "*******************" nl;
break;
finish:
put "******doc_body:finish:*******" nl;
putvars mem _name_ ": " _value_ nl;
put "*******************" nl;
break;
end;
define event data;
start:
break / if !cmp(SECTION, "body");
break / if cmp(XMLMETADATA, "ONLY");
eval $testvar 3 ;
set $myvalues[] _value_ ;
break;
finish:
break / if !cmp(SECTION, "body");
break / if cmp(XMLMETADATA, "ONLY");
break;
end;
define event table_body;
start:
trigger test ;
break;
finish:
put "******table_body:finish:********" nl;
putvars mem _name_ ": " _value_ nl;
put "*******************" nl;
break;
end;
end ;
run ;
filename _webout "C:\work\engine92.xml";
libname _webout xml xmltype=GENERIC tagset=tagsets.test2 ;
options OBS=10 ;
proc copy in=SASHELP out=_webout ;
select CLASS ;
run;
/*
data _webout.class ;
set sashelp.class ;
run ; */
... View more