BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Daily1
Quartz | Level 8
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?

Daily1_0-1689595426277.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
Diamond | Level 26

Hi:

  Another character specification that can cause this behavior is ODS ESCAPECHAR, as shown below in #1 example:

Cynthia_sas_0-1689617880998.png

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:

Cynthia_sas_1-1689618091049.png

  Running SAS 9.4M7.

 

Cynthia

 

View solution in original post

7 REPLIES 7
PaigeMiller
Diamond | Level 26

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?

--
Paige Miller
Tom
Super User Tom
Super User

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;
Cynthia_sas
Diamond | Level 26

Hi:

  Another character specification that can cause this behavior is ODS ESCAPECHAR, as shown below in #1 example:

Cynthia_sas_0-1689617880998.png

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:

Cynthia_sas_1-1689618091049.png

  Running SAS 9.4M7.

 

Cynthia

 

Tom
Super User Tom
Super User

To have PROC REPORT recognize split char in DATA (as opposed to HEADERS) you have to 

  1. Define the column to use the FLOW option.
  2. Direct the output to the LISTING destination instead of ODS.

 

Cynthia_sas
Diamond | Level 26
Hi, @Tom:
That's correct; however the original posting showed HTML output not LISTING, and the code showed no change to the SPLIT= option, so the default was in effect. I haven't had a chance to test the original code in EG yet, but I suspect it won't make a difference.
Thanks for the clarification.
Cynthia
Daily1
Quartz | Level 8
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;

Daily1_0-1689615493654.png

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

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!

Register Now

Creating Custom Steps in SAS Studio

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 1473 views
  • 4 likes
  • 4 in conversation