I have to 2 DEMs, one as a reference data and the other to be tested. I need to use the Z coordinate of both images to do RMSE calculation. I need the same points sample for both DEMs.
You must make sure that there is no shift between your DEMs, which would yield false results. Ideally, they should be in the same projection and, if possible, have aligned grids. Then, digitize the points and use the "extract value to table" to get the elevation from both DEMs simultaneously. You can join this table aftwerwards to your points.
Create random points, and then extract the overlaying pixels values of the two rasters to that point file (extract multi values to points tool in ArcGIS). Export the attribute table of that point file into diserable format and use it for the RMSE calculation.