home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
chrchpr4.zip
/
SCREPORT.CMD
< prev
Wrap
OS/2 REXX Batch file
|
1987-01-06
|
7KB
|
229 lines
* Program SCREPORT - Prints various reports of members, by SS/SC
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 'Small Church Reports 3-/SCREPORT/'
@ 5,10 say '0) One-line display'
@ 6,10 say '1) Print two-line report of selected SC class with OTHER [TL]'
@ 7,10 say '2) Print briefer one-line report [OL]'
@ 8,10 say '3) Print 2-column roster of selected SC class [2C]'
@ 9,10 say '4) Attendance Marking, Reports'
@ 9,65 say '/SCATTEND/'
@ 10,10 say '5) Print a new-people list from this month [CL]'
@ 11,10 say '6) Print a new-changes list from this month [CL]'
@ 12,10 say '7) Print a list of birthdays from this month [CL]'
@ 13,10 say '8) Print people just made Small-Church-Inactive this month [CL]'
@ 14,10 say '9) Mailing labels [ML]'
?
Accept ' Enter selection ' to MSEL
?
Store T to invalidd
Do while invalidd
Store F to invalidd
Do case
Case MSEL='0' .or. MSEL='1' .or. MSEL='2' .OR. MSEL='3'
Select secondary
USE MDIRFILE index MDIRFILE
Store T to MORNAMES
Store ' ' to XY
Do while MORNAMES
Accept 'Enter Small Church code ' to ANAME1
If !(ANAME1)='Q'
Store F to MORNAMES
Store 'Q' to XY
Store F to invalidd
USE
else
Store 'SSSC='+ANAME1 to infind
Find &infind
If #=0
? 'Small Church code not found in MDIRFILE'
else
Store F to MORNAMES
Store trim($(spact,10,20)) to CNAME
Store cname to actvname
endif
endif
enddo
If XY<>'Q'
Store 'N' to XX
Store 'SS:SC:MEMB' to aname
If MSEL='3' .and. !(ANAME1)<>'ALL'
Accept "Is the Small Church for a married's class? " to XX
If !(XX) = 'Y'
Accept 'Does the FCMEMBRS file have the latest updates from MEMBERS? ' to XY
If !(XY) <> "Y"
Do MGFCROST.CMD
Store 'Y' to XX
endif
Store d+':FCMEMBRS index '+d+':FCRSCNDX' to MFILE
endif
endif
If !(XX)<>'Y'
Accept 'Does the MSCROST file have the latest updates from MEMBERS? ' to XY
If !(XY)='Q'
Store F to invalidd
else
If !(XY) <> 'Y'
Do MGSCROST.CMD
endif
Store d+':MSCROST index '+d+':MSCROST' to MFILE
endif
endif
endif
If !(XY)<>'Q'
Select primary
Store F to invalidd
Store "$(SS:SC:MEMB,5,1)='*'" to BNAME
Store '$(birthdate,1,8)' to fcolumn
Store 'Birthdate' to fcolhdr
Store 'ACTIV: ' to othheadr
Store '$(sp:activty,1,8)' to othnam1
IF FILE(MFILE)
USE &MFILE
else
? 'File ',MFILE,' not found on the data disk.'
Accept 'Press <retn>' to XX
RETURN
endif
find &aname1
If msel='1'
If len(MSEL) > 1
Store len(MSEL) to N
Store $(MSEL,2,1) to othf2
IF othf2='\'
Store fcolumn+"+'-'+graddate" to fcolumn
endif
endif
Do MTWOLINE.CMD
Else
IF MSEL='2'
DO MONELINE.CMD
else
If MSEL='3'
Do M2COLROS.CMD
else
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 ss:sc:memb=ANAME1 .and. .not. EOF
If .not. Beginng
Store trim(first:name)+' '+trim(last:name)+' ' to xx
Store $(xx,1,20) to xx
? $(sp:activty,1,8),xx,home:phone,address,$(city:state,1,12)
SKIP
endif
Store F to beginng
Do while .not. (&XSEL).and..not.EOF
SKIP
enddo
enddo
?
endif
endif
endif
endif
CASE MSEL='4'
Do SCATTEND.CMD
Store T to LEVEL2
CASE MSEL = '5' .or. MSEL='6' .or. MSEL='7' .or. MSEL='8'
Accept 'Does the MSCROST file have the latest updates from MEMBERS? ' to XX
If !(XX)<>'Y'
Do MGSCROST.CMD
endif
Store d+':mscrost index '+d+':mscrost' to MFILE
If .not. file(MFILE)
? 'File ',MFILE,' does not exist.'
Accept 'Press <RETURN>' to XX
RETURN
else
USE &MFILE
Accept 'Enter Small Church code ("ALL"=all) ' to INSSSC
Select secondary
Use MDIRFILE index MDIRFILE
Store T to NOGOOD
Do while NOGOOD
If !(INSSSC)='ALL'
Store 'ALL' to ANAME1
Store F to NOGOOD
else
If !(INSSSC)<>'Q'
Store 'SSSC='+INSSSC to INS
Find &INS
If #=0
Accept 'Small Church code not found. Enter again ' to INSSSC
else
Store F to NOGOOD
Store INSSSC to ANAME1
Store trim($(spact,10,20)) to actvname
endif
endif
endif
enddo
Store F to BRTHDAYS
Select primary
If !(INSSSC)<>'Q'
If MSEL='8'
Store actvname+' New People in ' to actvname
Store "$(ss:sc:memb,5,1)='*' ,.or $(dates,1,4)<>inmo " to BNAME
else
if MSEL='5'
Store actvname+' Address / Phone Changes in ' to actvname
Store "$(ss:sc:memb,5,1)='*' .or. $(dates,6,4)<>inmo " to BNAME
else
if MSEL='6'
Store T to BRTHDAYS
Store actvname+' Birthdays in ' to actvname
Store "$(ss:sc:memb,5,1)='*' .or. $(birthdate,1,2)<>inmo" to BNAME
else
if MSEL='7'
Store actvname+' Just Made Inactive, as of ' to actvname
Store " $(dates,6,4)<>inmo" to BNAME
Store $(insssc,1,3)+' '+'*' to ANAME1
endif
endif
endif
endif
? 'Now printing a Changes List.'
Do MSPMINAC.CMD
endif
endif
Release BRTHDAYS,NOGOOD,INS
CASE MSEL = '9'
Accept 'Is the MSCROST file up-to-date from MEMBERS file? ' to X1
If !(X1)<>'Q'
If !(X1)<>'Y'
Do MGSCROST.CMD
endif
Store d+':MSCROST index '+d+':MSCROST' to SPFILE
If .not. file(SPFILE)
? 'File ',SPFILE,' does not exist on "',d,'" disk.'
else
Accept 'Enter the Small Church code ' to ANAME1
If !(ANAME1)<>'Q'
STORE 'SS:SC:MEMB' TO ANAME
Store "$(membstatus,2,1)='*'" to BNAME
Do mspfmail.cmd
endif
endif
endif
Release SPFILE
CASE !(MSEL) = 'Q'
RETURN
OTHERWISE
Accept 'Illegal selection. Please enter again ' to MSEL
Store T to invalidd
ENDCASE
ENDDO
Set format to screen
Accept 'Report is complete. Press <retn> ' to XY
enddo
RETURN