New SAS User

Completely new to SAS or trying something new with SAS? Post here for help getting started.
BookmarkSubscribeRSS Feed
Jianan_luna
Obsidian | Level 7

I am confused about this question, why does the title statement t for the last PROC PRINT step cancel all the higher TITLEn statements? Thanks!Jianan_luna_0-1594691993069.png

 

3 REPLIES 3
ketpt42
Quartz | Level 8

That's just the way it was coded. From SAS's documentation:

  • This statement suppresses a title on line n and all lines after it: (Where is a number between 1 and 10)
    titlen;

    A TITLE statement for a given line cancels the previous TITLE statement for that line and for all lines with larger n numbers. TITLE with no number assumes TITLE1.

WarrenKuhfeld
Ammonite | Level 13

That's the design, and it's a good one. Wouldn't it be annoying if you had to cancel all of the titles by specifying separate statements each time you wanted to change them? Yes, it could have been designed other ways, but that is how it has worked when I first learned SAS '79.

Kurt_Bremser
Super User

You already have your answer, but I want to add this:

Bookmark this link in all your browsers:

SAS® 9.4 and SAS® Viya® 3.4 Programming Documentation 

so you can make full use of Maxim 1 when it comes to SAS programming.

The documentation for your particular question is found here:

TITLE Statement 

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 950 views
  • 1 like
  • 4 in conversation