•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Computer Science and Software Design section within the Software Development category of DaniWeb, a massive community of 426,436 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,279 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Computer Science and Software Design advertiser: Programming Forums
Views: 2676 | Replies: 0
![]() |
•
•
Join Date: Jun 2005
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Hello,
I need some help with setting up some SAS code to compare observations. I have over 100,000 observations with 26 variables. I have already read the data file into SAS and now it is stored as a SAS dataset. One particluar thing that I need to do is compare individual observations. I will be comparing these observations based on two variables:
Example of dataset
varibale 1 variable 2
ob1 "US1111112" "US1111224| US1111343 | US5554443"
ob2 "US1111113" "US1111113| US1111113 | US1111112"
ob3 ............ ................................
. . .
. . .
. . .
obsn ................. ................................
So I need check to see of variable 1 is located in variable 2 for obs1 in all 'n-1' observations. Then check obs2 variable 1 to see if it is variable 2 for all 'n-1' observations. Then check obsn ..... and so on. So in this example the variable 1 for obs1 is located in the variable 2 for obs2.
I am familiar with the use of arrays in java,c++, and other languages but SAS seems to be a little different. It is not apparent to me that SAS is capable of doing this in the regular DATA step alone. I greatly appreciate any help on this problem.
I need some help with setting up some SAS code to compare observations. I have over 100,000 observations with 26 variables. I have already read the data file into SAS and now it is stored as a SAS dataset. One particluar thing that I need to do is compare individual observations. I will be comparing these observations based on two variables:
Example of dataset
varibale 1 variable 2
ob1 "US1111112" "US1111224| US1111343 | US5554443"
ob2 "US1111113" "US1111113| US1111113 | US1111112"
ob3 ............ ................................
. . .
. . .
. . .
obsn ................. ................................
So I need check to see of variable 1 is located in variable 2 for obs1 in all 'n-1' observations. Then check obs2 variable 1 to see if it is variable 2 for all 'n-1' observations. Then check obsn ..... and so on. So in this example the variable 1 for obs1 is located in the variable 2 for obs2.
I am familiar with the use of arrays in java,c++, and other languages but SAS seems to be a little different. It is not apparent to me that SAS is capable of doing this in the regular DATA step alone. I greatly appreciate any help on this problem.
![]() |
•
•
•
•
•
•
•
•
DaniWeb Computer Science and Software Design Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
ajax asp blog business software computer dell design developer development erp systems experiment firefox howto india intel internet it java linux media microsoft mmorpg msdn networking news office open open-source operating programming project management rss science security software software selection source sql sun super system technology evaluation toread vista warez web wiki windows xp
- SAS users (Computer Science and Software Design)
- problem seperating string into individual letters. (C++)
- New task from Projects for the beginner: (Python)
- SAS Newbie (Computer Science and Software Design)
- SAS Help Please? (Computer Science and Software Design)
- Help with error checking code (C++)
- sorting an array of string (C)
- Essay help:comparing two professions, Software Enginering and ? (Computer Science and Software Design)
Other Threads in the Computer Science and Software Design Forum
- Previous Thread: Software Quality weblog
- Next Thread: emulator search


Linear Mode