home *** CD-ROM | disk | FTP | other *** search
- * Program..: comm2-3.cmd
- * Author...: P. V. Pullen
- * Date.....: July 1, 1989
- * Notes....: This program is used to add members to the Congre data base
- * for use in the Donate and Commune Databases
- erase
- select primary
- use b:congre index b:name
- store t to contin23
- do while contin23
- store ' ' to choice
- @ 5,5 say '***********************************'
- @ 5,40 say '*********************************'
- @ 6,5 say '*'
- @ 6,72 say '*'
- @ 7,5 say '*'
- @ 7,72 say '*'
- @ 8,5 say '*'
- @ 8,72 say '*'
- @ 9,5 say '*'
- @ 9,72 say '*'
- @ 10,5 say '*'
- @ 10,72 say '*'
- @ 11,5 say '*'
- @ 11,72 say '*'
- @ 12,5 say '*'
- @ 12,72 say '*'
- @ 13,5 say '*'
- @ 13,72 say '*'
- @ 14,5 say '*'
- @ 14,72 say '*'
- @ 15,5 say '**********************************'
- @ 15,40 say '*********************************'
- @ 15,33 say ' Select : : '
- @ 15,42 get choice picture '#'
- @ 7,25 say '0. Return to previous menu'
- @ 9,25 say '1. Add a member to the system'
- @ 11,25 say '2. Delete a Member`s total records'
- read noupdate
- do case
- case choice = '0'
- store f to contin23
- release mfirst, mlast,madd,mcity,mstat,menv,mdonat,mcommune,midno
- loop
- case choice='1'
- erase
- SElect primary
- store t to addmem
- do while addmem
- store ' ' to mfirst
- store ' ' to mlast
- store ' ' to madd
- store 'Baltimore ' to mcity
- store ' ' to mstat
- store ' 'to mzip
- store 0 to menv
- store 0.00 to mdonat
- store 0 to mcommune
- store 0 to midno
- erase
- @ 5,5 say 'Input the new member`s last name ' get mlast
- read noupdate
- if mlast = ' '
- store f to addmem
- release mlast,mfirst,madd,mcity,mstat,mzip,menv,mdonat,mcommune,;
- midno,tem,length,oktoadd,trimname
- erase
- select primary
- @ 4,5 say 'I am re-indexing the Congre database on name '
- index on last:name to b:name
- @ 4,5 say 'I am re-indexing the Congre database on Envelope Number'
- index on env:no to b:cenv
- select secondary
- use
- erase
- @ 4,5 say 'Thank you for your patience. I am finished, and will return to'
- @ 5,5 say 'the menu. '
- store 0 to icount
- do while icount<100
- store icount+1 to icount
- enddo
- erase
- select secondary
- use
- select primary
- loop
- else
- store $(mlast,1,1) to tem
- store len(mlast) to length
- store $(mlast,2,length) to mlast
- store !(tem)+mlast to mlast
- endif mlast = ' '
- store (trim(mlast)) to trimname
- find &trimname
- store f to oktoadd
- if # > 0
- erase
- @ 1,1 say 'Records which match the new name:'
- disp off last:name first:name while last:name = trimname
- input 'Add the name anyway (Y/N)? ' to oktoadd
- endif #>0
- if # = 0 .or. oktoadd
- select secondary
- use b:iddata
- go top
- store in:number to nmemid
- store nmemid to midno
- store nmemid+1 to nmemid
- replace in:number with nmemid
- SELECT SECONDARY
- USE
- Select primary
- appe blank
- set format to comm2-3
- read noupdate
- store $(mfirst,1,1) to tem
- store len(mfirst) to length
- store $(mfirst,2,length) to mfirst
- store !(tem)+mfirst to mfirst
- replace last:name with mlast,first:name with mfirst,address with;
- madd,state with mstat, zip with mzip, env:no with menv, donations;
- with mdonat, commune with mcommune, memid with midno, city with mcity
- set format to screen
- endif # = 0
- enddo
- case choice ='2'
- erase
- select primary
- store t to delmem
- do while delmem
- store ' ' to mlast
- erase
- @ 5,5 say 'Input the member`s last name for data delete ' get mlast
- read noupdate
- if mlast = ' '
- store f to delmem
- release mlast,mfirst,madd,mcity,mstat,mzip,menv,mdonat,mcommune,midno
- release tem,length,trimname,placemark,oktodel
- select primary
- loop
- else
- store $(mlast,1,1) to tem
- store len(mlast) to length
- store $(mlast,2,length) to mlast
- store !(tem)+mlast to mlast
- endif mlast = ' '
- store (trim(mlast)) to trimname
- find &trimname
- store f to oktodel
- if # > 0
- erase
- @ 1,1 say 'Records which match the new name:'
- disp last:name first:name while last:name = trimname
- @ 20,1 say ' '
- input 'Enter record number to edit, 0 to abort ? ' to placemark
- else
- @ 20,8 say 'Last Name '+mlast+' not found'
- wait
- loop
- endif #>0
- if placemark > 0
- go placemark
- erase
- @ 8,10 say 'First Name : '+first:name
- @ 9,10 say 'Last Name : '+last:name
- @ 10,10 say 'Address : '+ADDRESS
- @ 11,10 say 'City : '+city
- @ 12,10 say 'State : '+state
- @ 20,5 say 'Should I delete this member? Y or T to delete ' get oktodel
- read noupdate
- if oktodel
- @ 21,20 say 'Okay, I will delete this member'
- store env:no to menv
- store memid to midno
- delete
- * select secondary
- * use b:donate
- * delete all for env:no = menv
- * select secondary
- * use b:commune
- * delete all for memid = midno
- wait
- select secondary
- use
- select primary
- endif oktodel
- endif # = 0
- erase
- enddo
- endcase
- enddo
- release choice,oktoadd,oktodel,delmem,addmem,edmem,contin23
- return
- * eof comm2-3.Cmd