DATA Step, Macro, Functions and more

function

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 11
Accepted Solution

function

%let repmword=%sysfunc(mdy(&repmonth,1,&repyear),monname9.);

 

what does this function mean?


Accepted Solutions
Solution
‎12-13-2016 03:05 AM
Super User
Posts: 19,815

Re: function

%SYSFUNC(function(argument(s))<, format>)

 

The second parameter to SYSFUNC() is a format, so whatever is processed as the first argument will get formatted as MONNAME9.

 

SYSFUNC

MONNAME format -> Writes date values as the name of the month.

 

MDY() function -> Returns a SAS date value from month, day, and year values.

 

SAS Functions by Category:

http://support.sas.com/documentation/cdl/en/lefunctionsref/69762/HTML/default/viewer.htm#p0w6napahk6...

 

So first argument is creating a date and second formats it as a month. 

 

 

View solution in original post


All Replies
Solution
‎12-13-2016 03:05 AM
Super User
Posts: 19,815

Re: function

%SYSFUNC(function(argument(s))<, format>)

 

The second parameter to SYSFUNC() is a format, so whatever is processed as the first argument will get formatted as MONNAME9.

 

SYSFUNC

MONNAME format -> Writes date values as the name of the month.

 

MDY() function -> Returns a SAS date value from month, day, and year values.

 

SAS Functions by Category:

http://support.sas.com/documentation/cdl/en/lefunctionsref/69762/HTML/default/viewer.htm#p0w6napahk6...

 

So first argument is creating a date and second formats it as a month. 

 

 

☑ This topic is solved.

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

Discussion stats
  • 1 reply
  • 162 views
  • 0 likes
  • 2 in conversation