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: 2276
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 11 Tue May 16, 2017 2:20 pm
No new posts member list compare jzhardy TSO/ISPF 6 Fri May 12, 2017 3:18 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


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