$ read/err=quit/end=quit sys$command date/prompt="Date (2006-12-31) : " $ read/err=quit/end=quit sys$command ip/prompt="IP (eg. 172.16.0.1) : " $ $! date = "2006-12-12" $! ip = "89.253.7.23" $ $ br = f$fao("!4ZW",(f$extract(0,4,date) - 1992) * 12 + f$extract(5,2,date)) $ date = date - "-" - "-" $ $ write sys$output "Billing run: ''br', IP : ''IP', Date : ''Date'" $ def events_file disk$billing2:[billevent]event'br'.bil $ $ data declare date pic x(8). declare ip10 pic x(10). declare ip11 pic x(11). declare ip12 pic x(12). declare ip13 pic x(13). declare ip14 pic x(14). declare ip15 pic x(15). set verify date = fn$get_symbol("date") ip10 = fn$get_symbol("ip") ip11 = fn$get_symbol("ip") ip12 = fn$get_symbol("ip") ip13 = fn$get_symbol("ip") ip14 = fn$get_symbol("ip") ip15 = fn$get_symbol("ip") set dictionary dr_cdd$top ready events as e shared read if fn$str_length(fn$get_symbol("ip")) eq 10 then - find e with cevt_t_start_service_time_text starting with date and - cevt_t_originating_resource starting with ip10 if fn$str_length(fn$get_symbol("ip")) eq 11 then - find e with cevt_t_start_service_time_text starting with date and - cevt_t_originating_resource starting with ip11 if fn$str_length(fn$get_symbol("ip")) eq 12 then - find e with cevt_t_start_service_time_text starting with date and - cevt_t_originating_resource starting with ip12 if fn$str_length(fn$get_symbol("ip")) eq 13 then - find e with cevt_t_start_service_time_text starting with date and - cevt_t_originating_resource starting with ip13 if fn$str_length(fn$get_symbol("ip")) eq 14 then - find e with cevt_t_start_service_time_text starting with date and - cevt_t_originating_resource starting with ip14 if fn$str_length(fn$get_symbol("ip")) eq 15 then - find e with cevt_t_start_service_time_text starting with date and - cevt_t_originating_resource starting with ip15 sort by desc cevt_t_originating_resource, asc cevt_t_start_service_time_text print cevt_t_start_service_time_text (-), - cevt_t_originating_resource (-), - cevt_t_billed_resource (-), - cevt_l_service_duration (-), - CEVT_L_VOLUME2 using 999,999,999, - CEVT_L_VOLUME3 using 999,999,999 - of current $ $quit: $ exit 1