View previous topic :: View next topic
|
Author |
Message |
tanvi110788
New User
Joined: 19 May 2020 Posts: 5 Location: India
|
|
|
|
Hi,
I have a requirement where in I receive 6 or more files from upstream application into a GDG. I want to compare those all generations with one another to see any duplicates, i.e., it is a possibility that two or more files that came in may be duplicates (erroneously sent by upstream twice or multiple times). Could you please help on providing a solution using JCL or Cobol or Rexx ?
I might have follow-up questions based on the solutions.
Thanks. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2154 Location: USA
|
|
|
|
tanvi110788 wrote: |
Hi,
I have a requirement where in I receive 6 or more files from upstream application into a GDG. I want to compare those all generations with one another to see any duplicates, i.e., it is a possibility that two or more files that came in may be duplicates (erroneously sent by upstream twice or multiple times). Could you please help on providing a solution using JCL or Cobol or Rexx ?
I might have follow-up questions based on the solutions.
Thanks. |
1) Files do exist only in Unix/Windows, but not in mainframe (excluding USS)
2) Either GDG, or not GDG, - it doesn't matter. BTW: how do you imagine "GDG of 6 input files"???
3) JCL has no ability neither to compare datasets, nor to do anything else except invoking other programs.
4) What did you try so far? What are the results?
5) The answer on tools to choose depends on the nature of your datasets. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 740 Location: Denmark
|
|
|
|
Something built upon this REXX which drives SUPERC:
Code: |
dsl='data.set1 data.set2 data.set3 '
cc=bpxwdyn('alloc dd(sysin) dummy')
cc=bpxwdyn('alloc dd(outdd) new delete',
'cyl space(1,10) unit(sysda) reuse')
p='DELTAL,LINECMP,DPBLKCL FMVLNS NOPRTCC'
do dsln=1 to words(dsl)-1
ds1=word(dsl,dsln)
ds2=word(dsl,dsln+1)
cc=Bpxwdyn('alloc dd(newdd) da('ds1') shr reuse')
cc=Bpxwdyn('alloc dd(olddd) da('ds2') shr reuse')
say 'Compare' ds1 'and' ds2
Address attchmvs "ISRSUPC P"
say 'rc:' rc
end
cc=bpxwdyn('free dd(sysin)')
cc=bpxwdyn('free dd(olddd)')
cc=bpxwdyn('free dd(newdd)')
cc=bpxwdyn('free dd(outdd)') |
If rc=0 then the datasets are equal. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
You have been told before, on SO, theat JCL does not do this sort of thing. So why repeat your error? Do you actually try to learn from responses? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Why not investigate the possibility of removing the "upstream" errors |
|
Back to top |
|
|
|