I tried both the codes. It is pulling the value if IJ is having a value and GH and KL is null. In all other cases (GH with value and all other null/ KL with value and all other null) it is not pulling the value.
The file looks something like this
are or
MI=a12345;MR=b1234;CI=b123;CI=1234;CN=45;A=49;TR=21;EC=130;ED=We again.;BR=;BRC=;BRD=
are or
MI=a12345;MR=b1234;CI=b123;CI=1234;CN=45;A=49;TR=21;EC=130;ED=We again.;BR=1234;BRC=00;BRD=Good
I need to pull entire file if any parameters BR, BRC, or BRD have non null values.
Strange - both versions yield identical results on your post #1 sample file:
$ grep -E "GH=[0-9]+;|IJ=[0-9]+;|KL=[0-9]+$" file - OR -
$ awk '/GH=[0-9]+;|IJ=[0-9]+;|KL=[0-9]+$/' file
Parameters are : GH=;IJ=789;KL=
Parameters are : GH=456;IJ=;KL=
Parameters are : GH=;IJ=789;KL=
Parameters are : GH=;IJ=;KL=23
Parameters are : GH=;IJ=;KL=23
Parameters are : GH=646;IJ=;KL=
Parameters are : GH=456;IJ=789;KL=2323
Just the line with all three fields empty is suppressed.