Hi,
Since i am concatenating some variables that are not currently present in the current data but will be in future data extract, it is giving me "uninitialized" log message. How would I prevent this from happening without removing the variables in my program?
program (test3 not present in current data):
var=catx(', ' , test1, test2, test3);
log message:
"Note: Variable test3 is uninitialized."
Depends partly on how the rest of the program is structured.
One way that would work is to reference the variables in an ARRAY statement. If they are all of the same type (or at supposed to be) then you could record as:
array x test1-test3 ;
var=catx(', ' , of x[*]);
Depends partly on how the rest of the program is structured.
One way that would work is to reference the variables in an ARRAY statement. If they are all of the same type (or at supposed to be) then you could record as:
array x test1-test3 ;
var=catx(', ' , of x[*]);
Before you use them in formula, you should define them with their max length, for example:
Length test1 test2 test3 $10;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: