DATA Step, Macro, Functions and more

statement and options in sas

Accepted Solution Solved
Reply
Contributor
Posts: 56
Accepted Solution

statement and options in sas

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


Accepted Solutions
Solution
‎01-09-2018 10:58 AM
Super User
Posts: 8,220

Re: statement and options in sas

Posted in reply to rvsidhu035

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


All Replies
SAS Moderator
Posts: 70

Re: statement and options in sas [how to improve your question]

Posted in reply to rvsidhu035

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 @KurtBremser

.
SAS Moderator
Posts: 70

Re: statement and options in sas [how to improve your question]

Posted in reply to rvsidhu035

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 @draycut

.
Valued Guide
Posts: 540

Re: statement and options in sas

Posted in reply to rvsidhu035

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

 

Regards,

-- Jan

Contributor
Posts: 56

Re: statement and options in sas

Posted in reply to jklaverstijn

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

Solution
‎01-09-2018 10:58 AM
Super User
Posts: 8,220

Re: statement and options in sas

Posted in reply to rvsidhu035

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

 

Super User
Posts: 24,026

Re: statement and options in sas

Posted in reply to rvsidhu035

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


 

Contributor
Posts: 56

Re: statement and options in sas

You know if work as statement but not as option where work both statement
and options
Super User
Posts: 24,026

Re: statement and options in sas

Posted in reply to rvsidhu035

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.

Contributor
Posts: 56

Re: statement and options in sas

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;

Super User
Posts: 24,026

Re: statement and options in sas

Posted in reply to rvsidhu035

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;

Super User
Posts: 10,623

Re: statement and options in sas

Posted in reply to rvsidhu035

SAS has literally tons (if you would print it) of documentation. See here: http://documentation.sas.com

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Contributor
Posts: 56

Re: statement and options in sas

Posted in reply to rvsidhu035
That's my seminar topic sir that why I am request thank you sir your kindly information
Super User
Posts: 13,950

Re: statement and options in sas

Posted in reply to rvsidhu035

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.

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

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