BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
rvsidhu035
Quartz | Level 8

i want notes of statements and options in sas and their difference with example

1 ACCEPTED SOLUTION

Accepted Solutions
art297
Opal | Level 21

Here is a list of statements in SAS: http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000293668.htm

 

Each statement, in turn, might have options as might any procedures (proc).

 

To confuse matters, though, there is also an options statement.

 

Art, CEO, AnalystFinder.com

 

View solution in original post

13 REPLIES 13
Community_Guide
SAS Moderator

Hello @rvsidhu035,


Your question requires more details before experts can help. Can you revise your question to include more information? 

 

Review this checklist:

  • Specify a meaningful subject line for your topic.  Avoid generic subjects like "need help," "SAS query," or "urgent."
  • When appropriate, provide sample data in text or DATA step format.  See this article for one method you can use.
  • If you're encountering an error in SAS, include the SAS log or a screenshot of the error condition. Use the Photos button to include the image in your message.
    use_buttons.png
  • It also helps to include an example (table or picture) of the result that you're trying to achieve.

To edit your original message, select the "blue gear" icon at the top of the message and select Edit Message.  From there you can adjust the title and add more details to the body of the message.  Or, simply reply to this message with any additional information you can supply.

 

edit_post.png

SAS experts are eager to help -- help them by providing as much detail as you can.

 

This prewritten response was triggered for you by fellow SAS Support Communities member @Kurt_Bremser

.
Community_Guide
SAS Moderator

Hello @rvsidhu035,


Your question requires more details before experts can help. Can you revise your question to include more information? 

 

Review this checklist:

  • Specify a meaningful subject line for your topic.  Avoid generic subjects like "need help," "SAS query," or "urgent."
  • When appropriate, provide sample data in text or DATA step format.  See this article for one method you can use.
  • If you're encountering an error in SAS, include the SAS log or a screenshot of the error condition. Use the Photos button to include the image in your message.
    use_buttons.png
  • It also helps to include an example (table or picture) of the result that you're trying to achieve.

To edit your original message, select the "blue gear" icon at the top of the message and select Edit Message.  From there you can adjust the title and add more details to the body of the message.  Or, simply reply to this message with any additional information you can supply.

 

edit_post.png

SAS experts are eager to help -- help them by providing as much detail as you can.

 

This prewritten response was triggered for you by fellow SAS Support Communities member @PeterClemmensen

.
jklaverstijn
Rhodochrosite | Level 12

Please ask a question. The more specific the better. Stating a desire rarely fulfills that desire.

 

Regards,

-- Jan

rvsidhu035
Quartz | Level 8

i am asking different between statements and options in sas ? if you don't kow then cool no need to be suggest sentence formation or some other things we are learner hence we made mistakes

art297
Opal | Level 21

Here is a list of statements in SAS: http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000293668.htm

 

Each statement, in turn, might have options as might any procedures (proc).

 

To confuse matters, though, there is also an options statement.

 

Art, CEO, AnalystFinder.com

 

Reeza
Super User

Statements can have options.

 

There's an Options statement. 

 

Your question is ambiguous. 

 


@rvsidhu035 wrote:

i am asking different between statements and options in sas ? if you don't kow then cool no need to be suggest sentence formation or some other things we are learner hence we made mistakes


 

rvsidhu035
Quartz | Level 8
You know if work as statement but not as option where work both statement
and options
Reeza
Super User

@rvsidhu035 wrote:
You know if work as statement but not as option where work both statement
and options

I don't know what that means.

rvsidhu035
Quartz | Level 8

where as option

data new(where=(age=11));

set sashelp.class;

run;

if is not a option here not work this code

data new1(if age=11);

set sashelp.class;

run;

Reeza
Super User

Here's a 'better' example:

 

WHERE as a data set option. 

 

data new(where=(age=11));

set sashelp.class;

run;

 

WHERE as a statement.

 

data new;

set sashelp.class;

where age=11;

run;

rvsidhu035
Quartz | Level 8
That's my seminar topic sir that why I am request thank you sir your kindly information
ballardw
Super User

@rvsidhu035 wrote:

i want notes of statements and options in sas and their difference with example


Options allow you to chose one or more behaviors. However where and what option you want to control is the key. There are SAS System options, some of which are only valid at program start (invocation) and controlled by configuration information others available by using an Options statement. There are also other specific sub-environment options such as for device based graphics using GOPTIONS statement or statistical graphics using the ODS GRAPHICS statement.

 

As mentioned in other posts here almost every SAS Procedure has one or more options, usually as a minimum the data to use.

 

Statements are basically any instruction a single code element that ends with a semicolon. Which could be a PROC statement such as

Proc Print data=thisdataset;

which establishes the procedure to run (Print) and an OPTION of the data set to print.

A statement may also be a specific instruction to a procedure such as listing the variables to print, the formats to display those variables and so forth.

 

Look at the documentation for almost any prodecure. The SYNTAX section will display the STATEMENTS available to the procedure.

 

But this question is too broad to provide examples of every one. the basic printed documentation of the Base (or foundation) SAS , SAT/STAT and SAS/Graph modules alone is well over 1000 pages.

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 13 replies
  • 1410 views
  • 3 likes
  • 7 in conversation