Monday, November 28, 2016

Renting a Car in South Korea

Introduction:
I often traveled to South Korea. My trip was the first one for me to rent a car. Because the public transportation in Korea is ubiquitous, it's not really necessary to rental a car, especially when your destinations are in major cities like Seoul and Busan. Since there are many sites discussing how vast public transportation is in Korea, I wouldn't cover it here.

I tried to search for some information as what it's like to rent a car in Korea but couldn't find any information. Hence, it prompted me to write this blog.

International Driving Permit:
Before you leave, you must obtain an International Driving Permit. I obtained mine from a local AAA office. It's nothing more than a booklet with the information off of your own driver's license and your picture. AAA charges $20 (in 2016) for it and it is good for only one year. The valid duration is not determined by AAA but the international body that established International Driving Permit system. You can go to the AAA web site to obtain the application. Unless you want to pay extra to AAA, you may want to get your photo taken like the one you would for a passport.
Related image

Rental Companies:
There may be many companies offering rental cars in Korea; however, I tried only AVIS. The price was very reasonable. Note that AVIS is affiliated with AJ Rent-a-Car in Korea. Asking about AVIS at the airport isn't going to work too well as the folks there don't know AVIS. If you're renting a car from Hertz, you will find that Hertz is affiliated with Lotte Rent-a-Car. At the Incheon Airport, the rental car counters are located at both ends of the arrival terminal. However, you may want to go to the one near gate A instead. The one at the opposite end isn't always manned.

Rental Contract:
Note that the folks at the rental car counter will not speak English as fluently as you may wish. Please be specific as how you ask questions. Speak slowly whenever possible. You will be asked to present your passport and International Driving Permit. Your own driver's license is not much of use here. Without an International Driving Permit, you will NOT be able to rent a car. When you rent a car, you will be asked if you wish get a GPS (Koreans call it "Navi" pronounced more like "nebi" and not GPS). If you do not speak Korean, you want to make sure you get the English version. Without a GPS, it will be quite difficult to get around as the Korean road system has been evolving significantly. Also, Koreans are not really into telling you street or highway names but directions like turn left/right. Also, Korea uses the metric system. You should get some idea as what 100 meters is like.

My AVIS rental included a basic collision insurance that covers up to 300,000 wons, which is slightly less than $300. If you feel you need more, you should ask for a higher coverage. One other thing to note is that if you get into an accident and the damage takes few days to repair, you are directly liable for the days the car is out of service at the half of the daily rental rate. For example, if your daily rental rate is $20 and the two days are needed to repair the damage, you owe $20 ($20 * 50% * 2 days).

Driving:
Driving around is fairly easy. Nothing too tricky. The signs are posted both in Korean and English.
The speed limit is 80 to 100 kph on most of the highways. You should try and drive at the posted speed limit. All speedsters are caught by the traffic cameras. GPS usually warns of the upcoming traffic cameras. You should pay attention to what GPS is informing. A typical speed limit sign is:
There are many toll highways. You need to prepare a lot of money in Korean currency to pay the tolls.

On highways, often the left most lane is for buses. If you see a blue line for the left most lane, you don't want to drive in it. You will get a ticket. This situation is the only time when police actually pulls you over.

When you make a left turn, wait for a left arrow. You cannot turn left when it's green unless a sign is posted specifically to allow it. The signs are, unfortunately, only in Korean, which reads:
Right turn on red is allowed when it's safe to do so.

If you see diamond sign painted on the street, they simply mean that a traffic signal is ahead and not carpool lanes.

There are many tunnels in Korea since the 70% of Korea is mountainous. Many bridges and tunnels make the highways relatively flat.

Use your common sense to decide what to do in most cases. The traffic rules and signs are fairly logical.

Accessing DB2 Mainframe (z/OS) from PHP

To access DB2 on Mainframe (z/OS), no special DB2 library for PHP is required. However, a DB2 ODBC driver must be downloaded from IBM and installed. A driver may be downloaded from the IBM web site:

http://www-933.ibm.com/support/fixcentrl/swg/downloadFixes

For example, "v9.,7fp11_ntx64_odbc_cli.zip" may be used.

After downloading it, unzip it in C:\Program Files\IBM.

Once unzipped, execute the following on the command line as the system administrator:

C:> cd "\Program Files\IBM\clidriver\bin"
C:> db2cli install -setup

Use the Administrative tool "Data Sources (ODBC)" to ensure that the driver is installed properly. If not, the command can be executed again. Since db2cli is not very verbose, it may be necessary to do it again. Also, note that if you run it as a regular user, it will display the success message but the installation does not occur.

Ensure that all components are using the same bit-level. For 32-bit PHP, all drivers must be in 32-bit. For 64-bit, all drivers must be in 64-bit. Also, ensure that php.ini contains "extension=php_odbc.dll" is included for Windows.

Once the installation is done successfully, you can then connect to DB2 using odbc_connect function as shown here:

<?php
$conn = odbc_connect('Driver={IBM DB2 ODBC DRIVER - C_PROGRA~1_IBM_CLIDRI~1};'
      . 'Database=database;Hostname=hostname;Port=port;'
      , 'username', 'password');
if ($conn === False) {
    die("Failed to connect: " . odbc_errormsg() . "\n");
}
$res = odbc_exec($conn, 'SELECT 9 AS NUM FROM SYSIBM.SYSDUMMY1');
if ($res === False) {
    echo "Exec failed: " . odbc_errormsg() . "\n";
}
?>
Number of fields: <?php echo odbc_num_fields($res); ?>  
Field name: <?php echo odbc_field_name($res, 1); ?>   
Fetching...
<?php
odbc_fetch_row($res);
$val = odbc_result($res, 1);
?>

From here, all of the ODBC functions may be used to interact with DB2.