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

Compare today's GDG file with that of yesterday's


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
raghavmcs

Active User


Joined: 14 Jul 2005
Posts: 105

PostPosted: Fri May 15, 2009 7:43 pm
Reply with quote

I want to compare today's GDG file with that of yesterday's the purpose is to get the only the records which have bene changed as per the batch update. Both of the files are 1000 bytes LRECL. I don't have any keys to compare. I tried to achieve this using the where in1 and in2 are my 1000 lenght files. I'm not satisfied with the results as it doesn't appear correct to me. Both the files are around 1GB in production. Please suggest If I'm doing something wrong or this can be achieved by some other way, thanks

Code:

COPY FROM(IN1) TO(T1) USING(CTL1)                       
COPY FROM(IN2) TO(T1) USING(CTL2)                       
SELECT FROM(T1) TO(OUT) ON(1,1000,CH) - 
  NODUPS USING(CTL3)                                       
/*                                                       
//CTL1CNTL DD *                                         
  INREC OVERLAY=(1000:C'1')                             
/*                                                       
//CTL2CNTL DD *                                         
  INREC OVERLAY=(1000:C'2')                             
/*                                                       
//CTL3CNTL DD *                                         
  OUTFIL FNAMES=OUT,INCLUDE=(1000,1,CH,EQ,C'2'),         
   BUILD=(1,1000)                                       
/*
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri May 15, 2009 9:52 pm
Reply with quote

Since you put a '1' in position 1000 for file1 and a '2' in position 1000 file file2 and then used ON(1,1000,CH) every record from file1 and file2 will be a nonduplicate - they will all differ in position 1000.

Try using 1001 instead of 1000 for the id in the OVERLAY and ON operands.

If that doesn't work, then you need to show an example of the records in each input file (relevant fields only) and the expected output records, and explain what you're trying to do.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


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 FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top