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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 713 views
  • 0 likes
  • 2 in conversation