home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
mbug
/
mbug073.arc
/
GENELOGY.LBR
/
FAHNPRNT.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1979-12-31
|
2KB
|
82 lines
* FAHNPRNT.CMD for output of lines to Ahnentafel forebears charts
STORE TRIM(firstnms)+' '+TRIM(surname)+', b. '+TRIM(borndate)+' '+;
TRIM(bornat) TO data
IF dieddate > ' '
STORE data+', d. '+TRIM(dieddate)+' '+TRIM(diedat) TO data
ENDIF
DO CASE
CASE male
STORE ' ' TO fwed,mwed
GO &subj
IF moth > 0
GO moth
STORE TRIM(weddate) TO mwed
ENDIF
GO &subj
IF fath > 0
GO fath
STORE TRIM(weddate) TO fwed
ENDIF
IF fwed = mwed
STORE data+', m. '+TRIM(weddate)+' '+TRIM(wedat) TO data
ELSE
IF spouse2 > 0
GO spouse2
STORE TRIM(weddate) TO fwed
ENDIF
IF fwed=mwed
STORE data +', m. '+TRIM(weddate)+' '+TRIM(wedat) TO data
ELSE
GO &subj
GO moth
IF spouse2 > 0
GO spouse2
STORE TRIM(weddate) TO mwed
IF mwed = fwed
STORE data+', m. '+TRIM(weddate)+' '+TRIM(wedat) TO data
ENDIF
ENDIF
ENDIF
ENDIF
ENDCASE
STORE 74 to end
STORE 1 TO templine
DO WHILE data > ' '
IF LEN(data) <= end
IF templine = 1
? idnumb+data
ELSE
? ' '+data
ENDIF
STORE ' ' TO data
ELSE
DO WHILE $(data,end,1) <> ' '
STORE end-1 TO end
ENDDO
IF templine = 1
? idnumb+$(data,1,end)
ELSE
? ' '+$(data,1,end)
ENDIF
STORE $(data,end+1,LEN(data)) TO data
STORE 74 TO end
STORE templine+1 TO templine
ENDIF
ENDDO
DO CASE
CASE lines+8 > plength
SET CONSOLE OFF
DO WHILE plength-lines > 1
?
STORE lines+1 TO lines
ENDDO
STORE page+1 TO page
? $(STR(0,90),1,71)+"Page "+STR(page,1)
?
STORE 2 TO lines
SET CONSOLE ON
ENDCASE
STORE f TO male
RELEASE data,end,templine,fwed,mwed,idnumb
RETURN