TIMESHEET Explanation: I work for a large company which does not have an electronic timesheet mechanism in place. It bothered me to have to xerox a form to fill out for job charging. I thought we should at least have an on-line program which generates the hardcopy required by company management. A tool which could let me select the job names and numbers from menus, calculate the week ending period automatically, and calculate the charge totals for me. I had begun to write such a utility when I happened along Przemek Klosowski's tkpurchase program. As I played with the tkpurchase program, it became evident to me that I could borrow (steal) this program to create my own timesheet utility. Some of the methods used in the tkpurchase program, are brilliant, especially the routine to generate a hardcopy of the form. I had to use them. Soooo after MUCH hacking, this timesheet program has emerged. I must point out that I am not a software developer and I think it probably shows badly in some areas of my programming. Some things are done in a clunky way. You can rest assured that if you spot a bad method of doing something in this program, it was authored by me and not Mr. Klosowski. This utility does work, and that is what is most important. (plus I got a good learning experience) I hope you like it. Files: timesheet - the ksh front end for the time.tk file. It calculates the pay period and loads the appropriate file. time.tk - the actual tk file. timesheet.bwk - a ksh fron end for the time.tk file which is set up for a bi-weekly pay period instead of the weekly pay period script "timesheet". timesheet.doc - this file. Installation: 1. Customize the menu definitions in time.tk to reflect the job names and numbers of your organization. If you need to add or delete a column, this can be done easily by changing the column definitions around line 415. There are three lines which define the column identifier, the column titles and the column width. Each column is built dynamically from the createline routine using these parameters. If you add a column, it will automatically be included in the hardcopy generated from the print option. My company uses separate job identifiers and function codes for each project. Therefore I use two menus to specify the description and function code separately from the project name and project number. You can easily modify/eliminate these menu configurations to suit your needs. 2. Change the printer definition in the printfile routine. The current printer definition is for printer - "lp" 3. Change the timesheet shell script to reflect whether your company reports time charging on a weekly (default) basis or bi-weekly. To change to a bi-weekly charging scheme, you can simply change the case statement to match two week values per line instead of one. The timesheet.bwk script is an example of this. You should note also that the script uses a Saturday to Friday pay period. I had to increment the week counter if the current day was Saturday. If your company does not use this particular pay period, you can change the parameters of the date command to specify Monday as the first day of the week and remove the week increment statement accordingly. If your date command returns a zero relative week count, you will have to increment the week counter by uncommenting the line in the timesheet shell script which has the comment on this. 4. Create a directory to store the timesheets. 5. Copy the time.tk into this directory. 6. Copy the timesheet shell script somewhere on your executable path. 7. Make the assignment in your shell startup file "TIMESHEETDIR" to the directory where you will store your timesheets. 8. Make the assignment in your shell startup file "EMPNAME" to the employee name you wish to use in your timesheets. 9. Run the shell startup file to enable the assignments. 10. Type timesheet. Usage: timesheet [timesheet] If no arguments are given to the timesheet shell, it will calculate the appropriate week ending period and load the associated timesheet. If a timesheet is given as an argument, then the specified timesheet will be loaded. When the shell calculates the appropriate shell script, but cannot find a timesheet file which matches the dates calculated, a new timesheet is created and the user is notified. Note that even though the message indicates a new file is created, nothing is actually written to disk until the timesheet is saved via the file pulldown menu. Thats about it.. just use the timesheet program to track your time, and print the timesheet to turn in to management. (those paper-pusher people).... Monty Scroggins monty.scroggins@rsd.dl.nec.com