Help using Base SAS procedures

Sending SAS programs as Transport or XML files?

New Contributor
Posts: 2

Sending SAS programs as Transport or XML files?

Can anyone direct me to detailed documentation on how to include executable SAS programs in a Transport file? My experience with Transport files has been limited to datasets.

Also, is it possible to convert SAS programs to .XML format and then convert them back?

Trusted Advisor
Posts: 2,113

Sending SAS programs as Transport or XML files?

Transport files are only defined in terms of SAS datasets.  You may be thinking about SAS "Catalogs":

Don't know about XML beyond reading data from it.

Posts: 8,743

Re: Sending SAS programs as Transport or XML files?


  As Doc said, transport files are generallly used for the transmission of SAS data. SAS programs are simple ASCII text files, so I'm not sure what would be gained by converting them to XML format. In addition, I have to ask the question: What XML format????

There's not just ONE XML format -- the variety of XML "flavors" is greater than the flavors at name just a few (less than 32): XBRL, JusticeML, MusicML, SpreadsheetML, ChemML, MathML, Vector Graphics ML, CDISC XML, SASReportXML, etc, etc. In fact, one of the key features of XML is that it is eXtensible Markup Language -- so someone can write a custom parsing application to consume XML that conforms to a particular schema, and, as long as the XML being sent to the application conforms to the specification or schema, the application will do with the XML whatever it is supposed to do.

Since XML is basically a text file format, it compresses and can be sent easily by file transfer methods. A SAS program is basically a text file that can be compressed and sent easily by file transfer methods. In order to convert your SAS programs to some XML format, you would have to know WHAT format was required by the application that was going to consume the XML. Do you have an application that will parse and, somehow, process a SAS program?

You qualified your statement about the SAS programs as being "executable" SAS programs -- by this I interpret your request to mean a complete SAS program such as:

proc print data=sashelp.class noobs;


instead of a code snippet that might be %included, like this:

input  @1 name $10.

      @12 birthday mmddyy10.;

You might also be referring to stored compiled macro programs as being "executable" -- but as far as I know, those are not portable across platforms and must be re-compiled on every new platform/operating system.

The SAS Platform for Business Analytics does have a mechanism for creating a SAS Package file that includes the SAS program for the stored process -and- the metadata that defines the stored process execution. However, that "package" is intended solely for use in the SAS Platform for Business Analytics.

So, that's some background information and commentary on your question about whether a SAS program could be included in an XML format.


Ask a Question
Discussion stats
  • 2 replies
  • 3 in conversation