Introduction

Some operating systems have different types of record formats for external files. An external file that has a fixed-length record format has an end-of-record marker after a predetermined number of columns. A typical record length is 80 columns.

fixed-length record format

Or, external files can have a variable-length record format, in which an end-of-record marker is placed after the last field.

variable-length record format

When records contain fields that have varying lengths or a varying number of fields, a variable-length record format uses space more efficiently than a fixed-length record format.

 
Notice:

Setting Up Filerefs for Practices in This Lesson



30 minutes



In this lesson, you learn to

  • determine the length of each record
  • read character variables that have varying lengths.

You can also review how to

  • use a line-hold specifier to hold the current record
  • execute SAS statements based on the value of a variable
  • explicitly write an observation to a data set.

complete the following lessons:

  • .