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
SAS Super FREQ
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

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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