home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / chrchpr4.zip / FCATTEND.CMD next >
OS/2 REXX Batch file  |  1987-01-06  |  6KB  |  178 lines

  1. * Program FCATTEND - Attendance Marking, Check Lists
  2. Select Primary
  3. Store d+':members' to MFILE
  4. USE &MFILE index &MFILE
  5. Store T to LEVEL3
  6. Store T to undated
  7. STORE F TO FCATTD
  8. Store "ALL" to ANAME1
  9. Store 'ANAME1' to ANAME
  10. Release LEVEL1,cxname,VALIDD,level2,cyearcon
  11. Do while LEVEL3
  12.   Erase
  13.   @ 2,12 say 'Full Church Attendance Marking, Reports           2-9-/FCATTEND/'
  14.   IF .NOT. UNDATED
  15.     @ 4,62 SAY 'WEEK: '+WEEKNAME
  16.   ENDIF
  17.   @ 5,9 say  '1)  Active Attenders Check List'
  18.   @ 6,9 say  '2)  Add new people'
  19.   @ 7,9 say  '3)  Mark Attendance - all attenders'
  20.   @ 8,9 say  '4)  NEWLY-ACTIVES   List'
  21.   @ 9,9 say  '5)  NEWLY-INACTIVES List   '
  22.   @ 10,9 say '6)  1ST TIMERS List'
  23.   @ 11,9 say '7)  1ST TIMERS, Mailing Labels'
  24.   @ 12,9 say '8)  Attendance Report - year-to-date'
  25.   @ 13,9 say '9)  Set up Attendance Marks for a New Year'
  26. ?
  27. Accept '         Enter selection ' to NSEL
  28. IF !(nsel)='Q'
  29.   RETURN
  30. endif
  31. Select secondary
  32. USE MDIRFILE index MDIRFILE
  33. STORE "$(MEMBSTATUS,2,1)='*' " TO BNAM
  34. Select primary
  35. STORE F TO VALID3
  36. If (nsel='2'.or.nsel='3'.or.nsel='4'.or.NSEL='5'.or.NSEL='6'.or.NSEL='7' ;
  37.   .or.NSEL='1') .and. undated
  38.   Do MATTDATE.CMD
  39.   Store F to undated
  40. endif
  41. Store 'ALL' to ANAME1
  42. Store 'ANAME1' to aname
  43. Store ' ' to fcolhdr
  44. Store 'fcolhdr' to fcolumn
  45. Store val($(nsel,1,1)) to N
  46. If N>0 .and. N<10
  47.       Store T to invalid3
  48.       Store CHNAME to actvnam
  49.       Set intensity off
  50.       Select primary
  51. endif
  52. Select primary
  53. Do while .NOT. valid3
  54.   Store T to valid3
  55.   Do CASE
  56.     CASE NSEL = '1'
  57.       Store BNAM+".or. $(membstatus,8,1)='*'" to BNAME
  58.       Store "$(membstatus,7,2)+' '+$(ssscattd,curwk5,6)" to fcolumn
  59.       Store "Attendance" to fcolhdr
  60.       Store actvnam+' Attendance Checker ' to actvname
  61.       ? '    ',actvname
  62.       Do MONELINE.CMD
  63.     CASE NSEL = '3'
  64.       Store BNAM+".or. $(membstatus,8,1)='*'" to BNAME
  65.       Store actvnam to actvname
  66.       Do MSSATTND.CMD
  67.     CASE NSEL = '2'
  68. * Enter MUPADD with a flag set for '1N' in MEMBSTATUS,7,2.
  69.       Store 'SCFUL' to MSEL
  70.       Store d+':MEMBERS ' to MFILE
  71.       Use &MFILE index &MFILE
  72.       Store '       ' to eselect
  73.       Store ' ' to xaddress
  74.       Store ' ' to xcityst
  75.       Store ' ' to xzip
  76.       Store ' ' to xfamcode
  77.       Store ' ' to homephone
  78.       Store ' ' to lastname
  79.       Store ' ' to firstname
  80.       Do MUPADD.CMD
  81.     Release eselect,lastname,firstname,xaddress,xcityst,xzip,xfamcode,homephone
  82.     Store d+':SCMEMBRS.NDX' to MFILENDX
  83.       Set console off
  84.       delete file &MFILENDX
  85.       Store d+':OFFERNDX.NDX' to MFILENDX
  86.       delete file &MFILENDX
  87.       Set console on
  88.       Release lastname,firstname,xaddress,xcityst,xzip,xfamcode,homephone
  89.       Release eselect,aname,aname1,inhh,inh1,inh2,fcode9,matching,match,curwk
  90.       Release lastcod,lastcode,firstcode,curfnum,addedrec,lastnam,locating
  91.       Release waraddr,invalcc,inhhc,curfnumb,valid1
  92.     CASE NSEL = '4'
  93.       Store actvnam+' NEWLY-ACTIVES list   ' to actvname
  94.       Store BNAM+" .or. $(membstatus,8,1)<>'X' " to BNAME
  95.       ? '    ',actvname
  96.       Do MONELINE.CMD
  97.     CASE NSEL = '5'
  98.       Store actvnam+' NEWLY-INACTIVES list   ' to actvname
  99.       Store BNAM+".or.($(membstatus,7,1)<>'I')" to BNAME
  100.       ? 'Now printing ',actvname
  101.       Do MONELINE.CMD
  102.     CASE NSEL = '6'
  103.       Store actvnam+' 1ST TIME VISITORS  ' TO ACTVNAME
  104.       Store BNAM+".or. $(membstatus,7,2)<>'1N'" to BNAME
  105.       ? '    ',actvname
  106.       Do MONELINE.CMD
  107.     CASE NSEL='7'
  108.       Store MFILE+' index '+MFILE to SPFILE
  109.       ?
  110.       ? '         Mailing Labels  - -  1ST TIME VISITORS'
  111.       ?
  112.       Store BNAM+".or. $(membstatus,7,2)<>'1N'" to BNAME
  113.       Do MSPFMAIL.CMD
  114.       Select secondary
  115.       Use MDIRFILE index MDIRFILE
  116.       Select primary
  117.       Use &MFILE index &MFILE
  118.     CASE NSEL = '8'
  119.       Store actvnam+' Attendance to date ' to actvname
  120.       ? '    ',actvname
  121.       Do MATTYEAR.CMD
  122.       Store 'BNAM' to bname
  123.     CASE NSEL='9'
  124.       Accept 'Enter the last week number in the year just past [52/53] ' to XX
  125.       Store val(XX)+1 to xnum
  126.       If xnum=53.or.xnum=54
  127.       ? 'Now setting up attendance markings for next year.'
  128.       Store 0 to curnum
  129.       Store 0 to curr
  130.       Do while .not. EOF .and. (&ANAME=ANAME1)
  131.         Replace ssscattd with $(ssscattd,xnum,5)
  132.         SKIP
  133.         Store curr+1 to curr
  134.         If curr=20
  135.           Store 20+curnum to curnum
  136.           ? curnum,' records processed.'
  137.           Store 0 to curr
  138.         endif
  139.       enddo
  140.       Store curnum+curr to curnum
  141.       ? curnum,' records processed.'
  142.      else
  143.       Accept 'Invalid week number (52 or 53). Press <retn> ' to XX
  144.      endif
  145.       Release xnum,curr,curnum
  146.     CASE !(NSEL) = 'Q'
  147.       Release undated,fcattd,aname,aname1,bnam,valid3,curwk5,n,invalid3,actvnam
  148.       Release bname,actvname,curwk,weekname
  149.       Store T to level2
  150.       STORE F TO LEVEL3
  151.       Store chname to cxname
  152.     OTHERWISE
  153.       Accept 'Illegal selection. Please enter again ' to NSEL
  154.       Store F to validd1
  155.   ENDCASE
  156. ENDDO
  157. If NSEL='1'.or.NSEL='4'.or.NSEL='5'.OR.NSEL='6'.OR.NSEL='7'.OR.NSEL='8'.or. ;
  158.   NSEL='9'
  159.   ?
  160.   ACCEPT 'Processing is complete. Press <RETURN> to exit.' to XX
  161. endif
  162. ENDDO
  163. Release undated,nsel,ins,curweek,weekname,N,fcattd,curwk5,actvnam,curwk
  164. Select secondary
  165. Use
  166. Select primary
  167. USE
  168. RETURN
  169.  
  170.  
  171.  
  172. SE NSEL = '3'
  173.       Store BNAM+".or. $(membstatus,8,1)='*'" to BNAME
  174.       Store actvnam to actvname
  175.       Do MSSATTND.CMD
  176.     CASE NSEL = '2'
  177. * Enter MUPADD with a flag set for '1N' in MEMBSTATUS,7,2.
  178.