If you want to set ‘N’ to the row size of ‘DATA’, this is preferable:
Perhaps you intend to read the entire row, so that would change ‘x’ to:
that would work with the rest of the loop.
Since we have no idea what ‘DATA’ is, we can only guess at a solution.
Note that there are likely much more efficient ways of doing what the code you posted does.