Go Back   Rhinocerus > Newsgroup > Newsgroup comp.soft-sys.sas

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 10-29-2004, 08:05 PM
Mathew Chandler
Guest
 
Posts: n/a
Default Number of Records

Using the following program, it does everything I want it to do, but one.
I need to show the number of records scanned. Can anyone help me with how
to get this information to show up in the report?

Options Nodate Nonumber FORMDLIM='_';
Data SETeval;
Retain Enroll 100 Rubric '010110001000' Fac '01' Dept '01' Course
'100' Prof 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
Input Test @;
If Test > 7 then do;
Enroll=Test ;
Input Rubric $ Prof $;
Fac=substr(Rubric,1,2);
Dept=substr(Rubric,3,2);
Course=substr(Rubric,5,3) || "-" || substr(Rubric,8,2);
Rubric=substr(Rubric,1,2) || "-" || substr(Rubric,3,2) || "-" ||
substr(Rubric,5,3) || "-" || substr(Rubric,7,2);
end;
else do;
A1 = Test;
Input A2 A3 A4 A5 A6 A7 A8 A9 An10 An11 An12 B1 B2 B3 B4 B5 B6 B7 B8
B9 Bn10 Bn11 Bn12 Bn13 $ Bn14 $ Bn15 $ Faculty $ Status $ Required $
ExGrade $
Gender $ D1 D2 D3 D4 D5 D6 D7 D8 D9 Dn10 Dn11 Dn12;
Label Rubric = 'Course'
Prof = 'Instructor'
Enroll = 'Enrollment'
Bn13 = 'Initial Enthusiasm'
Bn14 = 'Present Enthusiasm'
Bn15 = 'Recommend Course'
Faculty = 'Student Faculty'
Status = 'Year in School'
ExGrade = 'Expected Grade'
Required = 'Course Reqd';
If Bn13 = 'l' then Bn13 = 'Low';
If Bn13 = 'm' then Bn13 = 'Medium';
If Bn13 = 'h' then Bn13 = 'High';
If Bn14 = 'l' then Bn14 = 'Low';
If Bn14 = 'm' then Bn14 = 'Medium';
If Bn14 = 'h' then Bn14 = 'High';
If Bn15 = 'y' then Bn15 = 'Yes';
If Bn15 = 'n' then Bn15 = 'No';
If Faculty = '01' then Faculty = 'Arts';
If Faculty = '02' then Faculty = 'Soc Sci';
If Faculty = '03' then Faculty = 'Sci';
If Faculty = '04' then Faculty = 'Bus';
If Faculty = '05' then Faculty = 'Ed';
If Faculty = '06' then Faculty = 'Eng';
If Faculty = '07' then Faculty = 'HK';
If Faculty = '08' then Faculty = 'Law';
If Faculty = '11' then Faculty = 'Nurs';
If Faculty = '14' then Faculty = 'IF Prog';
If Status = '1' then Status = '1st yr';
If Status = '2' then Status = '2nd yr';
If Status = '3' then Status = '3rd yr';
If Status = '4' then Status = '4th yr';
If Status = '5' then Status = '5th yr';
If Status = 'e' then Status = 'B.Ed.';
If Status = 'g' then Status = 'Grad';
If Status = 'l' then Status = 'Law';
If Status = 'o' then Status = 'Other';
If Required = 'r' then Required = 'Required';
If Required = 'nr' then Required = 'Not Reqd';
If ExGrade = 'a' then ExGrade = 'A';
If ExGrade = 'b' then ExGrade = 'B';
If ExGrade = 'c' then ExGrade = 'C';
If ExGrade = 'd' then ExGrade = 'D';
If ExGrade = 'f' then ExGrade = 'F';
If Gender = 'f' then Gender = 'Female';
If Gender = 'm' then Gender = 'Male';
Output;
End;
Cards;
24 036213002 Green,Carol
2 3 4 5 6 7 2 3 4 5 6 7 2 3 4 5 6 7 2 3 4 5 6 7 l l n 03 1 r b f 2 3 4 5 6
7 2 3 4 5 6 7
4 5 6 7 2 3 4 5 6 7 2 3 4 5 6 7 2 3 4 5 6 7 2 3 m m n 04 4 nr b m 7 6 5 4 3
2 7 6 5 4 4 3
3 3 3 3 3 3 3 3 3 3 4 3 3 3 3 3 3 3 3 3 3 3 3 3 h h y 03 5 r c m 3 3 3 3 3
3 3 3 3 3 3 3
4 4 4 4 4 4 4 4 4 4 6 4 4 4 4 4 4 4 4 4 4 4 4 4 m h y 04 2 nr a f 4 4 4 4 4
4 4 4 4 4 4 4
5 5 5 5 5 5 5 5 5 5 6 5 5 5 5 5 5 5 5 5 5 5 5 5 m l n 04 o nr b m 5 5 5 5 5
5 5 5 5 5 5 5
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6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 04 2 nr b f 5 4 3 5 4
3 5 4 3 5 4 2
5 4 3 6 5 4 3 6 5 4 3 6 5 4 3 6 5 4 6 3 6 5 4 5 m m y 03 2 r a m 5 4 3 6 5
4 3 6 3 6 5 4
7 6 5 4 6 5 4 5 7 6 5 4 2 5 4 5 6 4 2 5 5 4 5 5 h m y 04 2 nr b f 5 4 2 6 5
4 7 5 2 6 5 4
5 3 2 5 4 2 3 2 5 4 2 5 3 2 5 4 2 5 3 2 1 5 2 3 m l n 03 1 r c m 4 2 3 2 5
4 2 3 2 4 2 1
6 5 4 6 5 4 6 5 4 6 5 4 6 5 4 6 5 4 5 6 5 4 5 6 m m y 03 2 r a f 5 6 4 6 5
4 5 6 5 4 5 5
3 5 4 6 5 7 4 5 6 5 3 6 5 4 5 6 4 5 4 5 4 5 4 6 m h n 04 2 nr b f 5 6 5 4 5
6 5 4 5 6 5 4
;
Data SETeval;
set SETeval;
x=_N_;
Proc Sort Data=SETeval;
By Rubric Prof Enroll Dept;
Proc Transpose Data=SETeval name=Variable out=outA1 (rename=(col1=Value));
By Rubric Prof Enroll Dept x;
Var A1-A9 An10-An12;
Proc Sort data=OutA1;
By Rubric Prof Enroll variable value;
Proc Summary data=outA1 nway;
Class Rubric Prof Enroll variable value;
Output out=outAN (drop=_type_);
Data finalA2;
merge outA1 outAN;
By Rubric Prof Enroll variable value;
newval=value;
drop x;
Proc Summary data=finalA2 nway;
Class variable;
var value;
output out=outAM (drop=_type_ _freq_) mean=/ autoname;
Proc Sort data=finalA2;
By variable;
Data finalA3;
merge finalA2 outAM;
by variable;
Proc Sort data=finalA3;
by Rubric Prof Enroll;
proc report data=finalA3 nocenter nowd panels=8;
by rubric prof enroll;
column variable value, _freq_ total newval;
define variable / group 'Variable';
define value / across;
define _freq_ / mean format=3. ' ';
define total / computed format=5. 'Total';
define newval / 'Mean' mean format=5.1;
compute total;
total=sum(_c2_,_c3_,_c4_,_c5_,_c6_,_c7_,_c8_);
endcomp;
title 'Instructor';
run;
Proc Transpose Data=SETeval name=Variable out=outB1 (rename=(col1=Value));
By Rubric Prof Enroll Dept x;
Var B1-B9 Bn10-Bn12;
Proc Sort data=OutB1;
By Rubric Prof Enroll variable value;
Proc Summary data=outB1 nway;
Class Rubric Prof Enroll variable value;
Output out=outBN (drop=_type_);
Data finalB2;
merge outB1 outBN;
By Rubric Prof Enroll variable value;
newval=value;
drop x;
Proc Summary data=finalB2 nway;
Class variable;
var value;
output out=outBM (drop=_type_ _freq_) mean=/ autoname;
Proc Sort data=finalB2;
By variable;
Data finalB3;
merge finalB2 outBM;
by variable;
Proc Sort data=finalB3;
by Rubric Prof Enroll;
proc report data=finalB3 nocenter nowd panels=8;
by rubric prof enroll;
column variable value, _freq_ total newval;
define variable / group 'Variable';
define value / across;
define _freq_ / mean format=3. ' ';
define total / computed format=5. 'Total';
define newval / 'Mean' mean format=5.1;
compute total;
total=sum(_c2_,_c3_,_c4_,_c5_,_c6_,_c7_,_c8_);
endcomp;
title 'Course';
run;
proc report data=SETeval nocenter nowd;
column n Bn13, (n pct13) Bn14, (n pct14) Bn15, (n pct15);
define Bn13 / across;
define Bn14 / across;
define Bn15 / across;
define pct13 / computed format=percent8.2 ' ';
define pct14 / computed format=percent8.2 ' ';
define pct15 / computed format=percent8.2 ' ';
define n / noprint;
compute pct13;
_c3_=_c2_/n;
_c5_=_c4_/n;
_c7_=_c6_/n;
endcomp;
compute pct14;
_c9_=_c8_/n;
_c11_=_c10_/n;
_c13_=_c12_/n;
endcomp;
compute pct15;
_c15_=_c14_/n;
_c17_=_c16_/n;
endcomp;
run;

Proc Transpose Data=SETeval name=Variable out=outD1 (rename=(col1=Value));
By Rubric Prof Enroll Dept x;
Var D1-D9 Dn10-Dn12;
Proc Sort data=OutD1;
By Rubric Prof Enroll variable value;
Proc Summary data=outD1 nway;
Class Rubric Prof Enroll variable value;
Output out=outDN (drop=_type_);
Data finalD2;
merge outD1 outDN;
By Rubric Prof Enroll variable value;
newval=value;
drop x;
Proc Summary data=finalD2 nway;
Class variable;
var value;
output out=outDM (drop=_type_ _freq_) mean=/ autoname;
Proc Sort data=finalD2;
By variable;
Data finalD3;
merge finalD2 outDM;
by variable;
Proc Sort data=finalD3;
by Rubric Prof Enroll;
proc report data=finalD3 nocenter nowd panels=8;
by rubric prof enroll;
column variable value, _freq_ total newval;
define variable / group 'Variable';
define value / across;
define _freq_ / mean format=3. ' ';
define total / computed format=5. 'Total';
define newval / 'Mean' mean format=5.1;
compute total;
total=sum(_c2_,_c3_,_c4_,_c5_,_c6_,_c7_,_c8_);
endcomp;
title 'Other';
Run;

Proc Report data=SETeval nocenter nowd panels=8;
column Faculty An12 n Bn12 n;
define Faculty / 'Student Faculty' group;
define An12 / mean format=7.2;
define Bn12 / mean format=7.2;
define n / format=3.;
title 'By Faculty';
run;

proc report data=SETeval nocenter nowd panels=8;
column Status An12 n Bn12 n;
define Status / 'Year of Student' group;
define An12 / mean format=7.2;
define Bn12 / mean format=7.2;
define n / format=3.;
title 'By Year in School ';
Run;

proc report data=SETeval nocenter nowd panels=8;
column Bn13 An12 n Bn12 n;
define Bn13 / 'Initial' group;
define An12 / mean format=7.2;
define Bn12 / mean format=7.2;
define n / format=3.;
title 'By Initial Enthusiasm ';
Run;

proc report data=SETeval nocenter nowd panels=8;
column Bn14 An12 n Bn12 n;
define Bn14 / 'Present' group;
define An12 / mean format=7.2;
define Bn12 / mean format=7.2;
define n / format=3.;
title 'By Enthusiasm now';
Run;

proc report data=SETeval nocenter nowd panels=8;
column ExGrade An12 n Bn12 n;
define ExGrade / 'Grade' group;
define An12 / mean format=7.2;
define Bn12 / mean format=7.2;
define n / format=3.;
title 'By Expected Grade';
Run;

proc report data=SETeval nocenter nowd panels=8;
column Required An12 n Bn12 n;
define Required / 'Course Required' group ;
define An12 / mean format=7.2;
define Bn12 / mean format=7.2;
define n / format=3.;
title 'By Course Status';
Run;

proc report data=SETeval nocenter nowd panels=8;
column Gender An12 n Bn12 n;
define Gender / 'Gender' group;
define An12 / mean format=7.2;
define Bn12 / mean format=7.2;
define n / format=3.;
title 'By Gender';
Run;

proc report data=SETeval nocenter nowd panels=8;
column Bn15 An12 n Bn12 n;
define Bn15 / "Recomm'd" group;
define An12 / mean format=7.2;
define Bn12 / mean format=7.2;
define n / format=3.;
title 'Recomm*d Course';
Run;


Mathew Chandler
Associate Computing Consultant-Client Support & Services
I.T. Services
University of Windsor
Windsor, Ontario, Canada
N9B 3P4
(519) 253-3000 ext. 2768
mchandle@uwindsor.ca
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Tracking number of records processed in a SAS job Jim Groeneveld Newsgroup comp.soft-sys.sas 1 10-21-2008 07:27 AM
Re: Tracking number of records processed in a SAS job Daniel Nordlund Newsgroup comp.soft-sys.sas 0 10-20-2008 05:08 PM
Re: Tracking number of records processed in a SAS job Mary Newsgroup comp.soft-sys.sas 0 10-20-2008 04:53 PM
Re: Tracking number of records processed in a SAS job Satindra Chakravorty Newsgroup comp.soft-sys.sas 0 10-20-2008 04:42 PM
Re: select certain number of records David L. Cassell Newsgroup comp.soft-sys.sas 0 05-24-2005 08:53 PM



All times are GMT. The time now is 05:39 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.