I have written the 'stdid' function using proc fcmp, I have used attrib statement but unfortunately i am getting the warning like "WARNING: The LABEL statement has no effect in a FUNCTION or SUBROUTINE."
I have referred the following SAS site.
proc fcmp outlib=sasuser..study.demo;
function stdid(var1 $) $;
attrib var2 length=$25 format=$upcase9. label='x';
var2=tstrip(var1);
return(var2);
endsub;
run;
That is because inside the function you are only dealing with temporary variables (that will not appear in the step where you call the function), and the output is just a value, with no attributes other than length.
Therefore only the length= has an effect.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.