Dataset.xml (Not Define.xml)

From CDISC Webiste – “CDISC developed Dataset-XML v1.0 as a drop-in replacement for SAS V5 XPORT to enable testing using existing processes. Dataset-XML is a truly non-proprietary, global standard, removing many SAS V5 Transport file restrictions (the current file format required by the FDA and PMDA), such as 8-character variable names and 200-character text fields. Dataset-XML and Define-XML are complementary standards; Define-XML metadata describes the Dataset-XML dataset content “

Instead of using XPT files CDISC suggests use of xml files for data. This makes it convenient to check if the dataset adheres to define.xml and also removes the restrictions of XPT files (length of variable name and variable label) and XML is open source. An XSL file can be created and linked to the dataset.xml file so that it can be viewed and printed as a listing. First you need to run SDTM order macro mentioned in the earlier post so that variables can be ordered as per required SDTM standard otherwise the xml file will follow alphabetical order or variables.

The macro creates an output such of the same name as dataset with XML file extension.

Note: There can be unicode characters in the data for example in labs or free text field. Those need to be pre or post processed. example < or> signs can be replaced with &#60 or &#62 followed by a semi-colon of-course . This dataset in XML format can be read in SAS using XML mapper and libname statement.

I am placing an image for the code as wordpress interprets our needed tags as html and omits them. if you need the code drop an email to me

Leave a comment

Design a site like this with WordPress.com
Get started