home *** CD-ROM | disk | FTP | other *** search
- * Program...: comm2-2.cmd
- * Author....: Paul V. Pullen
- * Date......: 4 May 1989
- * Notes.....: This program is used to add communion records to the
- * commune database.
- select primary
- use b:commune
- select secondary
- use b:congre index b:name
- select primary
- erase
- store date() to mdate
- store ' ' to ans
- @ 5,5 say 'Is this date correct? ' get mdate
- clear gets
- @ 7,5 say 'Enter Y for YES, N for NO'
- @ 8,16 get ans picture '!'
- read
- if ans = 'N'
- erase
- @ 5,5 say 'Please input new date ' get mdate
- read
- endif ans
- store mdate to string
- store $(string,7,8) to day1
- store $(string,1,5) to string
- store $(string,1,2) to day2
- store $(string,4,5) to day3
- store day1+day2+day3 to ding
- store val(ding) to dong
- release day1,day2,day3,string,ding
- erase
- store 'Initial entry ' to mname
- store t to addcom
- erase
- do while addcom
- store ' ' to mlast
- @ 22,1 SAY 'Last person stored was '+mname
- @ 20,1 say 'Enter Last Name of Person receiving Communion ' get mlast
- read noupdate
- if mlast = ' '
- store f to addcom
- select secondary
- use
- select primary
- release mfirst,mlast,tem,length,findmem,placemark,mcom,mid,mname,contin22
- release mdate
- loop
- endif mlast = ' '
- store $(mlast,1,1) to tem
- store !(tem) to tem
- store len(trim(mlast)) to length
- store $(mlast,2,length) to findmem
- store tem+findmem to findmem
- select secondary
- find &findmem
- store # to placemark
- if # = 0
- @ 20,0 say findmem+' IS NOT in the database'
- @ 21,0 say 'If this is a visitor type a Y for visitor, any other letter'
- @ 22,0 say 'returns for another entry'
- wait to contin22
- if !(contin22) # 'Y'
- @ 20,0 say ' '
- @ 21,0 say ' '
- @ 22,0 say ' '
- @ 23,0 say ' '
- loop
- else
- store 'Guest' to findmem
- find &findmem
- @ 20,0 say ' '
- @ 21,0 say ' '
- @ 22,0 say ' '
- @ 23,0 say ' '
- endif !(contin22)
- endif #=0
- erase
- if findmem = 'Guest'
- store # to placemark
- else
- skip
- iF eof
- skip -1
- store # to placemark
- eLSE
- IF last:name = findmem
- skip -1
- store t to next
- @ 1,5 say 'The following records are matches to '+findmem
- disp last:name,first:name,address
- skip
- do while next
- if last:name = findmem .and. .not. eof
- disp last:name, first:name, address
- skip
- else
- store f to next
- endif last:name=findmem
- enddo while next
- @ 22,10 say 'Enter Number from LEFT COLUMN to record - 0 to ABORT'
- input ' ' to placemark
- ELSE
- skip -1
- store # to placemark
- ENDIF last:name=findmem
- eNDIF last:name = findmem .and. eof
- endif findmem = 'Guest'
- if placemark > 0
- go placemark
- store commune to mcom
- store mcom+1 to mcom
- store memid to mid
- store first:name to mname
- store $(mname,1,1) to mname
- store mname+':'+findmem to mname
- replace s.last:atten with dong
- replace commune with mcom
- select primary
- appe blank
- replace memid with mid, date with mdate
- erase
- endif for valid record number
- erase
- endif for case where we found the record
-
- enddo
- release addcom
- return
- * EOF.comm2-2.CMD
-