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

compare two sequential file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
SAKTHIBALA

New User


Joined: 01 Mar 2007
Posts: 1
Location: chennai

PostPosted: Mon Sep 29, 2008 5:38 pm
Reply with quote

I have a two versions of file with the following fields

1.Number(9(16)
2.ID-X(8)
3.Code- x(1).

The second version of the file contains the same records as that of version one, Number field value alone be updated for some of the records. I need to capture those records whose Number field value is changed.

kindly suggest me a way to solve this using JCL.
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Mon Sep 29, 2008 5:44 pm
Reply with quote

Quote:
kindly suggest me a way to solve this using JCL.

Impossible.

With JCL and a program( utility or not ), yes
Back to top
View user's profile Send private message
hchinnam

New User


Joined: 18 Oct 2006
Posts: 73

PostPosted: Mon Sep 29, 2008 5:52 pm
Reply with quote

Assuming neither of the files will have duplicates, Following code should work for you

Code:


//STEP0020 EXEC PGM=ICETOOL                                       
//SYSPRINT DD SYSOUT=*                                           
//DFSMSG   DD SYSOUT=*                                           
//TOOLMSG  DD SYSOUT=*                                           
//OUT      DD SYSOUT=*                                           
//TEMP     DD DISP=(MOD,PASS),DSN=&&TEMP1                         
//IN1      DD DSN=INPUT1,DISP=SHR                                 
//         DD DSN=INPUT2,DISP=SHR                                 
//TOOLIN   DD *                                                   
  COPY FROM(IN1) TO(TEMP) USING(CTL1)                             
  SPLICE FROM(TEMP) TO(OUT) ON(17,8,CH) ON(25,1,CH) WITH(1,16)   
//CTL1CNTL DD *                                                   
  SUM FIELDS=NONE                                                 
/*                                                               

Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Mon Sep 29, 2008 6:02 pm
Reply with quote

SAKTHIBALA,

Which Sort product are you using - DFSORT or SYNCSORT?
Also, on knowing that the Number field has changed what all fields you need to write into output?
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Sep 29, 2008 6:02 pm
Reply with quote

Check if you can use this
Code:

//SUP    EXEC PGM=ISRSUPC,         
//            PARM=(DELTAL,LINECMP,
//            ' SEQ',             
//            '')                 
//NEWDD  DD DSN=..FILE1, 
//          DISP=SHR               
//OLDDD  DD DSN=..DFILE2, 
//          DISP=SHR               
//OUTDD  DD SYSOUT=*               
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Sep 29, 2008 6:28 pm
Reply with quote

You may want to add below
Code:

//SYSIN DD *   
  CMPCOLM 1:16
/*             
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Mon Sep 29, 2008 9:55 pm
Reply with quote

SAKTHIBALA wrote:
I have a two versions of file ... I need to capture those records whose Number field value is changed.

Do you want the changed records from File 1 or File 2, or both?
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 -> JCL & VSAM

 


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