home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
mbug
/
mbug073.arc
/
GENELOGY.LBR
/
GROUP.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1979-12-31
|
5KB
|
184 lines
* GROUP.CMD - to display a Family Group sheet
STORE ' ' TO incnotes,prnt
@ 21,25 SAY "Include Notes ? (Y/N) "
DO WHILE @(incnotes,'YN') = 0
@ 21,48 GET incnotes PICTURE "!"
READ
ENDDO
@ 5,1 SAY chr(27)+'Y'
DO WHILE t
ERASE
STORE f TO kidprint
GO &mno
? "NAME : "+CHR(27)+"X"+TRIM(firstnms)+" "+TRIM(surname)+CHR(27)+"Y";
+" "+STR(#,4)+"#"
? "BORN : "+TRIM(borndate)+" "+bornat
IF dieddate > ' '
? "DIED : "+TRIM(dieddate)+" "+diedat
ENDIF
DO CASE
CASE spouse1 > 0 .AND. spouse2 = 0
? "MARRIED : "+TRIM(weddate)+" "+TRIM(wedat)
GO spouse1
? " "+TRIM(firstnms)+" "+TRIM(surname)+" "+STR(#,4)+"#"
?? " b. "+borndate
IF dieddate > ' '
?? " d. "+dieddate
ENDIF
CASE spouse1 > 0 .AND. spouse2 > 0
? "MARRIED (1st.) : "+TRIM(weddate)+" "+TRIM(wedat)
GO spouse1
? " "+TRIM(firstnms)+" "+TRIM(surname)+" "+STR(#,4)+"#"
?? " b. "+borndate
IF dieddate > ' '
?? " d. "+dieddate
ENDIF
GO &mno
GO spouse2
? "MARRIED (2nd.) : "+TRIM(weddate)+" "+TRIM(wedat)
? " "+TRIM(firstnms)+" "+TRIM(surname)+" "+STR(#,4)+"#"
?? " b. "+borndate
IF dieddate > ' '
?? " d. "+dieddate
ENDIF
ENDCASE
GO &mno
DO CASE
CASE spouse1 > 0 .AND. spouse2 = 0
IF kid > 0
?
? "ISSUE :-"
STORE t TO kidprint
ENDIF
CASE spouse2 > 0
GO spouse1
IF kid > 0
?
? "ISSUE (1st. Marriage) :-"
GO kid
? firstnms+"b. "+borndate
IF spouse1 > 0
?? " m. "+weddate
ELSE
?? " "
ENDIF
IF dieddate > ' '
?? " d. "+dieddate+" "+STR(#,4)+"#"
ELSE
?? " "+STR(#,4)+"#"
ENDIF
DO WHILE sib > 0
GO sib
? firstnms+"b. "+borndate
IF spouse1 > 0
?? " m. "+weddate
ELSE
?? " "
ENDIF
IF dieddate > ' '
?? " d. "+dieddate+" "+STR(#,4)+"#"
ELSE
?? " "+STR(#,4)+"#"
ENDIF
ENDDO
ENDIF
GO &mno
GO spouse2
IF kid > 0
?
? "ISSUE (2nd. Marriage) :-"
STORE t TO kidprint
ENDIF
ENDCASE
IF kidprint
GO kid
? firstnms+"b. "+borndate
IF spouse1 > 0
?? " m. "+weddate
ELSE
?? " "
ENDIF
IF dieddate > ' '
?? " d. "+dieddate+" "+STR(#,4)+"#"
ELSE
?? " "+STR(#,4)+"#"
ENDIF
DO WHILE sib > 0
GO sib
? firstnms+"b. "+borndate
IF spouse1 > 0
?? " m. "+weddate
ELSE
?? " "
ENDIF
IF dieddate > ' '
?? " d. "+dieddate+" "+STR(#,4)+"#"
ELSE
?? " "+STR(#,4)+"#"
ENDIF
ENDDO
ENDIF
GO &mno
?
IF fath>0
GO fath
? "FATHER : "+TRIM(firstnms)+" "+TRIM(surname)+" b. "+borndate
IF dieddate > ' '
?? " d. "+dieddate+" "+STR(#,4)+"#"
ELSE
?? " "+STR(#,4)+"#"
ENDIF
ELSE
? "FATHER :"
ENDIF
GO &mno
IF moth>0
GO moth
? "MOTHER : "+TRIM(firstnms)+" "+TRIM(surname)+" b. "+borndate
IF dieddate > ' '
?? " d. "+dieddate+" "+STR(#,4)+"#"
ELSE
?? " "+STR(#,4)+"#"
ENDIF
ELSE
? "MOTHER :"
ENDIF
?
IF incnotes = 'Y'
SELECT SECONDARY
GO TOP
LOCATE FOR VAL($(line,1,4)) = VAL(mno)
IF .NOT. EOF
? $(line,@(' ',line)+2,len(line))
SKIP
DO WHILE (RANK(line) < 48 .OR. RANK(line) > 57) .AND. .NOT. EOF
? TRIM(line)
SKIP
ENDDO
?
ENDIF
ENDIF
SELECT PRIMARY
USE b:family
SET PRINT OFF
IF !(prnt) <> "Y"
?
? "Printed Copy Required ? (Y/N) "
SET CONSOLE OFF
WAIT TO prnt
SET CONSOLE ON
IF !(prnt) = "Y"
?? " Turn Printer ON "
SET PRINT ON
?? " "
? CHR(27)+"E"
SET MARGIN TO 8
LOOP
ENDIF
ENDIF
?? CHR(27)+"N"
SET MARGIN TO 0
SET PRINT OFF
RETURN
ENDDO