subroutine calc_years(maturity, current_date, years); outargs years; years=(maturity - current_date) / 365.25; endsub;
data _null_; myCD='23jul2017'd; now=today(); how_many_years=.; call calc_years(myCD,now,how_many_years); put how_many_years=; run;
Descriptions
|
Function
|
Subroutine
|
---|---|---|
Accepts arguments
|
yes
|
yes
|
Modifies arguments
|
no
|
yes
|
Returns a value
|
yes
|
no
|
Is an expression
|
yes
|
no
|
Is a statement
|
no
|
yes
|
Can be part of a statement
|
yes
|
no
|
Begins with CALL
|
no
|
yes
|