BookmarkSubscribeRSS Feed
priya
Calcite | Level 5
how to align title if I am creating a listing not ODS just sas listing

Thanks
2 REPLIES 2
Cynthia_sas
Diamond | Level 26
The SAS Options statement is what affects the SAS titles and footnotes (and the entire report) in the LISTING window.

By default
[pre]
options center;
[/pre]

will cause the titles, footnotes and report output to be centered in the linesize that you specify. If you have
[pre]
options nocenter;
[/pre]
Then the report, along with the titles and footnotes will be left justified. There is a way to right justify the title in the linesize, as I remember, somebody published a SAS Macro program to perform this kind of justification in the LISTING destination, essentially by counting the number of characters in the Title string, and using a calculated number of spaces to pad the title string so right justification could be accomplished.

See these references:
http://support.sas.com/kb/24/729.html
http://www.sconsig.com/sastips/tip00061.htm

Of course, with ODS for non-listing destinations, it is much different because right on the TITLE or FOOTNOTE statement, you can specify justification:
[pre]
title j=r 'Right justified title';
title j=l 'Left justified';
[/pre]

cynthia
deleted_user
Not applicable
I didn't get a chance to feedback to the ODS developers my appreciation for this syntax.

It has been available in SAS/Graph since some time in the mists of V6 antiquity, for which I was very grateful because it made GSlide and similar procedures very simple to lay out.

Adding it to ODS was an excellent synergy and seemed to mark a time when procedures were being developed with a little more consultation and review.

Kind regards

David

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1097 views
  • 0 likes
  • 3 in conversation