home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / database / ledgers.lbr / LDATE.CZD / LDATE.CMD
OS/2 REXX Batch file  |  1987-05-10  |  2KB  |  38 lines

  1.  
  2. NOTE * Program...: LDATE.CMD
  3. NOTE * Version...: 1.2
  4. NOTE * Author....: Terry Hazen
  5. NOTE * Date......: 01/19/85
  6. NOTE * Notice....: Copyright (c) 1985,  n/SYSTEMS
  7. STORE 'JAN31FEB29MAR31APR30MAY31JUN30JUL31AUG31SEP30OCT31NOV30DEC31'TO dtable
  8. STORE sdate TO ddate
  9. STORE 0 TO dday
  10. STORE '   ' TO dmonth
  11. STORE 0 TO dyear
  12. STORE T TO dmore
  13. DO WHILE dmore
  14. @ drow,dcol GET ddate PICTURE '!!!!!!!'
  15. READ
  16. @ drow,dcol SAY ddate
  17. STORE VAL(ddate) TO dday
  18. STORE $(ddate,3,3) TO dmonth
  19. STORE VAL($(ddate,6)) TO dyear
  20. STORE 1 TO dpointer
  21. DO WHILE dmonth # $(dtable,dpointer,3) .AND. dpointer < 52
  22. STORE dpointer+5 TO dpointer
  23. ENDD
  24. STORE dpointer < 52 .OR. dmonth = 'DEC' TO dmtest
  25. STORE .NOT. (dyear=0 .OR. dday<1 .OR.dday>VAL($(dtable,dpointer+3,2)).OR. (dmonth='FEB' .AND. dday>28 .AND. dyear/4.0>INT(dyear/4.0)))TO dytest
  26. STORE .NOT. (dmtest .AND. dytest) TO dmore
  27. IF dmore
  28. SET BELL ON
  29. @ $,$ SAY CHR(7)
  30. SET BELL OFF
  31. STORE sdate TO ddate
  32. ENDI
  33. ENDD
  34. STORE ddate TO sdate
  35. @ drow,dcol SAY &srvideo + sdate + &snvideo
  36. RELEASE ALL LIKE d*
  37. CLEAR GETS
  38. RETU                                                                                                                                                                                 STORE .NOT. (dyear=0 .OR. dday<1 .OR.;                                          dday>VAL($(dtable,dpointer+3,2));                                               .OR. (dmonth='FEB' .AND. dday>28 .AND. dyear/4.0>INT(dyear/4.0)));                   TO dytest