I have a SAS program that creates data for a program review datashell. For most of our divisions there are full and part time faculty except for 1. I need the report to show that there is no full time faculty, but when this division gets to the bottom of the program it bombs due to the fact that only the part time faculty is showing up. How can I check to see if fullpart has a Full and put full in there?
Here is my code & below is the file that is created:
data fac&i.(keep=term_code crn_key division stvsubj_desc fullpart sfrstca_bill_hr);
set prdata.all_class_&i.;
by term_code crn_key;
if last.crn_key;
run;
proc summary data=fac&i.(where=(division="&div."));
class stvsubj_desc fullpart;
var sfrstca_bill_hr;
output out=sfac&i.(where=(_type_ in (0,1,2,3))) sum=cr&i.;
run;
stvsubj_desc | fullpart | _TYPE_ | _FREQ_ | cr1 |
0 | 42 | 86 | ||
Part | 1 | 42 | 86 | |
Accounting | 2 | 1 | 3 | |
Biology | 2 | 2 | 4 | |
Business Administration | 2 | 2 | 6 | |
Computer Aided Design & Draft | 2 | 1 | 3 | |
Engineering Technology | 2 | 1 | 3 | |
Human Development | 2 | 31 | 55 | |
Paralegal | 2 | 2 | 6 | |
Psychology | 2 | 2 | 6 | |
Accounting | Part | 3 | 1 | 3 |
Biology | Part | 3 | 2 | 4 |
Business Administration | Part | 3 | 2 | 6 |
Computer Aided Design & Draft | Part | 3 | 1 | 3 |
Engineering Technology | Part | 3 | 1 | 3 |
Human Development | Part | 3 | 31 | 55 |
Paralegal | Part | 3 | 2 | 6 |
Psychology | Part | 3 | 2 | 6 |
Can you provide what this is supposed to look like? It isn't quite clear.
Also it may help to provide some example input data.
One option may be to add the COMPLETYPES option to the Proc statement, provide a format for the FullPart variable with the desired text and then use the PRELOADFMT option on the class statment and use a Format statement to associate the format with the variable for the run.
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.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.