I have two files let say A & B . A contains two filelds say F1 & F2, and
B has certain fields say F3,F4,F5,F6. I want a output dataset which will contain all the values of Field F1,F2 that were present in dataset A, alongwith the corresponding fields F4,F5,F6(if value of F1 = F3)but not F3. e.g.
Dataset A has
Code:
F1 F2
--------------
bus 100
can 40
disp 700
Dataset B has
Code:
F3 F4 F5 F6
--------------------------
bus 100l 32P 0.8
can 40l 13G 0.6
jam 900l 23H 0.2
output dataset should have
Code:
F1 F2 F4 F5 F6
-------------------------------
bus 100 100l 32p 0.8
can 40 40l 13G 0.6
disp 700
Thanks a lot, the above jcl will work fine if there is no dups in
dataset B. But in my case dataset B can have dups values in it like
bus 100l 32l 0.8
bus 200l 31l 0.9
can 40l 13g 0.6
jam 900l 23h 0.2
jam 100l 13h 0.1
and i want all the duplicate occurrences to be in the output datasets
which are there in dataset A(if value of F1 = F3).The output should be.
F1 F2 F4 F5 F6
-------------------------------
bus 100 100l 32p 0.8
bus 100 200l 31p 0.9
can 40 40l 13g 0.6
disp 700
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
Thanks a lot, the above jcl will work fine if there is no dups in
dataset B. But in my case dataset B can have dups values in it like
Sigh. I gave you the JCL that works for the example you showed me. Then you tell me the JCL doesn't work because you have duplicate records. Why didn't you show that in the example in the first place? I can't read your mind. Please give me all of the details in the future, so I don't have to waste time.
Here's a DFSORT/ICETOOL job that will work with your new example:
First of all i am very sorry for all the mistakes i have made from start till end whether its respect to incomplete requirement provided intially or delay i have made in giving the much deserved thanks to you.
Thanks a lot Frank for all your help and time. The JCL provided by you not only helped me saved my time but i was able to know much more about functionality of ICETOOL.