home *** CD-ROM | disk | FTP | other *** search
- * Program..: comm2-4.cmd
- * Author...: P. V. Pullen
- * Date.....: February 20, 1989
- * Notes....: This program is used to edit and view records of members in the
- * Congre data base for use in the Donate and Commune Databases
- erase
- select primary
- use b:congre index b:name
- store t to contin25
- do while contin25
- 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 '*'
- @ 13,5 say '**********************************'
- @ 13,40 say '*********************************'
- @ 13,33 say ' Select : : '
- @ 13,42 get choice picture '#'
- @ 7,25 say '0. Return to previous menu'
- @ 9,25 say '1. View a member`s record'
- @ 11,25 say '2. Edit a member`s record'
- * @ 13,25 say '3. Delete a Member`s total records'
- read noupdate
- do case
- case choice = '0'
- store f to contin25
- release mfirst, mlast,madd,mcity,mstat,menv,mdonat,mcommune,midno
- loop
- case choice='1'
- erase
- select primary
- store t to view
- do while view
- store ' ' to lname
- @ 10,15 say 'Input the last name of the member whose record you wish to;
- review'
- @ 12,15 say 'Enter Here ' get lname
- read
- if lname = ' '
- store f to view
- release tem,length,lname,placemark,mcity
- erase
- loop
- endif lname = ' '
- store $(lname,1,1) to tem
- store !(tem) to tem
- store len(lname) to length
- store $(lname,2,length) to lname
- store tem+lname to lname
- erase
- store (trim(lname)) to lname
- find &lname
- if # = 0
- @ 10,10 say 'This Member is not found in the database '+lname
- wait
- erase
- loop
- else
- store # to placemark
- skip
- if last:name=lname
- skip -1
- store t to nexrec
- @ 1,15 say 'Records which match the last name of '+lname+' are :'
- @ 2,0 say 'Record Last First Address'
- do while nexrec
- if last:name= lname
- disp last:name,first:name,address
- skip
- if eof
- store f to nexrec
- go placemark
- loop
- endif
- else
- store f to nexrec
- endif
- enddo
- @ 20,5 say 'Enter Record number to view full information '
- input 'Enter 0 to abort the View Information routine ' to placemark
- else
- skip -1
- store # to placemark
- endif last:name=lname
- release nexrec
- endif #=0
- if placemark > 0
- go placemark
- erase
- @ 8,5 say 'Lastname : '+last:name
- @ 9,5 say 'Firstname: '+first:name
- @ 10,5 say 'Address : '+address
- store city to mcity
- store (trim(mcity)) to mcity
- store mcity+' ' to mcity
- store mcity+state to mcity
- store mcity + ' ' to mcity
- store mcity+zip to mcity
- @ 11,5 say 'City : '+mcity
- @ 12,5 say 'Envelope # :'
- @ 12,18 say env:no
- @ 12,27 say' Member ID :'
- @ 12,40 say memid
- @ 13,5 say 'Total Donations : '
- @ 13,23 say donations
- @ 14,5 say 'Total Communions: '
- @ 14,23 say commune
- @ 15,5 say 'Last Date Attended (yymmdd)'
- @ 15,34 say last:atten
- wait
- erase
- else
- erase
- endif placemark
- enddo view
- release view
- case choice = '2'
- select primary
- erase
- store t to edmem
- do while edmem
- store ' ' to mfirst
- store ' ' to mlast
- store ' ' to madd
- store ' ' 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 member`s last name for data edit ' get mlast
- read noupdate
- if mlast = ' '
- store f to edmem
- release mfirst,mlast,madd, mcity, mstat,mzip,mdonat,mcommune,midno
- release menv,tem,length,trimname,placemark,oktoadd
- 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 last:name first:name while last:name = trimname
- 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
- store last:name to mlast
- store first:name to mfirst
- store address to madd
- store city to mcity
- store state to mstat
- store zip to mzip
- store env:no to menv
- store donations to mdonat
- store commune to mcommune
- store memid to midno
- set format to comm2-3
- read noupdate
- 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
- erase
- enddo
- endcase
- enddo
- release choice,oktoadd,oktodel,delmem,addmem,edmem,contin25
- return
- * eof comm2-4.Cmd