Help using Base SAS procedures

Why the output for "STATE" looks unexpected from this program?

Reply
New Contributor
Posts: 2

Why the output for "STATE" looks unexpected from this program?

data work.population;

input  @2 POPULATION comma9.

          @12 RANK 1.

          @14 CITY $12.

          @27 STATE $2;

cards;

8,143,197 1 New York     NY

3,844,829 2 Los Angeles  CA

2, 842,518 3 Chicago     IL

run;

Here is the output

8143197 1 New York     8

3844829 2 Los Angeles 3

2842518 3 Chicago        2

New Contributor
Posts: 2

Re: Why the output for "STATE" looks unexpected from this program?

Oops!

Just notice that a missing period for $2.

Assumed answered.

Super User
Posts: 17,912

Re: Why the output for "STATE" looks unexpected from this program?

Please mark as assumed answered.

Ask a Question
Discussion stats
  • 2 replies
  • 203 views
  • 0 likes
  • 2 in conversation