data three;
infile datalines;
input a $ b $ x $ y $ z $ m $;
return;
datalines;
A/A 21 22 23 24 25
AB 26 27 28 29 30
;
run;
proc report data=three;
run;
"/" is missing on my result. pls help. Thanks
i want this type output but i need A/A on result. why / is missing on result?
Hi:
Another character specification that can cause this behavior is ODS ESCAPECHAR, as shown below in #1 example:
As shown in the #2 report, with ODS ESCAPECHAR set to a different character, the slash in the data shows.
Interestingly, when I have SPLIT='/' I do see the A/A in the data cell:
Running SAS 9.4M7.
Cynthia
When I run your code, I see the slash in the PROC REPORT output.
Please show us a screen capture of what you are seeing. Please use the "Insert Photos" icon to include your screen capture in your reply. Do NOT attach files. Also, what SAS interface are you using (Base SAS, Enterprise Guide, SAS Studio, other) and what output destination are you using?
Tell PROC REPORT to use a different character as the SPLIT character.
data three;
infile datalines;
input a $ b x $ y $ z $ m $;
return;
datalines;
A/A 21 22 23 24 25
AB 26 27 28 29 30
;
proc report data=three split='|';
column a,(b );
define a / across;
run;
Hi:
Another character specification that can cause this behavior is ODS ESCAPECHAR, as shown below in #1 example:
As shown in the #2 report, with ODS ESCAPECHAR set to a different character, the slash in the data shows.
Interestingly, when I have SPLIT='/' I do see the A/A in the data cell:
Running SAS 9.4M7.
Cynthia
To have PROC REPORT recognize split char in DATA (as opposed to HEADERS) you have to
Solution:
data three;
infile datalines;
input a $ b $ x $ y $ z $ m $;
datalines;
A/A 21 22 23 24 25
AB 26 27 28 29 30
;
run;
proc report data=three nowd;
column a b x y z m;
run;
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.