SAS Institute. The Power to Know

Step-by-Step Programming with Base SAS(R) Software

space
Previous Page | Next Page

Working with Character Variables

Introduction to Working with Character Variables


Purpose

In this section, you will learn how to do the following:

  • identify character variables

  • set the length of character variables

  • align character values within character variables

  • handle missing values of character variables

  • work with character variables, character constants, and character expressions in SAS program statements

  • instruct SAS to read fields that contain numbers as character variables in order to save space


Prerequisites

Before proceeding with this section, you should understand the concepts presented in the following topics:


Character Variables in SAS

A character variable is a variable whose value contains letters, numbers, and special characters, and whose length can be from 1 to 32,767 characters long. Character variables can be used in declarative statements, comparison statements, or assignment statements where they can be manipulated to create new character variables.

space
Previous Page | Next Page | Top of Page