home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
chrchpr4.zip
/
IAREPORT.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1987-01-06
|
5KB
|
157 lines
* Program IAREPORT - Prints various reports of members, by SKILLS
Select primary
Store T to LEVEL2
Do while LEVEL2
Erase
@ 1,1 say chname
@ 1,62 say curdate
@ 2,1 say 'DATA DISK = '+D
@ 3,20 say ' Interests / Abilities Reports'
@ 3,66 say '5-/IAREPORT/'
@ 5,6 say '0) One-line display for selected Interests / Abilities'
@ 6,6 say '1) Report for selected Interests / Abilities for all members'
@ 6,75 say '[OL]'
@ 7,6 say '2) Report for selected Interests/Abilities and Small Church'
@ 7,75 say '[OL]'
@ 8,6 say '3) Mailing Labels for selected Interests/Abilities, all members'
@ 8,75 say '[ML]'
@ 9,6 say ;
'4) Mailing Labels for selected Interests/Abilities and Small Church [ML]'
?
Accept ' Enter selection ' to MSEL
?
Store F to validd
Do while @(MSEL,'01234qQ')=0
Accept 'Invalid entry. Please enter again ' to MSEL
enddo
If !(MSEL)='Q'
RETURN
endif
Accept 'Does the MSKILLS file have the latest updates from MEMBERS? ' to XY
If !(XY)='Q'
RETURN
endif
If !(XY)<>'Y'
Do MGIAROST.CMD
endif
Store d+':MSKILLS.DBF Index '+d+':MSKILLS.NDX' to MFILE
If .not. file(MFILE)
Accept 'MSKILLS file does not exist on the data disk. Press <retn> ' to XX
Store F to LEVEL2
else
Use &MFILE
Store ' ' to oth1
Store '$(SKILLS,1,2)' to ANAME
Select secondary
USE MDIRFILE index MDIRFILE
Store T to NOSKILLS
Do while NOSKILLS
Store F to NOSKILLS
Accept 'Enter desired Interests/Abilities code ' to ANAME1
If !(ANAME1)<>'Q'
Store 'S.SCH' to fcolhdr
Store 'SS:SC:MEMB' to fcolumn
If !(ANAME1)<>'ALL'
Store 'SKLS='+ANAME1 to BNAME
Find &BNAME
If #=0
? 'No Interests/Abilities found with code = ',ANAME1
Store T to NOSKILLS
else
Store $(SPACT,10,20) to CNAME
endif
endif
endif
ENDDO
If !(ANAME1)='Q'
USE
Select primary
else
Store ' ' to BNAME1
Store 'BNAME1<>" "' to BNAME
If MSEL = '2' .or. MSEL = '4'
Store T to NOSKILLS
Do while NOSKILLS
Store F to NOSKILLS
Accept 'Enter Small Church code ' to BNAME1
If !(BNAME1)<>'Q'
Store 'SSSC='+BNAME1 to BNAME
Find &BNAME
If #=0
? 'No Small Church found with code = ',BNAME1
Store T to NOSKILLS
else
Store trim(CNAME)+', '+trim($(SPACT,10,20)) to CNAME
endif
Endif
ENDDO
Store '$(ss:sc:memb,5,1)="*".or.SS:SC:MEMB<>"&BNAME1"' to BNAME
endif
USE
Select primary
If !(BNAME1)<>'Q'
If MSEL='0'
Select primary
Find &ANAME1
Accept 'Enter selection criteria (<retn> = all)' to xsel
If xsel=' '
Store 'LEVEL2' to xsel
endif
?
? ' ',cname,'Membership Report ',curdate
?
Store T to beginng
Do while skills=ANAME1 .and. .not. EOF
If .not. Beginng
Store trim(first:name)+' '+trim(last:name)+' ' to xx
Store $(xx,1,20) to xx
? $(ss:sc:memb,1,3),$(sp:activty,1,8),xx,home:phone,address,$(city:state,1,8)
SKIP
endif
Store F to beginng
Do while .not. (&XSEL).and..not.EOF
SKIP
enddo
enddo
?
Accept 'Report is complete. Press <RETN> ' to xx
else
Store 'Interests / Abilities = '+CNAME to CNAME
Store ' ' to OTH1
Store 'OTH1' to ZCOLUMN
Use &MFILE
If MSEL='1' .or. MSEL='2'
Store '$(SP:ACTIVTY,1,12)+$(DATES,1,9)' to LCOLUMN
Store 'SP ACTIVITY DATES' to othheadr
STORE ' ' TO OTH1
Find &ANAME1
STORE cname TO ACTVNAME
Do MONELINE.CMD
ACCEPT 'Report is complete. Press <RETURN>' to XX
else
use
Store MFILE to SPFILE
Store cname to actvname
Do MSPFMAIL.CMD
Accept 'Report is complete. Press <RETURN>' to XX
endif
endif
endif
endif
endif
ENDDO
RETURNrts of members, by SKILLS
Select primary
Store T to LEVEL2
Do while LEVEL2
Erase
@ 1,1 say chname
@ 1,62 say curdate
@ 2,1 say 'DATA DISK = '+D
@ 3,20 say ' Interests / Abilities Reports'
@ 3,66 say '5-/IAREPORT/'
@ 5,6 say '0) One-line display for selected Interests / Abilities'
@ 6,6 say '1) Report for selected Interests / Abilities for all members'
@ 6,75 say '[OL]'
@ 7,6 say '2) Report for selected Interests/Abilities and Small Church'
@ 7,75 say