I have 2 files, one a 'driver' file and the other the data master file. I'm using SAS version 8.0 on a mainframe using the MVS operating system. I simply want to choose all the records from the master file (File 2) where a particular field matches ANY of the values in the driver file (File 1).
It's that simple. The output would be a subset of the master file with the same length and record format.
File 1 (driver file)
---------------
Record length: 3
Format: fixed blocked RECFM=FB
Data:
123
234
345
456
567
678
789
File 2 (master file)
---------------
Record length: LRECL=354
Format: Variable Blocked RECFM=VB
Data:
matching field against driver file
|
|
V
...data here.....123....data here........
...data here.....678....data here........
...data here.....123....data here........
...data here.....345....data here........
...data here.....555....data here........
...data here.....777....data here........
...data here.....345....data here........
...data here.....123....data here........
...data here.....999....data here........
...data here.....789....data here........
The only records above that should NOT be output are the ones with 555, 777 and 999 in the matching column because they are not one of the values in the driver file.
I hope I have explained this thoroughly enough.
CAN THIS BE DONE WITH A SAS MERGE??? PLEASE HELP OUT IF YOU CAN.
THANKS,
MHW
It's that simple. The output would be a subset of the master file with the same length and record format.
File 1 (driver file)
---------------
Record length: 3
Format: fixed blocked RECFM=FB
Data:
123
234
345
456
567
678
789
File 2 (master file)
---------------
Record length: LRECL=354
Format: Variable Blocked RECFM=VB
Data:
matching field against driver file
|
|
V
...data here.....123....data here........
...data here.....678....data here........
...data here.....123....data here........
...data here.....345....data here........
...data here.....555....data here........
...data here.....777....data here........
...data here.....345....data here........
...data here.....123....data here........
...data here.....999....data here........
...data here.....789....data here........
The only records above that should NOT be output are the ones with 555, 777 and 999 in the matching column because they are not one of the values in the driver file.
I hope I have explained this thoroughly enough.
CAN THIS BE DONE WITH A SAS MERGE??? PLEASE HELP OUT IF YOU CAN.
THANKS,
MHW