Modified db query to use port code

We were using Port Name but each schedule may have a different name for
the port, so we are rationalizing to use port_codes (USSAV) to look up
ports for the db query