home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
mbug
/
mbug073.arc
/
GENELOGY.LBR
/
ADDEDIT.CMD
next >
Wrap
OS/2 REXX Batch file
|
1979-12-31
|
3KB
|
91 lines
* ADDEDIT.CMD Adds or Edits records to/in Data File (B:FAMILY.DBF)
SET INDEX TO a:names
STORE ' ' TO mwhich
DO WHILE t
@ 10,20 SAY "OPTIONS - <A>dd records"
@ 12,30 SAY "<E>dit records"
@ 14,30 SAY "<M>ain menu"
@ 17,25 SAY "PRESS KEY of Your Choice < >"
DO WHILE .not. mwhich $ 'AEM'
@ 17,51 GET mwhich PICTURE "!"
READ NOUPDATE
ENDDO
DO CASE
CASE mwhich = 'M'
SET COLON OFF
SET INDEX TO
RETURN
CASE mwhich = 'A'
DO WHILE mwhich = 'A'
@ 1,0 SAY "Last Record No. "+xfin
@ 3,0
STORE STR(VAL(xfin)+1,4) TO mnumb
STORE ' ' TO more
@ 1,30 SAY ' '
@ 1,30 SAY xinv+'Add Records'+xnor
@ 5,0 SAY CHR(27)+'Y'
@ 6,25 SAY "More Records To Add ? (Y/N) "
DO WHILE .not. more $ 'YN'
@ 6,53 GET more PICTURE "!"
READ NOUPDATE
ENDDO
IF more = 'N'
@ 1,30 SAY xinv+'Add/Edit Records'+xnor
@ 6,25
SET COLON OFF
STORE ' ' TO mwhich
LOOP
ENDIF
CLEAR GETS
@ 3,0 SAY "This will be Rcd. "+mnumb
APPEND BLANK
@ 4,0 SAY CHR(27)+'Y'
DO addedscr
STORE mnumb TO xfin
ENDDO
CASE mwhich = 'E'
DO WHILE mwhich = 'E'
@ 1,0 SAY "Last Record No. "+xfin
@ 1,30 SAY ' '
@ 1,30 SAY xinv+' Edit Records '+xnor
@ 3,0 SAY CHR(27)+'Y'
@ 10,20 SAY "OPTIONS - <R>ecord no. known"
@ 12,30 SAY "<N>ame only known"
@ 14,30 SAY "<F>inished editing"
@ 17,25 SAY "PRESS KEY of Your Choice < >"
STORE ' ' TO mchoice
DO WHILE .not. mchoice$'RNF'
@ 17,51 GET mchoice PICTURE "!"
READ NOUPDATE
ENDDO
DO CASE
CASE mchoice = 'R'
STORE ' ' TO mno
SET CONFIRM ON
@ 20,30 SAY "Record No. ? "
DO WHILE VAL(mno) < 1 .OR. VAL(mno) > &xfin
@ 20,43 GET mno
READ NOUPDATE
ENDDO
SET CONFIRM OFF
CASE mchoice = 'N'
DO nomen
SET INDEX TO a:names
@ 3,1 SAY CHR(27)+'Y'
CASE mchoice = 'F'
@ 1,30 SAY xinv+'Add/Edit Records'+xnor
@ 5,1 SAY CHR(27)+'Y'
STORE ' ' TO mwhich
LOOP
ENDCASE
CLEAR GETS
GO &mno
@ 3,0 SAY CHR(27)+'Y'
@ 3,0 SAY "This is Recd. No. "+str(#,4)
DO addedscr
STORE ' ' TO mchoice
ENDDO
ENDCASE
CLEAR GETS
ENDDO