View previous topic :: View next topic
|
Author |
Message |
naveen_amudalapelly Warnings : 1 New User
Joined: 15 Oct 2004 Posts: 16
|
|
|
|
Hi,
could any one please tell me how to write the records from first dataset to second data set which is not having the remaining records when we comapare the two datesets.
Thanks in advance
Naveen |
|
Back to top |
|
|
naveen_amudalapelly Warnings : 1 New User
Joined: 15 Oct 2004 Posts: 16
|
|
|
|
hi
Till now i didnt get any ans since 3 days
Is ibmmainframe experts forum is working?
|
|
Back to top |
|
|
lramani
New User
Joined: 03 Nov 2004 Posts: 21 Location: NOIDA, India
|
|
|
|
Hi Naveen,
Can u please put more clarity on what u want.....
Is it like u have two files A & B.
There is some mismatch between the two files....for example
File A has records
123456
abcdef
qwerty
987654
File B has records
123456
abcdef
987654
You want to write the qwerty record to file B. Is this your requirement??
If this is ur requirement ..what surprises me is...if file B has to be same as file A. Then just use COMPAREX to check if the two files are matching. If they are not directly use the file A. I hope u r getting what I mean...
If this not your requirement then can u please be more specific. May be the forum will reply to ur query. |
|
Back to top |
|
|
jz1b0c
Active User
Joined: 25 Jan 2004 Posts: 160 Location: Toronto, Canada
|
|
|
|
naveen_amudalapelly wrote: |
Hi,
could any one please tell me how to write the records from first dataset to second data set which is not having the remaining records when we comapare the two datesets.
Thanks in advance
Naveen |
Please frame your question clearly. otherwise state some examples. |
|
Back to top |
|
|
jz1b0c
Active User
Joined: 25 Jan 2004 Posts: 160 Location: Toronto, Canada
|
|
|
|
naveen_amudalapelly wrote: |
Hi,
could any one please tell me how to write the records from first dataset to second data set which is not having the remaining records when we comapare the two datesets.
Thanks in advance
Naveen |
Use this cobol logic which will sovle the problem
EVALUATE TRUE
WHEN KEY-FILE1 < KEY-FILE2
KEY-FILE1 not present in FILE 2, Do what ever you want
WHEN KEY-FILE2 < KEY-FILE1
KEY-FILE2 not present in FILE1, DO what ever
WHEN KEY-FILE1 = KEY-FILE2
This record is present in both the files.
END-EVAluate.
There are solutions using SORT, but your question is not clear. however use above logic it will give the solution. |
|
Back to top |
|
|
|