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
Rhodochrosite | Level 12

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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 548 views
  • 1 like
  • 4 in conversation