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

  1. * Program MGSCROST - Copies MEMBERS file records to MSCROST for SSSC's only
  2. Select primary
  3. Store d+':MEMBERS' to MFILE
  4. Store d+':MSCROST' to MFILESC
  5. Use &MFILE
  6. Set talk off
  7. ? 'Now copying parts of MEMBERS file to MSCROST file.'
  8. Set talk on
  9. COPY to &MFILESC for $(membstatus,2,1)<>'*' .and. ;
  10.   (ss:sc:memb <> '  ' .or. teach:sssc <> '  ' )
  11. Set talk off
  12. ? 'Copying complete. Now expanding SS:SC:MEMB file for teachers.'
  13. Store chr(31) to chr31
  14. USE &MFILESC
  15. Store 0 to reccount
  16. Store 0 to recnum
  17. Set screen on
  18. Set carry on
  19. Do while .not. EOF
  20.   Store # to recnumb
  21.   If teach:sssc <> '  '
  22.     Store teach:sssc to xteach
  23.     Store last:name to xlast
  24.     Store first:name to xfirst
  25.     Store familycode to xfam
  26.     Store home:phone to xhphone
  27.     Store address to xaddr
  28.     Store city:state to xcstate
  29.     Store zip to xzip
  30.     Store membstatus to xmemb
  31.     Store birthdate to xbirth
  32.     Store other to xother
  33.     Store skills to xskills
  34.     Store dates to xdates
  35.     Store ss:sc:memb to xsssc
  36.     Store offeringen to xoff
  37.     APPEND BLANK
  38.     replace last:name with xlast
  39.     replace first:name with xfirst
  40.     replace ss:sc:memb with $(xteach,1,3)+chr31
  41.     replace familycode with xfam
  42.     replace home:phone with xhphone
  43.     replace address with xaddr
  44.     replace city:state with xcstate
  45.     replace zip with xzip
  46.     replace membstatus with xmemb
  47.     replace dates with xdates
  48.     replace other with xother
  49.     replace skills with xskills
  50.     replace offeringen with xoff
  51.     GOTO recnumb
  52.   endif
  53.   If reccount > 99
  54.     Store reccount+recnum to recnum
  55.     ? recnum,' records expanded'
  56.     Store 1 to reccount
  57.   endif
  58.   Store reccount+1 to reccount
  59.   SKIP
  60. ENDDO
  61. USE &MFILESC
  62. set talk on
  63. ? 'Expansion complete.   Now indexing MSCROST by Small Church name.'
  64. Index on SS:SC:MEMB+last:name+first:name to &MFILESC
  65. ? 'MSCROST file indexing is complete.  MSCROST /MSCROST file is created.'
  66. set talk off
  67. Set console off
  68. delete file('spacfile.dbf')
  69. delete file('spacfile.ndx')
  70. Set console on
  71. Release reccount,recnum,recnumb,recnum,xlast,xfirst,xfam,chr31,xhphone,xzip
  72. Release xwphone,xaddr,xcstate,xmemb,xdates,xother,xskills,xoff,MFILEC
  73. USE
  74. RETURN
  75.   Store familycode to xfam
  76.     Store home:phone to xhphone
  77.     Store address to xaddr
  78.     Store city:state to xcstate
  79.     Store zip to xzip
  80.     Store membstatus to xmemb
  81.     Store birthdate to xbirth
  82.     Store other to xother
  83.     Store skills to xskills
  84.     Store dates to xdates
  85.     Store ss:sc:memb to xsssc
  86.     Store offeringen to xoW┌ç┌ï¼Wç┌áX╨╚sΦç┌ë¼Wï■Wç┌Φ\⌠ëXΘç┌Φ√ë¼Wï■Wç┌ΦC⌠ëXΦ±Zï XΦ4⌠ë XΘu ║\Θ∙»║Ç▒Θ±»QRR╗\╞C╣ ░ ΦF⌠╣Φ>⌠á╚ó\╗]Zç┌èç┌êBCç┌èç┌<:uKè,@ó\Bç┌èç┌<.t
  87. └têCBç┌èç┌δ∞╗eBç┌èç┌
  88. └têCδ≡ZY├áX$@uá╖
  89. └u├QΦv YïXç┌á╖
  90. └t ╗┌è
  91. ┼ê▒ΦQ»áX4@óX├██ç┌ïX╣!┘Φ{≤├╣ç┌╗¢XëXè
  92. └t < t(áX:t┘δτSCΦJ≤Φ≤[u±CCCΦQ≤ç┌ë■Wç┌╞├ïX┘ëXè< u╗¢XëXCCCCCè
  93. └t■δ┌Cè
  94. └tΦdïXΦ}áXΦ├ïXCCCΦδ≥ë■WïXΦûïXç┌ïXëXáXêCΦ╙≥CC╞C╞├▒╗XëXè
  95. └tΦ%uïXè<t∙├╞■┴ê╚<r├ïX║