Hi:
You can do what you want with PROC REPORT. It takes a bit of adjustment, especially if your date is a numeric variable, which is what I show in the program below.
First, Clerk_id and name are made NOPRINT variables. Date is also a NOPRINT variable. PRTDATE is a computed variable -- it will either hold the character string for the date or it will hold the value "Weekly Totals" at the summary line from the BREAK statement. The format WKDT serves a double purpose -- it will use the weekdate18. format for any date in the file, but then it will also use the label "Weekly Total" when date is missing. Since I set date to missing on the BREAK line (see the IF statement in the COMPUTE block for PRTDATE), I know that it occurs on the break line.
Because Clerk_ID and NAME both occur on the first summary line, I use COMPUTE BEFORE NAME to write the pseudo-header line that contains the CLERK_ID and the NAME for every group of days for that person. You do NOT need to perform a summarize in order to write something out with a LINE statement, when you are doing the COMPUTE BEFORE an order or group variable.
I used HTML because I wanted to left justify the string written with the COMPUTE BEFORE NAME and I wanted to use the HEADER style for the BEFORE LINE and the Weekly Total line.
Hope this helps,
cynthia
ps...not teaching...I was at a user group conference, presenting a paper.
[pre]
data clerk;
infile datalines;
input clerk_id name $ date : mmddyy10. numvar;
return;
datalines;
111 Alan 06/02/2008 10
111 Alan 06/02/2008 10
111 Alan 06/02/2008 10
111 Alan 06/03/2008 10
111 Alan 06/03/2008 10
111 Alan 06/04/2008 10
111 Alan 06/04/2008 10
111 Alan 06/05/2008 10
111 Alan 06/05/2008 10
111 Alan 06/05/2008 10
111 Alan 06/06/2008 10
111 Alan 06/06/2008 10
112 Bob 06/02/2008 15
112 Bob 06/02/2008 15
112 Bob 06/03/2008 15
112 Bob 06/03/2008 15
112 Bob 06/03/2008 15
112 Bob 06/04/2008 15
112 Bob 06/04/2008 15
112 Bob 06/05/2008 15
112 Bob 06/05/2008 15
112 Bob 06/05/2008 15
112 Bob 06/06/2008 15
112 Bob 06/06/2008 15
;
run;
proc format;
value wkdt low-high= [weekdate18.]
. = 'Weekly Totals';
run;
ods html file='c:\temp\Clerk.html' style=sasweb;
proc report data=clerk nowd
style(summary)=Header;
column clerk_id name date prtdate numvar;
define clerk_id / group noprint;
define name / group noprint;
define date / group order=internal noprint;
define prtdate / computed;
define numvar / sum;
break after clerk_id / summarize skip;
compute before name /
style=Header{just=left};
line 'Clerk Info: ' clerk_id 3.0 ' ' name $8.;
endcomp;
compute prtdate/ character length=30;
if upcase(_break_) = 'CLERK_ID' then
date = .;
prtdate = put(date,wkdt.);
endcomp;
compute after clerk_id;
line ' ';
endcomp;
run;
ods html close;
[/pre]