home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Global Amiga Experience
/
globalamigaexperience.iso
/
applications
/
databases
/
databasepro
/
filofax
/
kalender.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-07-10
|
1KB
|
91 lines
/* Kalender */
Options Results
ADDRESS DataBase
RequestText "Kalender erzeugen für Jahr:"
IF RC = 5 THEN
EXIT
jahr = result
l = jahr-1
z = 36+((5*l) % 4)-(l % 100)+(l % 400)
z = z-(7*(z % 7))
IF z = 0 THEN
z = 7
q.1 = z-1
tage.1 = 31
tage.2 = 28
IF (jahr // 4) = 0 THEN tage.2 = 29
tage.3 = 31
tage.4 = 30
tage.5 = 31
tage.6 = 30
tage.7 = 31
tage.8 = 31
tage.9 = 30
tage.10 = 31
tage.11 = 30
tage.12 = 31
j = 2
DO WHILE j <= 12
n = j - 1
q.j = tage.n - 28 + q.n
IF q.j > 7 THEN
q.j = q.j - 7
j = j + 1
END
j = 1
k = 1
f = 2
Display Off
ADD
PutData $F1 jahr
DO WHILE j < 13
k = 1
str = D2C(9)
DO WHILE k <= tage.j
n = (q.j + k - 1) // 7
IF k = 1 THEN
i = n
ELSE
i = 0
DO WHILE i > 0
str = str || " "
i = i - 1
END
IF k < 10 THEN
str = str || " "
str = str || k || " "
IF n = 6 THEN DO
PutData $F || f str
f = f + 1
str = D2C(9)
END
k = k + 1
END
IF n < 6 THEN DO
PutData $F || f str
f = f + 1
END
DO WHILE (f-2)//6 ~= 0
f = f + 1
END
j = j + 1
k = 1
END
Display On
Show
ADDRESS