DATA Step, Macro, Functions and more

%SYSGET

Accepted Solution Solved
Reply
New Contributor
Posts: 4
Accepted Solution

%SYSGET

Hi Everyone..

Can any one explain what exactly %SYSGET can do????

Thanks...


Accepted Solutions
Solution
‎04-03-2012 08:17 AM
Super Contributor
Posts: 276

%SYSGET

Hi..

The %SYSGET function returns the value as a character string. If the value is truncated or the variable is not defined on the operating environment, %SYSGET displays a warning message in the SAS log.

Ex:

%let person=%sysget(USER);

%put User is &person;


When these statements execute for user ABCDEF, the following
is written to the SAS log: 

User is abcdef

Thanks..

Sanjeev

View solution in original post


All Replies
Regular Contributor
Posts: 233
Solution
‎04-03-2012 08:17 AM
Super Contributor
Posts: 276

%SYSGET

Hi..

The %SYSGET function returns the value as a character string. If the value is truncated or the variable is not defined on the operating environment, %SYSGET displays a warning message in the SAS log.

Ex:

%let person=%sysget(USER);

%put User is &person;


When these statements execute for user ABCDEF, the following
is written to the SAS log: 

User is abcdef

Thanks..

Sanjeev

New Contributor
Posts: 4

%SYSGET

Thank you all...

☑ This topic is SOLVED.

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

Discussion stats
  • 3 replies
  • 270 views
  • 0 likes
  • 3 in conversation