home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Oakland CPM Archive
/
oakcpm.iso
/
cpm
/
database
/
ledgers.lbr
/
LDATE.CZD
/
LDATE.CMD
Wrap
OS/2 REXX Batch file
|
1987-05-10
|
2KB
|
38 lines
NOTE * Program...: LDATE.CMD
NOTE * Version...: 1.2
NOTE * Author....: Terry Hazen
NOTE * Date......: 01/19/85
NOTE * Notice....: Copyright (c) 1985, n/SYSTEMS
STORE 'JAN31FEB29MAR31APR30MAY31JUN30JUL31AUG31SEP30OCT31NOV30DEC31'TO dtable
STORE sdate TO ddate
STORE 0 TO dday
STORE ' ' TO dmonth
STORE 0 TO dyear
STORE T TO dmore
DO WHILE dmore
@ drow,dcol GET ddate PICTURE '!!!!!!!'
READ
@ drow,dcol SAY ddate
STORE VAL(ddate) TO dday
STORE $(ddate,3,3) TO dmonth
STORE VAL($(ddate,6)) TO dyear
STORE 1 TO dpointer
DO WHILE dmonth # $(dtable,dpointer,3) .AND. dpointer < 52
STORE dpointer+5 TO dpointer
ENDD
STORE dpointer < 52 .OR. dmonth = 'DEC' TO dmtest
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
STORE .NOT. (dmtest .AND. dytest) TO dmore
IF dmore
SET BELL ON
@ $,$ SAY CHR(7)
SET BELL OFF
STORE sdate TO ddate
ENDI
ENDD
STORE ddate TO sdate
@ drow,dcol SAY &srvideo + sdate + &snvideo
RELEASE ALL LIKE d*
CLEAR GETS
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