sets p[i] to storage for next row record

p[i]=malloc(sizeof(rowrecord));