home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
chrchpr3.zip
/
CFNAMESC.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1991-01-21
|
7KB
|
282 lines
* Program CFNAMESC - Allows entering/scanning/changing names in the CDIRFILE
Clear
Use cdirfile index cdirfile
STORE $(SPACT,4,27) TO MD1A
SKIP
STORE $(SPACT,21,1) TO MD1B
SKIP
Store $(spact,27,4) to MD3Y
SKIP
Store $(spact,3,29) to MD3A
SKIP
Store $(spact,3,29) to MD3B
SKIP
Store $(spact,3,29) to MD3C
SKIP
Store $(spact,30,2) to MD1
SKIP
Store val($(SPACT,28,4)) to MD2
SKIP
STORE $(spact,26,3) to MD3
SKIP
Store $(spact,26,3) to MD4
SKIP
Store $(spact,21,3) to MD5
SKIP
Store $(spact,21,10) to MD6
SKIP
Store $(spact,21,10) to MD7
SKIP
Store $(spact,21,10) to MD8
SKIP
Store $(spact,21,10) to MD9
SKIP
Store $(spact,29,3) to MD12
SKIP
Store $(spact,34,1) to MD13
Store STR(val(MD13)+5,1) to NN
GOTO 23
Store $(spact,12,18) to MD11
GOTO 27
If $(spact,3,29)=' '
Store 'No ' to MD10
else
Store 'Yes' to MD10
endif
Erase
@ 1,10 SAY ' EDITING CONTRIBUTIONS NAMES, PARAMETERS'
@ 3,0 SAY 'CHURCH NAME ' GET MD1A
@ 3,55 say 'Data disk ' GET MD1B
@ 4,0 say 'Days of the month/quarter: MM/DD MM/DD MM/DD MM/DD MM/DD YEAR'
@ 5,29 get MD3A
@ 5,60 get MD3Y
@ 6,29 GET MD3B
@ 7,29 GET MD3C
@ 9,0 say 'Contributions Statements period ' get MD1
@ 10,0 say 'Number of offering envelopes ' get MD2
@ 11,0 say 'Print Contributions pages during entry? ' GET MD3
@ 12,0 say 'Contributions statements Special form? ' get MD4
@ 13,0 say 'Print pledging notice on statements? ' get MD5
@ 15,0 say 'Offering Category 1 ' get MD6
@ 16,0 say 'Offering Category 2 ' get MD7
@ 17,0 say 'Offering Category 3 ' get MD8
@ 18,0 say 'Offering Category 4 ' get MD9
@ 19,0 say 'Enable Contribution Special Funds? ' get MD12
@ 20,0 say 'Pledged assigned to category ' get MD13
@ 20,38 say MD&NN+' (1/2/3/4/T) '
@ 21,0 say 'Printer, special set-up characters' get MD11
@ 22,0 say 'Include a note at the end of the Contributions Statements? '
@ 22,60 get MD10
@ 23,35 say ' Press <ctrl-W> to exit.'
READ
If @(MD13,'1234T')=0
? 'Invalid PLEDGED CATEGORY assignment. No change.'
ENDIF
Accept ' SAVE? ' to XX
If !(XX)='Y'
GOTO 1
Replace spact with $(spact,1,3)+MD1A
skip
Replace spact with $(spact,1,20)+MD1B
SKIP
Replace spact with $(spact,1,26)+MD3Y+')'
SKIP
Replace spact with $(spact,1,2)+MD3A
SKIP
Replace spact with $(spact,1,2)+MD3B
SKIP
Replace SPACT WITH $(SPACT,1,2)+MD3C
SKIP
Replace spact with $(spact,1,29)+MD1
SKIP
Replace spact with $(spact,1,27)+str(MD2,4)
SKIP
Replace spact with $(spact,1,25)+MD3
SKIP
Replace spact with $(spact,1,25)+MD4
SKIP
Replace spact with $(spact,1,20)+MD5
SKIP
Replace spact with $(spact,1,20)+MD6
SKIP
Replace spact with $(spact,1,20)+MD7
SKIP
Replace spact with $(spact,1,20)+MD8
SKIP
Replace spact with $(spact,1,20)+MD9
SKIP
Replace spact with $(spact,1,28)+MD12
SKIP
Replace spact with $(spact,1,33)+MD13
GOTO 23
Replace spact with $(spact,1,11)+MD11
endif
Store '!0' to OFFN
If !(MD10)<>'Y'
If !(MD10)<>'Q'
GOTO 27
Replace cdirindex with '!0 '
Replace spact with ' '
endif
USE
RETURN
else
Release MD10,MDx10,MD11,MDX11,MD12,MD3A,MD3AX,MD3B,MD3BX,MD3C,MD3CX,MD3Y
GOTO 27
Store '0' to N
Do while N<>'*'
Store $(spact,2,39) to MD&N
SKIP
Store MD&N+$(spact,2,39) to MD&N
SKIP
Store str(val(N)+1,1) to N
enddo
Erase
@ 4,10 say 'Now Editing the End-of-Contributions-Statements Message -'
@ 6,0 get MD0
@ 7,0 get MD1
@ 8,0 get MD2
@ 9,0 get MD3
@ 10,0 get MD4
@ 11,0 get MD5
@ 12,0 get MD6
@ 13,0 get MD7
@ 14,0 get MD8
@ 15,0 get MD9
@ 17,20 say 'Press <ctrl-W> when finished.'
READ
?
Accept ' SAVE? ' to XX
If !(XX)='Y'
Store '0' to N
GOTO 27
Do while N<>'*'
Replace spact with ' '+$(MD&N,1,39)
SKIP
Replace spact with ' '+$(MD&N,40,39)
SKIP
Store str(val(N)+1,1) to N
enddo
endif
endif
Use
Clear
Store 'January February March April May June ' to MONTHS
Store MONTHS+'July August SeptemberOctober November December ' to MONTHS
If $(DATE(),7,2) = '00'
Set date to 01,01,00
ENDIF
Store ' ' to curmonthx
Store ' ' to curyear
Store ' ' to curmonth
* Set today's date from current system-date
Store $(date(),1,2) to curmo
Store $(date(),7,2) to curmonthx
Store val(curmo) to nmonth
Store curmo+curmonthx to indate
If $(date(),4,1) = '0'
Store $(DATE(),5,1) to CURMONTHX
else
Store $(DATE(),4,2) to CURMONTHX
endif
Store trim($(months,NMONTH*9-8,9)) to curmonth
Store curmonth+' '+curmonthx to curmonthx
Store ', 19'+$(DATE(),7,2) to CURYEAR
Select secondary
USE CDIRFILE index CDIRFILE
GOTO 1
Store trim($(SPACT,4,27)) to CHNAME
SKIP
Store $(SPACT,21,1) to D
Store curmonthx+curyear to curdate
Release curmonthx,curmonth,indate,nmonth,curmo
GOTO 3
Store $(spact,27,4) to cyearcon
SKIP
Store val($(spact,3,2)) to NN
Store trim($(months,NN*9-8,9)) to CMONTHCO
If $(spact,28,2)=' '
Store $(spact,3,24) to curdates
else
Store $(SPACT,3,29)+' ' to curdates
endif
SKIP
If $(spact,3,29)=' '
SKIP
else
If $(spact,28,2)=' '
Store curdates+$(spact,3,24) to curdates
else
Store curdates+$(spact,3,29)+' ' to curdates
endif
SKIP
If $(spact,28,2)=' '
Store curdates+$(spact,3,24) to curdates
else
Store curdates+$(spact,3,29)+' ' to curdates
endif
endif
GOTO 7
If !($(spact,30,1))='Q'
Store 15 to wknummax
GOTO 6
Store val($(spact,3,2)) to NN
Store trim($(months,NN*9-8,9)) to cmonthco
else
Store 6 to wknummax
endif
GOTO 8
Store val($(spact,28,4)) to MAXOFFER
Store maxoffer to OFFERMAX
SKIP
Store F to pageprnt
If !($(SPACT,26,1))='Y'
Store T to pageprnt
endif
GOTO 12
STORE 'X' TO OCATNAM0
Store '0' to N
Store ' ' to HDR3
Do while OCATNAM&N<>' ' .and. N<>'4'
Store str(val(N)+1,1) to N
Store $(spact,21,10) to OCATNAM&N
Store HDR3+' '+OCATNAM&N to HDR3
SKIP
enddo
If N = '4'
If OCATNAM4=' '
STORE $(HDR3,1,37) TO HDR3
ELSE
Store '5' to N
endif
endif
Store ' TOTAL ' to OCATNAM&N
Store HDR3+' '+OCATNAM&N to HDR3
Store N to OT
GOTO 16
Store ' ' to CSA
If !($(spact,29,1))='Y'
GOTO 49
Store trim('-'+$(spact,1,26)) to CSA
GOTO 50
Store trim(CSA+$(spact,1,26)) to CSA
endif
GOTO 27
If $(spact,3,29)=' '
Store F to OFFNOTE
else
Store T to OFFNOTE
endif
Release validd1,msel,months,level1,nn,ocatnam0,curyear
Store D+':contrib' to MFILE
Use
Select primary
Store T to continu
RETURN
Store ', 19'+$(DATE(),7,2) to CURYEAR
GOTO 1
Store trim($(SPACT,4,27)) to CHNAME
SKIP
Store $(SPACT,21,1) to D
Store curmo