send array of integers via xBee s1

The strtok() function will do the parsing for you. You only need one while loop to parse serialcom.

byte tokenCount = 0;
char +token = strtok(serialcom, ",");
while(token)
{
   data[tokenCount] = atoi(token);
   tokenCount++;
   token = strtok(NULL, ",");
}

Notice how I use tokenCount, rather than i and j. The name tokenCount clearly defines the purpose of the variable. i and j do not.