How resolve this ?
You'd better consider:
- the while-loop is running several thousand times per second
- Serial is slow, at 9600 baud only one character per millisecond arrives
So if the posted code is within your loop() function (don't know about?), each time the while-loop begins, it finds none or one character in the Serial input buffer, but never more than one.
In a crappy code using string-objects instead of real C-strings, you could make the code even crappier (but working like intended) using "delay" to wait a little bit after the first character had been received:
String content = "";
if (Serial3.available()) // now we have at least one character in the Serial input buffer
delay(20); // just wait a little bit for more characters to arrive
while(Serial3.available()) // look for all characters in the input buffer
datarcv = Serial3.read();
Serial.println(content); // and print them all together