Creating Free-Format Data

The Basics of Creating Free-Format Data

Creating SAS Data Sets from External Files explained how the PUT statement can be used with column output to write observations from a SAS data set to a raw data file. The PUT statement can also be used with list output to create free-format raw data files.
List output is similar to list input. With list output, you simply list the names of the variables whose values you want to write. The PUT statement writes a value, leaves a blank, and then writes the next value.
Syntax, PUT statement using list output:
PUT variable <: format>;
  • variable specifies the variable whose value you want to write.
  • : precedes a format.
  • format specifies a format to use for writing ...

Get SAS Certification Prep Guide, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.