View previous topic :: View next topic
|
Author |
Message |
koti_aug26
New User
Joined: 19 Dec 2009 Posts: 2 Location: chennai
|
|
|
|
Could anybody please help me to get a SAS program for the following requirement
The requirement is to compare two files and generate a report. Both the files have same LRECL.
//STEP2 EXEC SASPROD
//SARFILE DD DSN=INFILE1,DISP=SHR
//SARFILE1 DD DSN=INFILE2,DISP=SHR
//RESULT DD DSN=RESFILE,DISP=SHR
//SYSIN DD *
DATA SARPRINT;
INFILE SARFILE;
INFILE SARFILE1;
PROC COMPARE BASE=SARFILE COMP=SARFILE1 OUT=RESULT OUTNOEQUAL;RUN;
/*
//*
When we us e the above code. we got some errors like.
ERROR: File WORK.SARFILE.DATA does not exist.
ERROR: File WORK.SARFILE1.DATA does not exist.
Please help on this. Kindly let me know if any clarification needed.
_________________
Thanks,
Koteswararao |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
SAS PROC COMPARE only works with SAS datasets. |
|
Back to top |
|
|
koti_aug26
New User
Joined: 19 Dec 2009 Posts: 2 Location: chennai
|
|
|
|
The 2 input files were SAS datasets only. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Errrrrrrm, shouldn't you actually read the files into WORK before trying to compare them from the WORK area ? |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
No they are not. They are external files to SAS.
I advice you to read SAS Language Reference Dictionary
to obtain some knowledge about SAS. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
I advise you to not post the same question in multiple forums.
This topic is locked and with your level of experience, you should post only in our other forum.
d |
|
Back to top |
|
|
|