home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / tmtrk112.zip / sample.cmd < prev    next >
OS/2 REXX Batch file  |  1998-05-03  |  1KB  |  20 lines

  1. /* SAMPLE.CMD to demonstrate the use of a rexx exit for  */
  2. /* Time Tracker - author Trevor Hemsley, 01-08-96        */
  3. /*                                                       */
  4. /* This exit must pass back a numeric return code to its */
  5. /*   caller. If it passes back 0 the log record is used  */
  6. /*   by the report function. If it passes back 1 the     */
  7. /*   the record is ignored and not used. Any other value */
  8. /*   is treated as invalid and zero is assumed           */
  9.  
  10. Call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  11. Call SysLoadFuncs   /* load rexx functions */
  12.  
  13. PARSE ARG logrecord             /* get the arguments passed to us (the log record) */
  14.  
  15. /* split the input record at the commas into variables date, time, duration and description */
  16. PARSE VALUE logrecord WITH date ',' time ',' duration ',' description 
  17.  
  18. if date = "01-08-1996" then exit 0 /* only report on records from 1st August */
  19. else exit 1                        /* otherwise ignore them */
  20.