read int/long from sd card

        c[i] = dataFile.read();

Reads ONE character, and stores it in the ith element of the c array. It is NOT reading the whole record. You need two arrays - a char array and a long (not int) array.

Read the characters from the file, storing them in the char array, until you encounter a carriage return or line feed.

When you encounter one, call atol() to convert the char array to a long, and store that in the long array.

Reset the char array and index and continue reading.