Interfacing GSM module code optimization

Maybe add a debug statement in ReadChar() to see what you get and check all the conversions are working as you expect ( decimal, character, String etc.)

void ReadChar()
{
  while (mySerial.available())
  {
    ch = mySerial.read();
    val += char(ch);
    delay(50);  
  }
  Serial.print( "\nval= " ) ;
  Serial.println( val ) ;
}

You might also try val = mySerial.readString() instead of your loop, because this waits a certain amount of time, set by mySerial.setTimeout() but defaults to 1000mS , to collect data before returning.