comparing two files and find mismatch

hi i have two files and i want to compare both the files and find out mismatch in 3rd file

file1
00354|1|0|1|1|0|0|0|1|2
52424|1|0|1|1|0|0|0|1|2
43236|1|0|1|1|0|0|0|1|2
41404|1|0|1|1|0|0|0|1|2
79968|1|0|1|1|0|0|0|1|2

file2
00354|1|0|1|1|0|0|0|1|2
52424|1|0|1|1|0|0|0|0|2
43236|1|0|1|1|0|0|0|0|2
41404|1|0|1|1|0|0|0|1|2
79968|1|0|1|1|0|0|0|1|2

output should be like
file1:52424|1|0|1|1|0|0|0|1|2
file2:52424|1|0|1|1|0|0|0|0|2
-----------------
file1:43236|1|0|1|1|0|0|0|1|2
file2:43236|1|0|1|1|0|0|0|0|2:mad:

Please use

 tags when you post sample data.

awk 'NR==FNR{a[NR]=$0;next}{if (a[FNR] != $0)printf "%s\n%s\n\n",a[FNR], $0}' file1 file2 > output.file

Use GNU awk (gawk), New awk (nawk) or POSIX awk (/usr/xpg4/bin/awk)

it print all the lines while they are similar of diffirent

o/p comes.

00354|1|0|1|1|0|0|0|1|2|0|0|0|0|0|0|0|0|0|0|0
00354|1|0|1|1|0|0|0|1|2|0|0|0|0|0|0|0|0|0|0|0

52424|1|0|1|1|0|0|0|1|2|0|0|0|0|0|0|0|0|0|0|0
52424|1|0|1|1|0|0|0|3|2|0|0|0|0|0|0|0|0|0|0|0

43236|1|0|1|1|0|0|0|1|2|0|0|0|0|0|0|0|0|0|0|0
43236|1|0|1|1|0|0|0|1|2|0|0|0|0|0|0|0|0|0|0|0

but i want o/p should be only diff lines like red lines in my o/p file it does not show remaining similar lines

What's the 'common key' between 2 files?
First field?

Let's see:

# cat file1
00354|1|0|1|1|0|0|0|1|2
52424|1|0|1|1|0|0|0|1|2
43236|1|0|1|1|0|0|0|1|2
41404|1|0|1|1|0|0|0|1|2
79968|1|0|1|1|0|0|0|1|2
# cat file2
00354|1|0|1|1|0|0|0|1|2
52424|1|0|1|1|0|0|0|0|2
43236|1|0|1|1|0|0|0|0|2
41404|1|0|1|1|0|0|0|1|2
79968|1|0|1|1|0|0|0|1|2
# awk 'NR==FNR{a[NR]=$0;next}{if (a[FNR] != $0)printf "file1:%s\nfile2:%s\n\n",a[FNR], $0}' file1 file2
file1:52424|1|0|1|1|0|0|0|1|2
file2:52424|1|0|1|1|0|0|0|0|2

file1:43236|1|0|1|1|0|0|0|1|2
file2:43236|1|0|1|1|0|0|0|0|2

My code solve the OP request. If you need something else try to elaborate.

yes first field is common in both the files

i want to compare on the basis of first field

nawk -F'|' 'FNR==NR {a[$1]=$0; next} $0 != a[$1] { printf "%s\n%s\n\n",a[$1], $0}' file1 file2
nawk 'BEGIN{FS="|"}
{
if (NR==FNR)
	_[$1]=$0
else
{
	if (_[$1]!=$0){
		print _[$1]
		print $0
		print "---------"
	}
}
}' f1 f2

thanx sir
that is working fine
and i got my reruired data

dear i thing more now suppose bOth the files filds are heading with

A,B,C,D and i want to compare both the files on the bases of 1st field and print only 1st filed and that mismatch field

# cat file1
A |B |C|D |E|F|g|H|I|J
00354|1|0|1|1|0|0|0|1|2
52424|1|0|1|1|0|0|0|1|2
43236|1|0|1|1|0|0|0|1|2
41404|1|0|1|1|0|0|0|1|2
79968|1|0|1|1|0|0|0|1|2
# cat file2
A |B |C|D |E|F|g|H|I|J
00354|1|0|1|1|0|0|0|1|2
52424|1|0|1|1|0|0|0|0|2
43236|1|0|1|1|0|0|0|0|2
41404|1|0|1|1|0|0|0|1|2
79968|1|0|1|1|0|0|0|1|2
NOTE : files are too large and diff may be in any filed.
o/p should be
A | I
file1:52424|1|
file2:52424|0|
-----------------
file1:43236|1|
file2:43236|0|

Which one of the above Sirs (or maybe ladies for that matter) are you referring to?

ok, this a new requirement.
Having the first task behind you/us and understanding it completely, how far have you gotten so far implementing a new requirement reusing the gained knowledge?