View previous topic :: View next topic
|
Author |
Message |
SAKTHIBALA
New User
Joined: 01 Mar 2007 Posts: 1 Location: chennai
|
|
|
|
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 |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
Quote: |
kindly suggest me a way to solve this using JCL. |
Impossible.
With JCL and a program( utility or not ), yes |
|
Back to top |
|
|
hchinnam
New User
Joined: 18 Oct 2006 Posts: 73
|
|
|
|
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 |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
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 |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
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 |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
You may want to add below
Code: |
//SYSIN DD *
CMPCOLM 1:16
/*
|
|
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
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 |
|
|
|