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

  1. * Program IAREPORT - Prints various reports of members, by SKILLS
  2. Select primary
  3. Store T to LEVEL2
  4. Do while LEVEL2
  5. Erase
  6. @ 1,1 say chname
  7. @ 1,62 say curdate
  8. @ 2,1  say 'DATA DISK = '+D
  9. @ 3,20 say  '   Interests / Abilities Reports'
  10. @ 3,66 say '5-/IAREPORT/'
  11. @ 5,6 say '0) One-line display for selected Interests / Abilities'
  12. @ 6,6 say '1) Report for selected Interests / Abilities for all members'
  13. @ 6,75 say '[OL]'
  14. @ 7,6 say '2) Report for selected Interests/Abilities and Small Church'
  15. @ 7,75 say '[OL]'
  16. @ 8,6 say '3) Mailing Labels for selected Interests/Abilities, all members'
  17. @ 8,75 say '[ML]'
  18. @ 9,6 say ;
  19.    '4) Mailing Labels for selected Interests/Abilities and Small Church  [ML]'
  20. ?
  21. Accept '      Enter selection ' to MSEL
  22. ?
  23. Store F to validd
  24. Do while @(MSEL,'01234qQ')=0
  25.     Accept 'Invalid entry. Please enter again ' to MSEL
  26. enddo
  27. If !(MSEL)='Q'
  28.   RETURN
  29. endif
  30. Accept 'Does the MSKILLS file have the latest updates from MEMBERS? ' to XY
  31. If !(XY)='Q'
  32.   RETURN
  33. endif
  34. If !(XY)<>'Y'
  35.   Do MGIAROST.CMD
  36. endif
  37. Store d+':MSKILLS.DBF Index '+d+':MSKILLS.NDX' to MFILE
  38. If .not. file(MFILE)
  39.   Accept 'MSKILLS file does not exist on the data disk. Press <retn> ' to XX
  40.   Store F to LEVEL2
  41. else
  42.   Use &MFILE
  43.     Store ' ' to oth1
  44.     Store '$(SKILLS,1,2)' to ANAME
  45.     Select secondary
  46.     USE MDIRFILE index MDIRFILE
  47.     Store T to NOSKILLS
  48.     Do while NOSKILLS
  49.       Store F to NOSKILLS
  50.       Accept 'Enter desired Interests/Abilities code ' to ANAME1
  51.       If !(ANAME1)<>'Q'
  52.         Store 'S.SCH' to fcolhdr
  53.         Store 'SS:SC:MEMB' to fcolumn
  54.         If !(ANAME1)<>'ALL'
  55.          Store 'SKLS='+ANAME1 to BNAME
  56.          Find &BNAME
  57.          If #=0
  58.           ? 'No Interests/Abilities found with code = ',ANAME1
  59.           Store T to NOSKILLS
  60.          else
  61.           Store $(SPACT,10,20) to CNAME
  62.          endif
  63.         endif
  64.       endif
  65.     ENDDO
  66.     If !(ANAME1)='Q'
  67.       USE
  68.       Select primary
  69.     else
  70.      Store ' ' to BNAME1
  71.      Store 'BNAME1<>" "' to BNAME
  72.      If MSEL = '2' .or. MSEL = '4'
  73.       Store T to NOSKILLS
  74.       Do while NOSKILLS
  75.         Store F to NOSKILLS
  76.         Accept 'Enter Small Church code ' to BNAME1
  77.         If !(BNAME1)<>'Q'
  78.            Store 'SSSC='+BNAME1 to BNAME
  79.            Find &BNAME
  80.            If #=0
  81.             ? 'No Small Church found with code = ',BNAME1
  82.             Store T to NOSKILLS
  83.            else
  84.             Store trim(CNAME)+', '+trim($(SPACT,10,20)) to CNAME
  85.            endif
  86.         Endif
  87.       ENDDO
  88.       Store '$(ss:sc:memb,5,1)="*".or.SS:SC:MEMB<>"&BNAME1"' to BNAME
  89.     endif
  90.     USE
  91.     Select primary
  92.     If !(BNAME1)<>'Q'
  93.      If MSEL='0'
  94.       Select primary
  95.       Find &ANAME1
  96.       Accept 'Enter selection criteria (<retn> = all)' to xsel
  97.       If xsel=' '
  98.         Store 'LEVEL2' to xsel
  99.       endif
  100.       ?
  101.       ? '     ',cname,'Membership Report      ',curdate
  102.       ?
  103.       Store T to beginng
  104.       Do while skills=ANAME1 .and. .not. EOF
  105.         If .not. Beginng
  106.     Store trim(first:name)+' '+trim(last:name)+'                    ' to xx
  107.           Store $(xx,1,20) to xx
  108.  ? $(ss:sc:memb,1,3),$(sp:activty,1,8),xx,home:phone,address,$(city:state,1,8)
  109.           SKIP
  110.         endif
  111.         Store F to beginng
  112.         Do while .not. (&XSEL).and..not.EOF
  113.           SKIP
  114.         enddo
  115.       enddo
  116.       ?
  117.       Accept 'Report is complete. Press <RETN> ' to xx
  118.      else
  119.       Store 'Interests / Abilities = '+CNAME to CNAME
  120.       Store ' ' to OTH1
  121.       Store 'OTH1' to ZCOLUMN
  122.       Use &MFILE
  123.       If MSEL='1' .or. MSEL='2'
  124.         Store '$(SP:ACTIVTY,1,12)+$(DATES,1,9)' to LCOLUMN
  125.         Store 'SP ACTIVITY  DATES' to othheadr
  126.         STORE ' ' TO OTH1
  127.         Find &ANAME1
  128.         STORE cname TO ACTVNAME
  129.         Do MONELINE.CMD
  130.         ACCEPT 'Report is complete. Press <RETURN>' to XX
  131.       else
  132.         use
  133.         Store MFILE to SPFILE
  134.         Store cname to actvname
  135.         Do MSPFMAIL.CMD
  136.         Accept 'Report is complete. Press <RETURN>' to XX
  137.       endif
  138.      endif
  139.     endif
  140.     endif
  141.   endif
  142. ENDDO
  143. RETURNrts of members, by SKILLS
  144. Select primary
  145. Store T to LEVEL2
  146. Do while LEVEL2
  147. Erase
  148. @ 1,1 say chname
  149. @ 1,62 say curdate
  150. @ 2,1  say 'DATA DISK = '+D
  151. @ 3,20 say  '   Interests / Abilities Reports'
  152. @ 3,66 say '5-/IAREPORT/'
  153. @ 5,6 say '0) One-line display for selected Interests / Abilities'
  154. @ 6,6 say '1) Report for selected Interests / Abilities for all members'
  155. @ 6,75 say '[OL]'
  156. @ 7,6 say '2) Report for selected Interests/Abilities and Small Church'
  157. @ 7,75 say