home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / tmbnk210.zip / CONVERT.CMD next >
OS/2 REXX Batch file  |  1992-08-17  |  517b  |  16 lines

  1. /* Once you use this delete so it doesn't get ran again accidently */
  2. today = DATE('S')-1
  3. oldfile='timebank.bak'
  4. bankfile='timebank.dat'
  5. 'ren' bankfile oldfile
  6. position=1
  7. DO UNTIL (acct='')
  8.       acct=CHARIN(oldfile,position,36)
  9.       position=position+36
  10.       banktime=CHARIN(oldfile,position,1)
  11.       position=position+1
  12.       banktime=c2d(banktime)
  13.       if acct > '' then okfile= LINEOUT(bankfile, STRIP(acct,,'00'x) today banktime 0 0 0)
  14. end /* do */
  15. CALL LINEOUT(bankfile)
  16. CALL LINEOUT(oldfile)