O'Reilly logo

A Step-by-Step Approach to Using SAS® for Univariate & Multivariate Statistics, Second Edition by Edward J. Stepanksi Ph.d., Larry Hatcher, Norm O'Rourke

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Additional Guidelines

Inputting String Variables with the Same Prefix and Different Numeric Suffixes

In this section, prefix refers to the first part of a variable’s name, while suffix refers to the last part. For example, think about our variables Q1, Q2, Q3, Q4, Q5, Q6, and Q7. These are multiple variables with the same prefix (Q) and different numeric suffixes (i.e., 1, 2, 3, 4, 5, 6, and 7). Variables such as this are sometimes referred to as string variables. Earlier, this chapter provided one way of inputting these variables; the original INPUT statement is repeated here:

INPUT   #1   @1   Q1      1.
             @2   Q2      1.
             @3   Q3      1.
             @4   Q4      1.
             @5   Q5      1.
             @6   Q6      1.
             @7   Q7      1.
             @9   AGE     2.
             @12  IQ      3.
             @16  NUMBER  2.  ;

However, with string variables named in this way, there is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required