Hi,
I have a set of code. After I run it, I get one result. Which is the correct result. I come back the next day, I run the code, I didn't get anything and I have to use the break command to stop the program. It give me a message saying procedure in progress. So I restarted the computer and I...
Wow! I can't believe how hard this is with SAS. How do you remove all duplicated rows?
For example, if I have the following data set:
OBS Letter
1 A
2 A
3 A
4 B
5 C
6 D
I want a data set that removes all the As. Like the following:
OBS Letter
1...
Hi,
I have a task that requires me to merge 4 different data sets. Names of the data sets are A, B, C and D. They all have a common variable ID, age, hours, lname, fname. They each got their own unique variables such as uniqueA, uniqueB, etc. The objective of the task is to merge all 4 data...
Hi,
I have a data set with the following values for the variable name:
lastname firstname
lastname firstname
lastname firstname
how do I change it to the following?
lastname firstname
lastname firstname
lastname firstname
With 1 spaces in between. I forgot...
Hi,
I have 2 data sets. Data set Participated and Emp. Participated has all the information of participated events. Emp has the total number of employees. My objective is to calculate the % of depts that participated in the event.
For example, There 5 different depts, dept1-dept5. The total...
Hi,
I have two data sets that I need to combine them together. One of the problem I encountered is that there are different values that represent the same object.
For example, for variable A, there are values x, y, and z and they all represent 1. I am asked to change all the values from x, y...
I have a SAS data sets with a few date variables. I need to save them in mmddyy8. format so that some Access file can read it in mmddyy8. format. With informat and format, both doesn't save the date in mmddyy8. format permanently.
I used datepart, and the results are 0s. This is what I did...
Hi,
I am trying to get all the data sets after 10/01/07. This is what I have:
Data new;
set old;
informat date mmddyy8.;
format date mmddyy8.;
length track $ 3;
track = 'No'; if date > '10/01/07' then track 'Yes';
run;
It says that '10/01/07' is not valid. What should be there? I...
I have 50 variables named narrative1-narrative50. It all describes one field, narrative.
Objective: Creat an indicator variable to the data set to index for the following words: assault, injury..etc.
hm...these fields in the narrative1-narrative50 are really long...they are all sentences...
My manager has recently asked us to complete a performance plan. In it, we are asked:
1.what kind of skills we like to develop; what position we would like to pursue.
2.what areas we would like to target for improvement.
3.future training needs?
4.any certifications or degrees we would...
I have 2 SAS dataset. dataset a has the total number of employees for each dept. dataset b has the total number of employees of interest for each dept. I need to generate a histogram that list each dept with the total of number of employees, the number of employees of interest, and the...
Hi...I asked a lot of stupid questions here. I think it is due to a lack of reading and studying.
Can the experts please recommend some good SAS books for beginners, intermediate, and experts?
Thanks!
I am stuck here. I have a dataset with a column of mixed city and states. Something like Charleston, West Virginia; NYC, NY; or Los Angeles, California.
What I need to do: I need to extract the cities from this column and generate a histogram for the cities. Like, if 5 of the record are from...
Sorry about the 2nd post. In my previous post, I tried to paste data and it stretched the screen and I am not able to write anymore replies in that post because the reply windows are no where to be find.
I just want to let you know that the file is save in .sas7bdat format. The data are...
HI...i have posted a message earlier asking how to use the YEAR() funciton. However, when I applied it to the data that I have, it only returns one record, one empty record.
I have an existing data of 600 records with column names VarID, VarName, VarDate, VarInfo, VarGender...etc. The VarDate...
Hi,
I know how to use the YEAR() with raw data using with input statement. like below:
DATA dates;
INPUT name $ 1-4 @6 bday mmddyy11.;
m=MONTH(bday);
d=DAY(bday) ;
y=YEAR(bday);
wk_d=WEEKDAY(bday);
q=QTR(bday);
CARDS;
John 1 1 1960
Mary 07/11/1955
Joan 07-11-1955
Kate...
I am writing a data entry screen using FSEdit. I need to use Informat and Format to get make data entry easier and the data more clear. But somehow, when I use format, it always reads the format stored in the SAS temporary folder, work folder. I have assigned the format to a permanent library in...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.