Define a format and associate it with your variables. You only need to specify the 'special' values, other values will adopt the default format.
proc format;
value ns
0 = "ns";
run;
data test;
array x{5};
do i = -5 to -1;
do j = 1 to 5;
x{j} = i + j;
end;
output;
end;
format x1-x5 ns.;
drop i j;
run;
proc print data=test noobs; run;
Shortest post ever! 😋
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.