home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
chrchpr4.zip
/
MATTDATE.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1987-01-06
|
3KB
|
115 lines
* Program MATTDATE - Gets a user week number associated with year's date
Select secondary
GOTO 5
Store ' 1 2 3 4 5 6 7 ' to Q1
Store Q1+' 8 9 10 11 12 13 14 ' to Q1
Store ' 14 15 16 17 18 19 20 21 ' to Q2
Store Q2+' 22 23 24 25 26 27 28 29 ' to Q2
Store ' 27 28 29 30 31 32 33 34 ' to Q3
Store Q3+' 35 36 37 38 39 40 41 42 ' to Q3
Store ' 40 41 42 43 44 45 46 47 ' to Q4
Store Q4+' 48 49 50 51 52 53 54 ' to Q4
Store 1 to qtrcntr
Store 1 to PWK
Store 0 to wkcnt
Store 0 to wkcntr
?
? 'Select a week number belonging to one of the following weekly dates -'
?
Do while QTRCNTR < 5
Store str(qtrcntr,1) to Q
Store 0 to wkcntr
If $(spact,28,2)=' '
Store $(spact,3,24) to curdat&Q
Store wkcntr+4 to wkcntr
else
Store $(SPACT,3,29)+' ' to curdat&Q
Store wkcntr+5 to wkcntr
endif
SKIP
If $(spact,28,2)=' '
Store curdat&Q+$(spact,3,24) to curdat&Q
Store wkcntr+4 to wkcntr
else
Store curdat&Q+$(spact,3,29)+' ' to curdat&Q
Store wkcntr+5 to wkcntr
endif
SKIP
If $(spact,28,2)=' '
Store curdat&Q+$(spact,3,24) to curdat&Q
Store wkcntr+4 to wkcntr
else
Store curdat&Q+$(spact,3,29)+' ' to curdat&Q
Store wkcntr+5 to wkcntr
endif
SKIP
If wkcntr<14
? $(Q&Q,pwk*6-5,wkcntr*6)
else
? $(Q&Q,pwk*6-5,76),$(Q&Q,pwk*6+75,2)
endif
Store pwk to pwk&Q
Store pwk+wkcntr-13 to pwk
Store wkcnt+wkcntr to wkcnt
Store wkcnt+1 to wkcnt&Q
If wkcntr<14
? curdat&Q
else
?? curdat&Q
endif
?
Store 0 to wkcntr
Store qtrcntr+1 to qtrcntr
enddo
Select primary
Accept 'Enter week number ' to curweek
Store len(curweek) to N
If $(curweek,N,1)='-' .and. curweek<>'-'
Store $(curweek,1,N-1) to curweek
Accept 'Enter a starting last name ' to LNAME
? 'Now searching for',lname
If FCATTD
find &LNAME
endif
Do while (* .or. last:name<>lname .or. &bname) .and. .not. EOF
SKIP
enddo
If last:name<>lname
Accept 'No names found with this name. Press <retn> ' to XX
RETURN
endif
endif
Store ' ' to XX
Store val(curweek) to curwk
Do while (curwk<1) .or. (curwk>wkcnt)
If !(curweek)='Q'
STORE T TO VALID3
Return
endif
Accept 'Invalid week number. Please enter again ' to curweek
Store val(curweek) to curwk
enddo
Store 0 to qtrcntr
Do while qtrcntr<5
Store qtrcntr+1 to qtrcntr
Store str(qtrcntr,1) to Q
If curwk<wkcnt&Q
Store $(curdat&Q,(pwk&Q+curwk+12-qtrcntr*13)*6-5,6) to weekname
Store 5 to qtrcntr
endif
enddo
Store curweek+' - '+weekname to weekname
Release Q1,Q2,Q3,Q4,CURDAT1,CURDAT2,CURDAT3,CURDAT4,qtrcntr,pwk,wkcntr,wkcnt,Q
Release lname,pwk1,pwk2,pwk3,pwk4,wkcnt1,wkcnt2,wkcnt3,wkcnt4,curweek,N
STORE CURWK TO curwk5
Store curwk+5 to curwk
return
ame
Store F to match
If FCATTD
find &LNAME
endif
Do while (