Hi!
I need some help trouble shooting a little piece of my code. I'm getting error, but not sure why...
I need the output to look like mean(std) or x.x(x.xx) --
sord=2;
_1=cat(strip(put(mean, 8.1)), ' (' strip(put(std, 10.2))')');
output;
and second, the next output to look like Min,Max x,x
sord = 4;
_1=cat(strip(put(MIN,8.)),", "(put(MAX,8.)));
output;
I'm getting syntax errors an probably missing a parenthesis somewhere...but please help! thx!
If it's parenthesis, count them.
I think you're missing comma's actually - put each item on it's own line to see this, with the comma at the front of the item.
Use CATT or CATS instead of CAT.
_1=cat(
strip(put(mean, 8.1))
, ' ('
<MISSING COMMA HERE>
strip(put(std, 10.2))
<MISSING COMMA HERE>
')'
);
If it's parenthesis, count them.
I think you're missing comma's actually - put each item on it's own line to see this, with the comma at the front of the item.
Use CATT or CATS instead of CAT.
_1=cat(
strip(put(mean, 8.1))
, ' ('
<MISSING COMMA HERE>
strip(put(std, 10.2))
<MISSING COMMA HERE>
')'
);
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 25. 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.