d$!{DO} COST {type} $! Computes cost of the Session, in Total, or on Daily basis. ,$! $! This procedure will either examine the LOGin and CPU time of this $! session and compute the cost, or go into the accounting file and give X$! the costs through the previous night. The use can be shown in total, $! or on a daily basis. $! $! The procedure will prompt for the "type" parameter if it is not $! given by the user. The three acceptable types are: L$! S(ession).....Costs given for this login session. $! D(aily).......Costs given on a daily basis for the month. $! T(otal).......Total cost given for the month. x$! ..note.. This creates and deletes COSTWORK.vx $! ..uses.. [opsci.acct]MONTH.RES,[opsci.bill]COST.EXE @$! ,sci_exe:SESSION.EXE $! $!-end.of.info- l$! $! xxxto last .. Show account, xxx$!U .. Show user, * .. Loop cost 4$ $ if( p1.eqs."" ) then inquire p1 "{Session, Total,or {Daily}}" $ if( p1.eqs."*" ) then goto yesloop ` $ cp1 := 'f$extract( 0,1,p1 ) $ if( cp1.eqs."S" .and. 'f$locate("=",p1).eq.'f$lenght(p1))- ( then goto session $ $ open/write costwork costwork.vx T $ if( 'f$locate("=",p1).eq.'f$length(p1) ) then goto notsys $ write costwork p1  $ goto yesuser $ $notsys: H $ if( cp1.eqs."T" ) then write costwork "=Total" $ t$ user := 'f$directory() $ len = 'f$length(user)-2 <$ user := 'f$extract(1,len,user) $ pos = 'f$locate(".",user) $ user := 'f$extract(0,pos,user) h$ write costwork user $ 0$yesuser: $ close costwork $ assign/user costwork.vx for005 \$ assign/user nl: for$type $ $$ assign/user dra0:[opsci.acct]month.res for001 $ run dra0:[opsci.bill]cost $ delete costwork.vx;0 P$ exit $ $session: |$ assign/user costwork.vx sys$output $ show process/account D$ assign/user costwork.vx for001 $ run SCI_EXE:session $ delete costwork.vx;0 p$ exit $ 8$yesloop: $ inquire inf "_Input file" $ if( inf.eqs."" ) then inf := dra0:[opsci.acct]month.res d$ assign/user 'inf for001 $ assign/user tt: sys$input ,$ run dra0:[opsci.bill]cost