$! TIMESHEET originally written by Eric Messick under Ultrix $! Adapted to VMS by Kenneth Dahl, Spring 1988 $! Mods to use any laser queue - 4/21/88 LLB $! Mods to use TeX.com to achieve greater printer control - 4/23/88 PJ $! Mods to work w/ system deftex (not that they finally got it right) $! - 7/09/88 PJ $! $ type sys$input Please wait. Generating TEX source... $! $! First, make sure we can TeX the timesheet $! $ if f$trnlnm("TEX$VERSION") .nes. "TEX2" then deftex2 $! $ curdir = f$env("default") $ set default sys$scratch: !switch to scratch dir $! $ set noon $ on warning then continue !for warning during APPEND later... $ define/nolog tsdir "STAFF:[operator.timesheet]" !where the code resides $! $! Set up executables as foreign commands so that command line args will $! work $! $ makedates = "$tsdir:makedates.exe" $ setdate = "$tsdir:setdate.exe" $ varsub = "$tsdir:varsub.exe" $! $ if p1 .nes. "" then tshtrc = f$parse(p1,curdir) !use auxillary data file $ if p1 .eqs. "" then tshtrc = f$parse("TSRC.DAT","sys$login") !use default data file $ tstdrc = f$element(1,"]",tshtrc) + "]ts_dates.dat" $! $ if f$search(tshtrc) .eqs. "" then goto _not_found !data file's not there $ if f$search(tstdrc) .eqs. "" then goto _use_SETDATE !use std. dates $! $ _use_TS_DATES: $ copy 'tstdrc TSHEET.WRK !copy alternate dates into work file $ goto _MAKEDATES $! $ _use_SETDATE: $ define/user sys$output TSHEET.WRK !generate standard dates in work file $ setdate $! $ _MAKEDATES: $ define/user sys$error nl: !hide warning during append $ define/user sys$output nl: ! " " $ append 'tshtrc TSHEET.WRK !add hours & id data to workfile $ define/user sys$input TSHEET.WRK $ define/user sys$output TSHEET2.WRK !create variables/values table and $ makedates ! store in 2nd work file $! $ define/user sys$input TSHEET2.WRK !use the variable table to generate $ define/user sys$output TSHEET.TEX !a TeX file by subtituting values $ varsub "tsdir:template." !in table for vars in TEMPLATE. $! $ type sys$input Finished. Sending the file through TEX. $ tex tsheet $ set default 'curdir $ Exit $! $! If the user blew it somewhere along the line, show them some detailed $! information about what they SHOULD have done. $! $ _not_found: $ type/page tsdir:doc. !helpful info about timesheet $ exit