Getting error NAT0178 with Examine on Xarray

I am getting error NAT0178 when I use Examine statement on 2 dimensional Xarray to find the specific index. For Example:

DEFINE DATA LOCAL
1 #ARR1 (1:)
2 #ITM (A6)
2 #ARR2 (A10/1:
)
1 #I (I2)
1 #J (I2)
1 #INDEX1 (N2)
1 #INDEX2 (N2)


EXPAND ARRAY #ARR1 TO (1:5)
EXPAND ARRAY #ARR2 TO (1:*,1:20)
FOR #I 1 TO 5
#ITM(#I) := #I
FOR #J 1 TO 20
COMPRESS #ARR2(#I,#J) #I #J INTO #ARR2(#I,#J) LEAVING NO SPACE
END-FOR
END-FOR

EXAMINE #ITM(*) FOR ‘2’ GIVING INDEX #INDEX



EXAMINE #ARR2(#INDEX,*) ‘12’ GIVING INDEX #INDEX2

First examine statement works fine but second examine gives error NAT0178.

Despite the fact that you have provided the first index value in #INDEX, the syntax of the GIVING INDEX clause requires a variable for each dimension.

EXAMINE #ARR2 (#INDEX, *) FOR '12' GIVING INDEX #INDEX-ONE #INDEX-TWO

yes, it worked. Thanks a lot for quick reply.