BookmarkSubscribeRSS Feed
Eva
Quartz | Level 8 Eva
Quartz | Level 8
Dear all,

I know there is a split attribute to the proc report statement. Is there anything like that for data cells? I'd like to set the split at a specific place.

As I create the data for the relevant column in a data step before I could insert a special character to mark where the split should take place.

Best regards
Eva

data myfile;
set myinput;
mycol1 = "This is data where I'd like to split*like after this star";
mycol2 = 1;
output;
mycol1 = "hello*next line";
mycol2 = 2;
output;
mycol1 = "another hello*another next line";
mycol2 = 2;
output;
run;

proc report data=myfile;
column mycol1 mycol2;
define mycol1 / group;
define mycol2 / analysis sum;
run;

How do I define for mycol1 split into 2 rows at the character * ?
2 REPLIES 2
Cynthia_sas
Diamond | Level 26
Hi,
You will want to look up ODS ESCAPECHAR in previous forum postings, Tech Support notes and user group papers. This feature of ODS has been around for a while now and there is one form for 9.1.3 and earlier and a different form for 9.2 release.

The basic method is
1) declare your escape character
2) use your escape character in text

The only thing is that the listing destination does not use ODS ESCAPECHAR.

Cynthia
Eva
Quartz | Level 8 Eva
Quartz | Level 8
Dear Cynthia,

thanx a lot. I wouldn't have found it without the hint to escapechar. It's amazing how much you can do with it!

Best regards,
Eva

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 2 replies
  • 1171 views
  • 0 likes
  • 2 in conversation