Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

SAS program for comparing files in JCL

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
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    Post subject: SAS program for comparing files in JCL
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: 2429
Location: Netherlands, Amstelveen

PostPosted: Sat Dec 19, 2009 2:34 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Sat Dec 19, 2009 2:49 pm    Post subject:
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: 2429
Location: Netherlands, Amstelveen

PostPosted: Sat Dec 19, 2009 2:51 pm    Post subject:
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

Site Director


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

PostPosted: Sat Dec 19, 2009 4:00 pm    Post subject: Reply to: SAS program for comparing files in JCL
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.    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us