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
/
MBUG098.ARC
/
USER0.LBR
/
GENFIL.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1979-12-31
|
10KB
|
404 lines
* File:- GENFIL.CMD
* Genealogy Story Data Entry Command Program
* By, J.L.Read. Merrylands. NSW.
* Date:- 06/11/87
* Update:- 25/04/88
* Version 1.2
ERASE
@ 11,32 SAY"ONE MOMENT "
USE B:PERSONS INDEX B:REF
SELECT SECONDARY
USE B:STORIES INDEX B:STORYREF
SELECT PRIMARY
ERASE
SET BELL ON
SET TALK OFF
GO TOP
STORE REF:NO TO CURPER
DO GENSCR
SET INTEN ON
@ 20,6 SAY"<A> Add"
@ 20,16 SAY"<E> Edit"
@ 20,27 SAY"<S> Search"
@ 20,40 SAY"<F> Forwrd"
@ 20,53 SAY"<B> Back"
@ 20,64 SAY"<D> Delete"
@ 21,6 SAY"<M> Mnu"
@ 21,16 SAY"<P> Prnt"
@ 21,27 SAY"<L> Lst En"
@ 21,40 SAY"<T> 1st En"
SET INTEN OFF
DO GENGET
CLEAR GETS
SELECT PRIMARY
RELEASE CURPER
STORE T TO SCREEN3
DO WHILE SCREEN3
@ 3,0
@ 3,1 SAY"ENTER COMMAND "
SET CONSOLE OFF
WAIT TO COMMAND
STORE !(COMMAND) TO COMMAND
SET CONSOLE ON
IF COMMAND = "M"
ERASE
@ 11,32 SAY"CLOSING FILE "
CLEAR
RESTORE FROM MEMRET
RELEASE LOOK1,CHOICE1,CHOICE2,LOOK2
SET BELL OFF
RETURN
ENDIF
DO CASE
CASE COMMAND = "A"
@ 3,0
STORE REF:NO TO CURPER
SELECT SECONDARY
FIND &CURPER
IF # <>0
SELECT PRIMARY
DO GENGET
CLEAR GETS
@ 3,0
@ 3,1 SAY"Record Is Already On File."
@ 3,28 SAY CHR(7)
STORE 1 TO XX
DO WHILE XX<110
STORE XX+1 TO XX
ENDDO WHILE XX<110
RELEASE XX,MRECNO
@ 3,0
SELECT PRIMARY
LOOP
ENDIF # <>0
@ 3,0
@ 3,1 SAY"Adding a New Story. Enter <CR> To Abort Entry."
@ 12,25 SAY CURPER
STORE " " TO ;
MTEXT1
STORE " " TO ;
MTEXT2
STORE " " TO ;
MTEXT3
STORE " " TO ;
MTEXT4
STORE " " TO ;
MTEXT5
STORE " " TO ;
MTEXT6
@ 13,10 GET MTEXT1
@ 14,10 GET MTEXT2
@ 15,10 GET MTEXT3
@ 16,10 GET MTEXT4
@ 17,10 GET MTEXT5
@ 18,10 GET MTEXT6
* @ 3,0
* @ 3,1 SAY"Adding a New Story. Enter <CR> To Abort Entry."
READ
IF $(MTEXT1,1,6)= " "
@ 13,10
@ 13,71 SAY"<"
@ 13,78 SAY"|"
@ 14,10
@ 14,71 SAY"<"
@ 14,78 SAY"|"
@ 15,10
@ 15,71 SAY"<"
@ 15,78 SAY"|"
@ 16,10
@ 16,71 SAY"<"
@ 16,78 SAY"|"
@ 17,10
@ 17,71 SAY"<"
@ 17,78 SAY"|"
@ 18,10
@ 18,71 SAY"<"
@ 18,78 SAY"|"
@ 15,33 SAY"Gone !!!."
STORE 1 TO XX
DO WHILE XX<50
STORE XX+1 TO XX
ENDDO WHILE XX<50
RELEASE XX
@ 15,30
@ 15,71 SAY"<"
@ 15,78 SAY"|"
RELEASE MTEXT1,MTEXT2,MTEXT3,MTEXT4,MTEXT5,MTEXT6,CURPER
SELECT PRIMARY
DO GENGET
CLEAR GETS
SELECT PRIMARY
@ 3,0
LOOP
ENDIF
SELECT SECONDARY
APPEND BLANK
REPLACE REF:CODE WITH CURPER,TEXT1 WITH MTEXT1
REPLACE TEXT2 WITH MTEXT2,TEXT3 WITH MTEXT3
REPLACE TEXT4 WITH MTEXT4,TEXT5 WITH MTEXT5,TEXT6 WITH MTEXT6
RELEASE MTEXT1,MTEXT2,MTEXT3,MTEXT4,MTEXT5,MTEXT6,CURPER
CLEAR GETS
@ 12,25 SAY REF:CODE
@ 12,60 SAY STR(#,4)
SELECT PRIMARY
CASE COMMAND = "E"
@ 3,0
@ 3,1 SAY"Edit, Record."
STORE REF:NO TO CURPER
SELECT SECONDARY
IF #
SELECT PRIMARY
DO GENGET
READ
CLEAR GETS
ELSE
@ 3,0
@ 3,1 SAY"Sorry, I Can't Edit a Story That Dosn't Exist !!!."
STORE 1 TO XX
DO WHILE XX<120
STORE XX+1 TO XX
ENDDO WHILE XX<120
RELEASE XX
ENDIF
SELECT PRIMARY
RELEASE CURPER
CASE COMMAND = "B"
SKIP -1
STORE REF:NO TO CURPER
DO GENGET
CLEAR GETS
SELECT PRIMARY
RELEASE CURPER
CASE COMMAND = "F"
SKIP
STORE REF:NO TO CURPER
DO GENGET
CLEAR GETS
SELECT PRIMARY
RELEASE CURPER
CASE COMMAND = "D"
@ 3,0
@ 3,1 SAY"Delete This Story, <Y> or <N>. "
SET CONSOLE OFF
WAIT TO COMMAND
SET CONSOLE ON
IF !(COMMAND) = "Y"
STORE REF:NO TO CURPER
SELECT SECONDARY
FIND &CURPER
IF #=0
@ 3,0
@ 3,1 SAY"There Is NO Story To Delete !!!."
@ 3,33 SAY CHR(7)
STORE 1 TO XX
DO WHILE XX<120
STORE XX+1 TO XX
ENDDO WHILE XX<120
RELEASE XX,CURPER
SELECT PRIMARY
@ 3,0
LOOP
ENDIF #=0
@ 3,0
@ 3,1 SAY"Deleting Story."
DELETE
SELECT PRIMARY
DO GENGET
CLEAR GETS
ELSE !(COMMAND) <> "Y"
STORE REF:NO TO CURPER
DO GENGET
CLEAR GETS
ENDIF
SELECT PRIMARY
RELEASE CURPER
CASE COMMAND = "S"
@ 3,0
STORE REF:NO TO MREF:NO
STORE " " TO CURPER
@ 3,1 SAY"Enter Ref.Number To Search"
@ 3,28 GET CURPER PICTURE "9999"
SET CONFIRM ON
READ
SET CONFIRM OFF
FIND &CURPER
IF # = 0
@ 3,40 SAY"Record Not On File, Press <RETURN> "
SET CONSOLE OFF
WAIT
SET CONSOLE ON
FIND &MREF:NO
RELEASE CURPER
STORE REF:NO TO CURPER
DO GENGET
CLEAR GETS
RELEASE MREF:NO
RELEASE CURPER
ELSE # > 0
DO GENGET
CLEAR GETS
ENDIF
SELECT PRIMARY
CASE COMMAND = "L"
GO BOTTOM
STORE REF:NO TO CURPER
DO GENGET
CLEAR GETS
SELECT PRIMARY
RELEASE CURPER
CASE COMMAND = "T"
GO TOP
STORE REF:NO TO CURPER
DO GENGET
CLEAR GETS
SELECT PRIMARY
RELEASE CURPER
CASE COMMAND = "P"
@ 3,0
@ 3,1 SAY"Do You Want To Print This Record, <Y> or <N> "
SET CONSOLE OFF
WAIT TO COMMAND
SET CONSOLE ON
IF !(COMMAND)= "Y"
SELECT PRIMARY
@ 3,0
SET INTEN ON
@ 3,1 SAY" TURN YOUR PRINTER ON "
SET INTEN OFF
@ 3,27 SAY"Press <RETURN> When Ready "
SET CONSOLE OFF
WAIT
SET CONSOLE ON
@ 3,0
@ 3,1 SAY"Printing Record, PLEASE WAIT "
SET CONSOLE OFF
STORE REF:NO TO CURPER
SET PRINT ON
?
? " &OUT -= G E N E A L O G Y =- &IN"
? " Date:- "+ DATE()
? "+======================================================================;
=====+"
? "| Surname :-",LAST:NAME," <--- Reference Number:-",REF:NO," ;
|"
IF BIRTH:DATE =0
? "| First Name :-",FIRST:NAME," Date Of Birth:- Not Known ;
|"
ELSE BIRTH:DATE >0
STORE STR(BIRTH:DATE,8) TO MBRTH
STORE FIRST:NAME TO MFNAM
? "| First Name :-",MFNAM," Date Of Birth:-",$(MBRTH,1,4);
+"."+$(MBRTH,5,2)+"/"+$(MBRTH,7,2)," |"
ENDIF
IF DEATH:DATE =0
? "| Second Name:-",MID:NAME," Date Deceased:- Not Deceased ;
|"
ENDIF
IF DEATH:DATE =9
? "| Second Name:-",MID:NAME," Date Deceased:- Not Known ;
|"
ENDIF
IF DEATH:DATE >0 .AND. DEATH:DATE <9
? "| Second Name:-",MID:NAME," Date Deceased:- ;
|"
ENDIF
IF DEATH:DATE >9
STORE STR(DEATH:DATE,8) TO MDETH
STORE MID:NAME TO MMIDN
? "| Second Name:-",MMIDN," Date Deceased:-",$(MDETH,1,4);
+"."+$(MDETH,5,2)+"/"+$(MDETH,7,2)," |"
ENDIF
? "| Known As :-",NICK:NAME," Gender Of Person:-",SEX," ;
|"
? "| Birth Place:-",BIRTHPL," Resting Place:-",DEATHPL," |"
? "+=====================================+================================;
=====+"
? "| Fathers Ref No:-",FATHER:REF," | Mothers Ref ;
No:-",MOTHER:REF," |"
? "+=====================================+================================;
=====+"
? "| -==<S P O U S E S>==- ;
|"
? "| Plc1:-",MARGEPL1," Plc2:-",MARGEPL2,"Plc3:-",MARGEPL3," |"
IF SPSE1:DATE =0
? "| Spouse 1 Ref:-",SPSE1:REF," No.Children:-",SPSE1:CHIL," ;
Marge Date:- |"
ELSE
STORE STR(SPSE1:DATE,8) TO MMARG1
? "| Spouse 1 Ref:-",SPSE1:REF," No.Children:-",SPSE1:CHIL," ;
Marge Date:-",$(MMARG1,1,4)+"."+$(MMARG1,5,2)+"/"+$(MMARG1,7,2)," |"
ENDIF
IF SPSE2:DATE =0
? "| Spouse 2 Ref:-",SPSE2:REF," No.Children:-",SPSE2:CHIL," ;
Marge Date:- |"
ELSE
STORE STR(SPSE2:DATE,8) TO MMARG2
? "| Spouse 2 Ref:-",SPSE2:REF," No.Children:-",SPSE2:CHIL," ;
Marge Date:-",$(MMARG2,1,4)+"."+$(MMARG2,5,2)+"/"+$(MMARG2,7,2)," |"
ENDIF
IF SPSE3:DATE =0
? "| Spouse 3 Ref:-",SPSE3:REF," No.Children:-",SPSE3:CHIL," ;
Marge Date:- |"
ELSE
STORE STR(SPSE3:DATE,8) TO MMARG3
? "| Spouse 3 Ref:-",SPSE3:REF," No.Children:-",SPSE3:CHIL," ;
Marge Date:-",$(MMARG3,1,4)+"."+$(MMARG3,5,2)+"/"+$(MMARG3,7,2)," |"
ENDIF
? "+======================================================================;
=====+"
SELECT SECONDARY
FIND &CURPER
? "| &CURPER &OUT -== BIOGRAPHY ==- &IN |"
? "+======================================================================;
=====+"
IF #=0
? "| ;
|"
? "| ;
|"
? "| No Story On File. ;
|"
? "| ;
|"
? "| ;
|"
? "| ;
|"
ELSE
? "| ",TEXT1," |"
? "| ",TEXT2," |"
? "| ",TEXT3," |"
? "| ",TEXT4," |"
? "| ",TEXT5," |"
? "| ",TEXT6," |"
ENDIF
? "+======================================================================;
=====+"
?
?
?
?
?
?
SELECT PRIMARY
SET PRINT OFF
SET CONSOLE ON
RELEASE MBRTH,MFNAM,MDETH,MMIDN,MMARG1,MMARG2,MMARG3,CURPER
@ 3,0
ELSE COMMAND <> "Y"
ENDIF
OTHERWISE
@ 3,0
SET INTEN ON
@ 3,2 SAY"<"+COMMAND+">"
SET INTEN OFF
@ 3,6 SAY"is Not a Valid Command."
STORE 1 TO XC
DO WHILE XC <90
STORE XC+1 TO XC
ENDDO WHILE XC<90
RELEASE XC
ENDCASE
ENDDO
RETURN