Hi ,we are Canadian registry and we only submit standard data items, without user data dictionary, when calling%include "I:\NAACCR\NAACCR Call for data 2021\naaccr-xml-utility-7.1\sas\write_naaccr_xml_macro.sas";%writeNaaccrXml(libpath="I:\NAACCR\NAACCR Call for data 2021\naaccr-xml-utility-7.1\sas\naaccr-xml-7.1-sas.jar",targetfile="I:\NAACCR\NAACCR Call for data 2021\Data\MB9518V18.xml",naaccrversion="180″,recordtype="I",dataset=naaccr2018);run;the error looks like:NOTE: Line generated by the macro variable "DICTURI".1 ""-22ERROR: DATA STEP Component Object failure. Aborted during the COMPILATION phase.
how do we call the macro to avoid this error?
There is a definitively a problem in the write macro and I think I know what it is.
I am going to take a closer look today and release an updated version soon.
I found the issue and fixed the write macro. You can find the new version (7.3) on the release page of the Java NAACCR XML project (https://github.com/imsweb/naaccr-xml/releases/).
I also updated/improved the NAACCR XML and SAS wiki page (https://github.com/imsweb/naaccr-xml/wiki/7:-NAACCR-XML-and-SAS).
Let me know if this is still not working as you expect.
thanks! Fabian. version 7.3 works!
I am trying to work with NAACCR 210. How do I start to debug this?
1 * test of reading XML file using SAS ;2 filename txml "J:\XML\SAS_XML\naaccr-xml-utility-7.5\naaccr-xml-utility-7.5\sas" ;3 %include txml (read_naaccr_xml_macro.sas) ;86 %readNaaccrXml(87 libpath="J:\XML\SAS_XML\naaccr-xml-utility-7.5\naaccr-xml-utility-7.5\sas",88 sourcefile="J:\XML\Oct2020_test\120170_16Sep2020_V21.xml",89 naaccrversion="210″,90 recordtype="A",91 dataset=stg1 ) ;
ERROR: Could not find class com/imsweb/naaccrxml/sas/SasXmlToCsv at line 1 column 111. Please ensure that theCLASSPATH is correct.ERROR: DATA STEP Component Object failure. Aborted during the EXECUTION phase.java.lang.ClassNotFoundException: com.imsweb.naaccrxml.sas.SasXmlToCsvat java.net.URLClassLoader$1.run(URLClassLoader.java:366)at java.net.URLClassLoader$1.run(URLClassLoader.java:355)at java.security.AccessController.doPrivileged(Native Method)at java.net.URLClassLoader.findClass(URLClassLoader.java:354)at java.lang.ClassLoader.loadClass(ClassLoader.java:425)at java.lang.ClassLoader.loadClass(ClassLoader.java:358)NOTE: The SAS System stopped processing this step because of errors.NOTE: DATA statement used (Total process time):real time 0.45 secondscpu time 0.04 seconds
Using Northcon 210 (126.96.36.199), NAACCR XML Utility 7.5, and the NAACCR-XML Java Library on GitHub, I have successfully re-written our SAS programs to read and write NAACCR 21 XML files for case processing. GenEdits 5.1.064 and the NAACCR 21A metafile was used to examine the input and output XML files. All the software appeared to work well. I customized the read and write Macros from GitHub to meet our needs for NAACCR 21 and NAACCR A record. Two minor problems. One is finding a way to suppress some of the output produced by the Macro. A sequence of 6 or more reads or writes of the respective Macros makes the SAS Log less useful for debugging. The other problem is that if you create errors that involve the JAVA library, the only recovery is to stop and restart SAS.
Many thanks to everyone to developed these tools. Getting all of this to work was a major relief.