BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I am trying with SAS to read the two files File1 and File2 with key and data as columns. IF the keys are equal read the first file till the key changes.Then compare the keys again if the File1 key is greater than the other read the File2 or else if the File2 key is greater than the other read the File1. I need some help on the code.
1 REPLY 1
Cynthia_sas
Diamond | Level 26
Hi:
There are several ways to do what you want to do...a MERGE, an SQL Join, using the POINT= option, using KEY=. There are pros and cons to each method, depending on your data, whether it's indexed, how big the files are, whether you want only matches or you also want matches and nonmatches.

You best bet for help in this regard is to look in the documentation for examples of combining data sets (which you will find under the above statements) or to contact Tech Support for help with your particular set of data and your particular programming problem.

cynthia

Catch up on SAS Innovate 2026

Dive into keynotes, announcements and breakthroughs on demand.

Explore Now →

Health and Life Sciences Learning

 

Need courses to help you with SAS Life Sciences Analytics Framework, SAS Health Cohort Builder, or other topics? Check out the Health and Life Sciences learning path for all of the offerings.

LEARN MORE

Discussion stats
  • 1 reply
  • 1317 views
  • 0 likes
  • 2 in conversation