BeOptimized - Tips and Tricks

Create XML with Data Step

XML files are not simple line of records, they have a hierarchy and they are not easy to create programmatically. Sometimes software cannot create complex XML files and it becomes mandatory to pass through this step. In this tips and tricks, we will see how we can create XML in Data Step.

Details

In this tips and tricks, we will start with a very practical (and free) SAS software: SAS XML mapper. This software is not very known but allows you to read some XML (not very complex one) via libname statement. Then we will, in the Data Step, see how we could create a XML file. More precisely we will:

  • See how we have to structure the Data Step in order to generate the first building blocks of an XML
  • Add data from a single dataset
  • Add data from a second dataset
  • Automate the process thanks to macros

Prerequisites

You have some SAS experience and would like to use the flexibility of the Data Step to create XML files.


Go back to your selection


This site uses cookies. .

By continuing to browse the site you are agreeing to our use of cookies. Review our cookies information for more details.