BeOptimized - Tips and Tricks

Read and create flat files with Data Step

Creating or reading flat files from SAS can be done in several ways in SAS: proc import, proc export are common examples. When flat files are not simple line of records, it becomes impossible to use default technics and Data Step programming becomes required.

Details

How many keywords do we have to change in a datastep in order to write a flat file as the place of reading it? only two !!
In this tips and tricks, we will mainly have a look to the different technics allowing you to read flat files using datastep because writing flat files is the same:

  • List input,
  • Named Input ,
  • Column Input ,
  • Formatted Input ,
  • Mixed Input ,
  • Read interleaved flat file,
  • Hold input buffer using @ and @@,
  • and finally, generate flat files with header and footer.

Prerequisites

You have some SAS experience and would like to use the flexibility of the Data Step to read and create flat 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.