using SAS with NAACCR XML

Home Forums NAACCR XML Standard using SAS with NAACCR XML

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #13183
    AnonymousLin Xue

    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\”;
    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”,
    the error looks like:
    NOTE: Line generated by the macro variable “DICTURI”.
    1 “”

    ERROR: DATA STEP Component Object failure. Aborted during the COMPILATION phase.

    how do we call the macro to avoid this error?

    Lin Xue

    AnonymousFabian Depry

    Hi Lin,

    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.

    AnonymousFabian Depry


    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 (

    I also updated/improved the NAACCR XML and SAS wiki page (

    Let me know if this is still not working as you expect.

    AnonymousLin Xue

    thanks! Fabian. version 7.3 works!

    AnonymousBruce Riddle

    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 ( ;
    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 the
    CLASSPATH is correct.
    ERROR: DATA STEP Component Object failure. Aborted during the EXECUTION phase.
    at Method)
    at java.lang.ClassLoader.loadClass(
    at java.lang.ClassLoader.loadClass(
    NOTE: The SAS System stopped processing this step because of errors.
    NOTE: DATA statement used (Total process time):
    real time 0.45 seconds
    cpu time 0.04 seconds

    AnonymousBruce Riddle

    Using Northcon 210 (, 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.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘NAACCR XML Standard’ is closed to new topics and replies.

Copyright © 2018 NAACCR, Inc. All Rights Reserved | naaccr-swoosh-only See NAACCR Partners and Sponsors