View previous topic :: View next topic
|
Author |
Message |
raak
Active User
Joined: 23 May 2006 Posts: 166 Location: chennai
|
|
|
|
i have a problem with sorting my 2 input files.
i have my input files A and B both of Lrecl 100 and FB.
what i need to do is to perform a one-to-one comparison on the 74th column of the records in the files A and B.
i.e the 74th column of the 1st record of fileA is to be matched against the 74th column of 1st record of fileB. and i have to write in to the output only if that field is not matching...
IF 74th column of fileA and fileB is common for 1st records, then that record should not come in output file.
IF 74th column of fileA and fileB is different for 2nd records, then that record should come in output file.
this is my preferred output.
is there any way i can do this without using SPLICE. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
is there any way i can do this without using SPLICE. |
You can do it with the SELECT operator of DFSORT's ICETOOL. Why can't you use SPLICE? Can you not use SELECT for the same reason? |
|
Back to top |
|
|
raak
Active User
Joined: 23 May 2006 Posts: 166 Location: chennai
|
|
|
|
hi frank
can u give me the jcl for that... How can we use SELECT for this. can u just show me the jcl for the SELECT option... |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
IF 74th column of fileA and fileB is different for 2nd records, then that record should come in output file. |
What exactly do you want for output when the records don't match? Just the record from fileA? Just the record from fileB? The records from fileA and fileB?
For example:
FileA record1 has 'A' in position 74.
FileB record1 has 'B' in position 74.
Should the output file have:
1) FileA record1
2) FileB record1
3) FileA record1 and FileB record 1 |
|
Back to top |
|
|
raak
Active User
Joined: 23 May 2006 Posts: 166 Location: chennai
|
|
|
|
hi frank
i just need the record from file A to come in the output file when the 74 th column is non-matching..
can u show me the jcl for doing that...
thanks |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Here's a DFSORT/ICETOOL job that will do what you asked for:
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=... input file1 (FB/100)
//IN2 DD DSN=... input file2 (FB/100)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=... output file (FB/100)
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SELECT FROM(T1) TO(OUT) ON(109,8,ZD) ON(74,1,CH) NODUPS -
USING(CTL3)
/*
//CTL1CNTL DD *
INREC OVERLAY=(101:C'1',109:SEQNUM,8,ZD)
/*
//CTL2CNTL DD *
INREC OVERLAY=(101:C'2',109:SEQNUM,8,ZD)
/*
//CTL3CNTL DD *
OUTFIL FNAMES=OUT,INCLUDE=(101,1,CH,EQ,C'1'),
BUILD=(1,100)
/*
|
|
|
Back to top |
|
|
raak
Active User
Joined: 23 May 2006 Posts: 166 Location: chennai
|
|
|
|
this one is working fine...
thanks frank.... |
|
Back to top |
|
|
|