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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Compare today's GDG file with that of yesterday's
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 Moderator


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

PostPosted: Fri May 15, 2009 9:52 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


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