@hamza_saspg wrote:
@ballardw I see your point but the expected is to concatenate two empty variables and be able to exclude the separator in case one or multiple variables are empty, so I need an approach considering an existing structure based on prx functions and macros
Perhaps some examples of what you have and what you expect for output.
The CATX function will insert a string as you describe if I understand the requirement.
data example;
var1 = '';
var2 = 'sometext';
var3 = '';
var4 = 'something else';
out1 = catx('|',var1,var2);
out2 = catx('|',var1,var3,var2);
out3 = catx('|',var1,var3,var2,var4);
out4 = catx('|',var1,var1,var3);
out5 = catx('|',var2,var1,var3,var4);
run;
... View more