Is this some you like?
awk '/^E/ {a=$0;n=NR} NR==n+2 && n {print n,a,$0}' file
1 E 45907:000:39 Error type, meant to find solution
This prints the line number for the line starting with E
, then the line, then second line after that.
Updated to get only 7 characters from trigger line.
awk '/^E 20[0-9][0-9]/ {d=$1 FS $2 FS $3;f=1;n=NR} f && /location/ {$1=$1;gsub(/[<>]/,"");print n,d,$0;f=0}' OFS=\| 1|E 2014-04-03 12:11:41.853|location=PIN_ERR_FM:5|class=PIN_ERR_APPLICN:4|errno=PIN_ERR_VALUE:46 10|E 2014-04-03 12:11:41.853|location=PIN_ERR_FM:5|class=PIN_ERR_APPLICN:4|errno=PIN_ERR_VALUE:47
From your new data I only print data if line starts with E
(could be D
if you like or any):
awk '/^E 20[0-9][0-9]/ {d=$1 FS $2 FS $3;f=1;n=NR} f && /location/ {$1=$1;gsub(/[<>]/,"");print n,d,$0;f=0}' OFS=\| file
1|E 2014-04-03 12:11:41.853|location=PIN_ERR_FM:5|class=PIN_ERR_APPLICN:4|errno=PIN_ERR_VALUE:46
10|E 2014-04-03 12:11:41.853|location=PIN_ERR_FM:5|class=PIN_ERR_APPLICN:4|errno=PIN_ERR_VALUE:47