Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: cosmid
  • Order by date
  1. cosmid

    How come I never get same result from the same code?

    Ok. I figured out why. Sorry about this. And thanks for the reply krispi.
  2. cosmid

    How come I never get same result from the same code?

    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...
  3. cosmid

    Removing duplicates

    wow! thanks! that if statement is great. and I never knew how to use the _freq_ variable. Thanks a lot!
  4. cosmid

    Removing duplicates

    I have to write it using SQL to get the result I wanted. proc sql; create table no_duplicates as select count(*) as total, Letter from mydata group by Letter having total < 2; I guess I was looking for a function that can do this. The SAS nodup in proc sort doesn't do it. It works almost like...
  5. cosmid

    Removing duplicates

    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...
  6. cosmid

    How to Create New observation in SAS

    hm...I can hardly understand your code kdt82. I need to read more SAS books. I wish I can be 1/2 as good as you guys in SAS. Thanks for the solution smalek. Now I got a better idea in using retain statement.
  7. cosmid

    How to Create New observation in SAS

    Can you please let me know the solution using a retain statement or a more efficient way of doing this? Because the way I did it only works but in a very inefficient way. If you need the result, the code I put above, you only need 9 lines of it. If you have the raw data available, all you need...
  8. cosmid

    How to Create New observation in SAS

    Hi, this is my first post in answering a question. My solution works but it is not every efficient. I tried to find materials on retain but I didn't find anything good on it. I think juanvg is right, retain should work better. There should be a more efficient way of making this work. If you got...
  9. cosmid

    Please help! Merging data sets

    Wow! Thanks for taking the time guys! I really appreciate the inputs. But you guys can ignore this thread now. I don't think the objective is possible to do. It didn't make sense logically. Instead of using a merge, the solution was to use a set statement instead. Thanks again for the time and help!
  10. cosmid

    Please help! Merging data sets

    They all have different values. So you can only keep 1 final value right?
  11. cosmid

    SAS string manipulation

    ahh..thanks! i didn't know SAS documentation can be find online!
  12. cosmid

    Please help! Merging data sets

    Yeah. I just got an email. I think I am suppose to do a set not a merge. The instructions weren't clear. But the question still exists. Is it possible to merge 4 different data sets into 1 master data set without replacing any values if the variables are the same? It is not possible right? Data...
  13. cosmid

    Please help! Merging data sets

    Sorry guys. I should had made things clear. I am not suppose to rename variables. Actually, I am required to change all the different variables in different data sets into one common variable. If hours is called HR in data set A, and HRs in data set B, Hour in C, and Hours in ABC, and for the...
  14. cosmid

    Please help! Merging data sets

    dblan: There are about 20 variables total. 8 out of the 20 variables are common variables, like age, hours, etc. I am not suppose to change variable names. My objective is to create a master file that combine all 4 data sets into a master data set. But with merge, new values will overwrite old...
  15. cosmid

    SAS string manipulation

    ahh..thanks! I never heard of this function. which book do you use?
  16. cosmid

    Please help! Merging data sets

    Yeah. But that would be using set. I suppose to merge them together. Is there anyway SAS can do this?
  17. cosmid

    Please help! Merging data sets

    Ok, let me explain again to see if I have this right. Data set A, B, and C are data from 2001, 2002, and 2003 respectively. Data set D is all background information data. I guess I should use set instead of merge on data set A, B, and C first right? And then merge them with D? Data ABC; set A...
  18. cosmid

    Please help! Merging data sets

    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...
  19. cosmid

    SAS string manipulation

    oh...I just got hope nobody will click on this thread then.
  20. cosmid

    SAS string manipulation

    Problem solved! I used the trim() function before I concatanated the 2 variables. That take cares of the space problem. Now my problem is how do I remove a thread that I posted myself?

Part and Inventory Search

Back
Top