Hello,
Please, I would why when we call some sas function (ex: upcase, lowercase, ...) , sas sends an error message, it does not regonize the function. why ? and how can we identify the main raison for the matter ? is it a question of package ?
Example, with log please.
Because it's not a valid function in the manner you're trying to use it.
SAS functions are upcase and lowcase (low vs lower). SAS SQL allows upper/lower to work to convert case as well, but those won't work in a data step.
FEDSQL has a set of specific functions available.
IML has a different set of functions.
SAS SQL has a few different ones as well.
If you're using SQL Pass Thru you need to use the native DB functions, ie Oracle or T-SQL.
If you try to use an IML function in SAS SQL its not going to work, except there are overlaps. For example up until 9.4 the median function worked in PROC SQL but wasnt' what you expect.
Find the relevant sections of the docs and bookmark them for reference.
@ll: Thank you all.
I think, it can be a question of prfil or sas package ?
So, how can we check , if the function existes ? and why it does not existe ?
Read the documentation.
which one ?
Just google sas function functionname.
It's really that easy.
@Kurt_Bremser that does not reply to my question
You can take an example with
https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000245965.htm
Start by running this code:
proc format library=work; value poorothergrp 0 -<14 ='Top' 14 - 30='Bottom'; run;
Which will give the names of currently available functions and some other info.
There may be some that are in the result that aren't generally documented or apply to products that you don't have licensed or only apply to some operating systems
@ballardw : Thank you
Until now, I do not know see that ?, when I use this code
proc format library=work;
value poorothergrp
0 -<14 ='Top'
14 - 30='Bottom';
run;
data test;
v=3;
y=max(7,8);
run;
proc format
library = work;
select poorothergrp;
run;
@LineMoon wrote:
@ballardw : Thank you
Until now, I do not know see that ?, when I use this code
proc format library=work;
value poorothergrp
0 -<14 ='Top'
14 - 30='Bottom';
run;
data test;
v=3;
y=max(7,8);
run;
proc format
library = work;
select poorothergrp;
run;
Are you attempting to get the description of the format? You need to tell the procedure which catalog to look at.
Perhaps you are wanting:
proc format library = work fmtlib; select poorothergrp; run;
to use the default FORMATS catalog in the work library.
thank you.
proc format library = work fmtlib;
select poorothergrp;
run;
So, I have used it, I see in "result", the format of poorothergrp.
But, I do not get the informations about the functions : max,...
@LineMoon wrote:
thank you.
proc format library = work fmtlib;
select poorothergrp;
run;
So, I have used it, I see in "result", the format of poorothergrp.
But, I do not get the informations about the functions : max,...
what are you looking for? You haven't said. Proc FORMAT will only return information about FORMATS, not functions. The code for the dictionary.functions, save as sashelp.vfunc, lists the names of valid functions and a little bit about it, not syntax or behavior. That is what documentation contains. You might try looking at your online help from SAS for Base SAS and functions
@ballardw I think the code you posted may have been intended for another question. Proc Format doesn't come into play when searching for functions.
The documentation is the source of truth, bible, gold standard, etc.
SASHELP.VFUNC
If you ever want listings of something look at the SASHELP tables.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.