IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SAS program for comparing files in JCL


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
koti_aug26

New User


Joined: 19 Dec 2009
Posts: 2
Location: chennai

PostPosted: Sat Dec 19, 2009 12:08 pm
Reply with quote

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
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Sat Dec 19, 2009 2:34 pm
Reply with quote

SAS PROC COMPARE only works with SAS datasets.
Back to top
View user's profile Send private message
koti_aug26

New User


Joined: 19 Dec 2009
Posts: 2
Location: chennai

PostPosted: Sat Dec 19, 2009 2:37 pm
Reply with quote

The 2 input files were SAS datasets only.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sat Dec 19, 2009 2:49 pm
Reply with quote

Errrrrrrm, shouldn't you actually read the files into WORK before trying to compare them from the WORK area ?
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Sat Dec 19, 2009 2:51 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Dec 19, 2009 4:00 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Using API Gateway from CICS program CICS 0
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top