BookmarkSubscribeRSS Feed
Jianan_luna
Obsidian | Level 7

When I learn exporting file from SAS, I have some questions about some statements. Like: 

ods noproctitle;

options orientation=landscape;

ods excel file=;

when we add those statement at the beginning of the code. We always need add some statements like: 

ods proctitle;

 options orientation=portrait;

ods excel close; at the end of program. Why we need to add those statements at end of the program? Thanks so much

3 REPLIES 3
PaigeMiller
Diamond | Level 26

You don't have to add the statements at the end of the program.

 

If there is more to the program (not shown), you might want to (or you might not want to) turn the options back to the other setting, for further use in the progam. That's why they are "options", they are optional, you can set them or not set them as you please.

--
Paige Miller
ballardw
Super User

Options, such as Orientation are like car doors. If you open a car door then it stays open until you close it. So options once set remain in effect until until you change them.

 

The ODS statement sets options related to ODS destinations. The ODS Graphics sets options related to ODS graphics. The Options statement sets options for the system.

 

Simple concept.

 

If you need to know more about options in effect at a given part of your program Proc Options can tell you that (read the log).

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 473 views
  • 0 likes
  • 4 in conversation