home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
mbug
/
mbug073.arc
/
GENELOGY.LBR
/
DESCEND.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1979-12-31
|
4KB
|
171 lines
* DESCEND.CMD Produces a Descendants Chart via various sub-.cmd files
STORE CHR(27)+'P' TO propnl
STORE CHR(27)+'Q' TO compr
STORE "Child " TO ch
STORE "Grand " TO gd
STORE "Great " TO gt
STORE "|" TO vert
STORE vert+" " TO l
STORE vert+" "+l+l+l+l+l+l+l+l+l+l TO fence
STORE $(STR(0,137),1,136) TO mblank
STORE $(mblank,1,4) TO tab1
STORE $(mblank,1,8) TO spc
STORE $(mblank,1,1) TO spc1
STORE $(mblank,1,9) TO spc2
STORE $(mblank,1,17) TO spc3
STORE $(mblank,1,25) TO spc4
STORE $(mblank,1,33) TO spc5
STORE $(mblank,1,41) TO spc6
STORE $(mblank,1,49) TO spc7
STORE $(mblank,1,57) TO spc8
STORE $(mblank,1,65) TO spc9
STORE &mno TO msubj,mstart
STORE '0' TO g
STORE 1 TO page
STORE t TO mflag
STORE 0 TO lines,mstop
STORE "?? 'm. '+TRIM(weddate)+' ' " TO wedprint
IF xpaper = 'A'
STORE 70 TO mlength
ELSE
STORE 66 TO mlength
ENDIF
IF myprnt = "P"
@ 5,1 SAY CHR(27)+"Y"
@ 9,30 say xinv+"Turn Printer ON"+xnor
SET PRINT ON
?? " "
SET MARGIN TO 2
@ 9,30
ENDIF
GO msubj
ERASE
IF spouse1 = 0
SET PRINT OFF
@ 12,20 SAY "No Descendants of "+trim(firstnms)+" "+trim(surname)+" on File"
?
? " Press <RETURN> when ready "
SET CONSOLE OFF
WAIT
SET CONSOLE ON
ERASE
RETURN
ENDIF
?? chr(27)+"N"
?? spc3+"DESCENDANTS OF "+chr(27)+"X"+!(trim(firstnms))+" "+trim(surname)+;
chr(27)+"Y"
? propnl
? " Notes: b. = born, d. = died, m. = married, * = baptised, c. = circa"
? compr
STORE lines+4 TO lines
? propnl+"Printed "+date()
?? $(STR(0,130),1,125)+"Page "+STR(page,2)+compr
? spc1+spc4+"1x "+"2x "+"3x "+"4x "+;
"5x "+"6x "+"7x "+"8x"
? spc1+spc4+gt+gt+gt+gt+gt+gt+gt+gt
? spc1+spc3+gd+gd+gd+gd+gd+gd+gd+gd+gd
? "Person "+ch+ch+ch+ch+ch+ch+ch+ch+ch+ch
? fence
STORE lines+6 TO lines
STORE STR(VAL(g)+1,1) TO g
STORE 'mpar'+STR(VAL(g),1) TO mpar&g
STORE # TO mpar&g
DO CASE
CASE spouse1 > 0 .AND. kid = 0 .AND. spouse2 = 0
?
DO dprint
STORE lines+1 TO lines
GO spouse1
IF spouse2 = 0
? tab1
&wedprint
DO dprint
ELSE
GO msubj
? tab1
&wedprint
GO spouse1
DO dprint
ENDIF
? "No descendants on file"
?
SET PRINT OFF
?
? " Press <RETURN> when ready "
SET CONSOLE OFF
WAIT
SET CONSOLE ON
ERASE
RETURN
CASE spouse1 > 0 .AND. kid > 0 .AND. spouse2 = 0
?
DO dprint
STORE lines+1 TO lines
GO spouse1
IF spouse2 = 0
? tab1
&wedprint
DO dprint
ELSE
GO msubj
? tab1
&wedprint
GO spouse1
DO dprint
ENDIF
STORE lines+1 TO lines
IF spouse2 > 0
GO msubj
ENDIF
IF kid > 0
GO kid
STORE # TO msubj
? spc+spc&g
DO dprint
STORE lines+1 TO lines
IF sib > 0
DO WHILE sib>0
GO sib
? spc+spc&g
DO dprint
STORE lines+1 TO lines
IF spouse1>0 .AND. VAL(g)=1
STORE # TO mstop
ENDIF
IF mstop=0
STORE mpar&g TO mstop
ENDIF
ENDDO
ENDIF
ENDIF
? fence
STORE lines+1 TO lines
DO dnext
CASE spouse1 > 0 .AND. spouse2 > 0
DO dtwowife
IF end > 0
GO end
STORE # TO msubj
STORE STR(VAL(g)+1,1) TO g
DO dnext
ENDIF
ENDCASE
?
IF myprnt = 'P'
SET CONSOLE OFF
DO WHILE mlength-lines > 0
?
STORE lines+1 TO lines
ENDDO
STORE 0 TO lines
STORE page+1 TO page
SET CONSOLE ON
ENDIF
SET PRINT OFF
? " Press <RETURN> when ready "
SET CONSOLE OFF
WAIT
SET CONSOLE ON
ERASE
RETURN