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 two sequential file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: compare two sequential file
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: 456
Location: Belgium

PostPosted: Mon Sep 29, 2008 5:44 pm    Post subject:
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    Post subject:
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: 2181
Location: @my desk

PostPosted: Mon Sep 29, 2008 6:02 pm    Post subject:
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    Post subject:
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    Post subject:
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: 500
Location: USA

PostPosted: Mon Sep 29, 2008 9:55 pm    Post subject: Re: compare two sequential file
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


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