home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
MBUG
/
MBUG128.ARC
/
FOREBEAR.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1979-12-31
|
4KB
|
139 lines
* FOREBEAR.CMD Lead program for an Ahnentafel chart or Forebears Tree
SELECT PRIMARY
GO &mno
* If subject's father & mother unknown, say so and finish
IF fath = 0 .AND. moth = 0
SET PRINT OFF
@ 5,0 SAY CHR(27)+'Y'
@ 12,20 SAY "No Forebears of "+TRIM(firstnms)+" "+TRIM(surname)+;
" "+"on File"
?
? " Press <RETURN>"
SET CONSOLE OFF
WAIT
SET CONSOLE ON
RETURN
ENDIF
* Ask whether Ahnentafel Chart or Forebears Tree required.
STORE ' ' TO chtree
DO WHILE .NOT. chtree $ 'AF'
@ 20,20 SAY "<F>orebears Tree or <A>hnentafel Chart < >"
@ 20,60 GET chtree PICTURE "!"
READ
ENDDO
RELEASE GETS
* Ahnentafel Chart selected
IF chtree = 'A'
IF xpaper = 'U'
STORE 66 TO plength
ELSE
STORE 70 TO plength
ENDIF
IF myprnt = 'P'
@ 5,0 SAY CHR(27)+'Y'
@ 9,30 SAY "Turn Printer ON"
SET PRINT ON
?? ' '
?? CHR(27)+"E"
SET MARGIN TO 8
@ 9,30
ENDIF
DO fahnchrt
? CHR(27)+"N"
SET PRINT OFF
? " Press <RETURN>"
SET CONSOLE OFF
WAIT
SET CONSOLE ON
RELEASE chtree,plength,a,b,n,page,dash,lines,subj,mno,nomore
RETURN
ENDIF
* Forebears Tree selected
IF myprnt = 'P'
@ 5,0 SAY CHR(27)+'Y'
@ 9,30 " Turn Printer ON "
SET PRINT ON
?? " "
SET MARGIN TO 4
?? CHR(27)+"B"+CHR(27)+">"
@ 9,30
ENDIF
IF myprnt = 'P'
STORE CHR(27)+"#"+CHR(54)+CHR(27)+"$" TO vert
STORE CHR(27)+"#"+CHR(53)+CHR(27)+"$" TO dash
STORE CHR(27)+"#"+CHR(56)+CHR(27)+"$" TO dcorn
STORE CHR(27)+"#"+CHR(58)+CHR(27)+"$" TO ucorn
STORE CHR(27)+"#"+CHR(65)+CHR(27)+"$" TO dnarrow
ELSE
STORE "|" TO vert
STORE "-" TO dash
STORE "." TO dcorn
STORE "`" TO ucorn
STORE "|" TO dnarrow
STORE dnarrow+" " TO arr
STORE dash+dash+dash+dash+dash+dash+dash+dash TO hor
STORE 'STORE dcorn+hor+trim(firstnms)+" "+trim(surname) TO name' TO dnom
STORE 'STORE ucorn+hor+trim(firstnms)+" "+trim(surname) TO name' TO unom
STORE vert+" " TO l
STORE $(STR(0,81),1,80) TO spaces
STORE $(spaces,1,9) TO spc1
STORE $(spaces,1,18) TO spc2
STORE $(spaces,1,27) TO spc3
STORE $(spaces,1,36) TO spc4
STORE $(spaces,1,45) TO spc5
STORE $(spaces,1,54) TO spc6
STORE $(spaces,1,63) TO spc7
STORE $(spaces,1,72) TO spc8
store 0 to n1,n2,n3,n4
store &mno to mseed
ERASE
GO mseed
IF fath = 0 .AND. moth = 0
SET PRINT OFF
@12,15 SAY "No Forebears of "+trim(firstnms)+trim(surname)+;
" "+"on Record"
?
? " Press <RETURN>"
SET CONSOLE OFF
WAIT
SET CONSOLE ON
RETURN
ENDIF
STORE "FOREBEARS TREE for "+TRIM(firstnms)+" "+TRIM(surname) TO lineone
? lineone+$(STR(0,80),1,58-LEN(lineone))+"Printed "+date()
?
? ' GREAT'
? ' GREAT GREAT'
? ' GREAT GREAT GREAT'
? ' GRAND GRAND GRAND GRAND'
? 'PERSON PARENTS PARENTS PARENTS PARENTS PARENTS'
? arr+arr+arr+arr+arr+arr
?
RELEASE dnarrow,arr,lineone
if fath>0
goto fath
store # to n1
endif
do FHALFONE
goto mseed
? trim(firstnms)+" "+trim(surname)+" (1)"
? vert
if moth>0
goto moth
store# to n1
endif
do FHALFTWO
?
SET PRINT OFF
?
? " Press <RETURN>"
SET CONSOLE OFF
WAIT
SET CONSOLE ON
RELEASE ALL LIKE sp*
RELEASE l,n1,n2,n3,n4,gt,gd,pt,ps,mno,mseed
RELEASE name,chtree,vert,unom,dnom,ucorn,dcorn,dash
ERASE
RETURN
*EOF