Connect GPS and GSM modules to a single board

I connect a GPS module and GSM module to a single Arduino UNO. When it comes to the coding part, I can get only one device's output. I used the listen() function to swap between the SoftwareSerial objects. But It is not working. The followings are the separate code sections for each module. Could you please tell me how to combine those together?

-------------------------------- GSM module ----------------------------------------------
#include <SoftwareSerial.h>

//Create software serial object to communicate with SIM800L
SoftwareSerial mySerial(10, 11); //SIM800L Tx & Rx is connected to Arduino #3 & #2

void setup()
{

Serial.begin(9600);
sim800Config();

}

void loop()
{
updateSerial();
}

void updateSerial()
{
delay(500);
while (Serial.available())
{
mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port
}
while(mySerial.available())
{
Serial.write(mySerial.read());//Forward what Software Serial received to Serial Port
}
}

void sim800Config()
{
mySerial.begin(9600);

Serial.println("Initializing...");

mySerial.println("AT"); //Once the handshake test is successful, it will back to OK
updateSerial();
mySerial.println("AT+CSQ"); //Signal quality test, value range is 0-31 , 31 is the best
updateSerial();
mySerial.println("AT+CCID"); //Read SIM information to confirm whether the SIM is plugged
updateSerial();
mySerial.println("AT+CREG?"); //Check whether it has registered in the network
updateSerial();
}

-------------------------------- GPS module ----------------------------------------------

#include <TinyGPS++.h>
#include <SoftwareSerial.h>

static const int RXPin = 6, TXPin = 5;
static const uint32_t GPSBaud = 9600;

// The TinyGPS++ object
TinyGPSPlus gps;

// The serial connection to the GPS device
SoftwareSerial ss(RXPin, TXPin);

void setup(){
Serial.begin(9600);
ss.begin(GPSBaud);
}

void loop(){
// This sketch displays information every time a new sentence is correctly encoded.
while (ss.available() > 0){
gps.encode(ss.read());
if (gps.location.isUpdated()){
Serial.print("Latitude= ");
Serial.print(gps.location.lat(), 6);
Serial.print(" Longitude= ");
Serial.println(gps.location.lng(), 6);
}
}
}

Please post your best effort at combining the code and using 2 instances of SoftwareSerial but I have to say that I cannot remember seeing a successful use of the listen() function

Also, code like this

SoftwareSerial mySerial(10, 11); //SIM800L Tx & Rx is connected to Arduino #3 & #2

where the comments don't match the code do not fill me with confidence