Help using Base SAS procedures

proc report: split data (not header)

Reply
Regular Contributor
Regular Contributor
Posts: 156

proc report: split data (not header)

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 * ?
SAS Super FREQ
Posts: 8,745

Re: proc report: split data (not header)

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
Regular Contributor
Regular Contributor
Posts: 156

Re: proc report: split data (not header)

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
Ask a Question
Discussion stats
  • 2 replies
  • 123 views
  • 0 likes
  • 2 in conversation