   for char in daysRunString
     char == '1'
 
+getScheduleCompositeUID = (jsonScheduleV1) ->
+  cifTrainUid = jsonScheduleV1['CIF_train_uid']
+  scheduleStartDate = jsonScheduleV1['schedule_start_date']
+  cifStopIndicator = jsonScheduleV1['CIF_stp_indicator']
+  return "#{cifTrainUid}#{scheduleStartDate}#{cifStopIndicator}"
+
+
 importSchedule = (scheduleData) ->
   entries = []
   scheduleEntries = []

async = require('async')
program = require('commander')
config = require('config')

    "mongodb://#{config.mongo.host}:#{config.mongo.port}/#{config.mongo.name}",
    onMongoConnect)


################################################################################
#
# Network Rail datafeed SCHEDULE importing
#
################################################################################

getSchedule = (callback, toc_code) ->
  buffer = []
  options =
    hostname: 'datafeeds.networkrail.co.uk'
    path: util.format(PATH_TEMPLATE, toc_code)
    auth: "#{config.datafeed.username}:#{config.datafeed.password}"
  req = https.request options, (res) ->
    console.log res.statusCode
    if res.statusCode == 302
