DATA Step, Macro, Functions and more

List of Autiomatic variables in SAS ?

Accepted Solution Solved
Reply
Contributor
Posts: 42
Accepted Solution

List of Autiomatic variables in SAS ?

Dear All,

Day by day when  we are working with SAS, coming to know so many Automatic Variables. I just want to know whether we can find list of all Automatic variables available in SAS ? If anyone is having URL, that will be really helpful before you want to use any of the Automatic variables (Except Macro Automatic variables).

Thanks a lot in advance for help.

Regards,

S Ravuri.


Accepted Solutions
Solution
‎03-21-2012 04:45 AM
Contributor
Posts: 42

List of Autiomatic variables in SAS ?

Thanks for quick response Ballardw.

I got some of Automatic Variables info and am just sharing for the same.

_ALL_ Lists the values of all macro variables.specifies all variables that are currently defined in the current DATA step.

_AUTOMATIC_ Lists the values of all automatic macro variables

_USER_ Lists the values of all user-defined macro variables

_NUMERIC_
specifies all numeric variables that are already defined in the current DATA step.


_CHARACTER_
specifies all character variables that are currently defined in the current DATA step.

Regards,

S Ravuri.

View solution in original post


All Replies
Super User
Posts: 11,343

List of Autiomatic variables in SAS ?

Posted in reply to sambasiva_ravuri_tcs_com

Since different modules and operating systems have different automatic variables I would recomend starting by searching in your SAS online help for "automatic". I have lists for automatic macro variables, error, VSAM processing and SAS/IntrNet to name just a few places.

A single list probably  wouldn't make sense as you may not be able to use all of them without the appropriate modules.

Solution
‎03-21-2012 04:45 AM
Contributor
Posts: 42

List of Autiomatic variables in SAS ?

Thanks for quick response Ballardw.

I got some of Automatic Variables info and am just sharing for the same.

_ALL_ Lists the values of all macro variables.specifies all variables that are currently defined in the current DATA step.

_AUTOMATIC_ Lists the values of all automatic macro variables

_USER_ Lists the values of all user-defined macro variables

_NUMERIC_
specifies all numeric variables that are already defined in the current DATA step.


_CHARACTER_
specifies all character variables that are currently defined in the current DATA step.

Regards,

S Ravuri.

Regular Contributor
Posts: 184

List of Autiomatic variables in SAS ?

Posted in reply to sambasiva_ravuri_tcs_com

Some clarification ...

Macro variables and SAS data variables are altogether different things.

Examples of automatic variables: _N_ and _ERROR_ in the DATA step, _TYPE_ and _FREQ_ in PROC SUMMARY/MEANS.

The items which S. listed are not automatic variables. Rather, they are shorthand notations which expand to be lists of zero or more variables (which are generally not automatic variables).

In fact, _NUMERIC_ excludes automatic variables when it is expanded.


sambasiva.ravuri@tcs.com wrote:

Thanks for quick response Ballardw.

I got some of Automatic Variables info and am just sharing for the same.

_ALL_ Lists the values of all macro variables.specifies all variables that are currently defined in the current DATA step.

_AUTOMATIC_ Lists the values of all automatic macro variables

_USER_ Lists the values of all user-defined macro variables

_NUMERIC_
specifies all numeric variables that are already defined in the current DATA step.


_CHARACTER_
specifies all character variables that are currently defined in the current DATA step.

Regards,

S Ravuri.

Frequent Contributor
Posts: 139

List of Autiomatic variables in SAS ?

Posted in reply to sambasiva_ravuri_tcs_com

Also,

You can see all available automatic variables using the command in given link:-

http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/viewer.htm#a000206943.htm

%put _ALL_ ;

Contributor
Posts: 42

List of Autiomatic variables in SAS ?

Posted in reply to manojinpec

Thanks a lot for sharing nice URL.

Regards,

S Ravuri.

🔒 This topic is solved and locked.

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

Discussion stats
  • 5 replies
  • 415 views
  • 0 likes
  • 4 in conversation