home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Oakland CPM Archive
/
oakcpm.iso
/
cpm
/
bbs
/
dbbs50.lbr
/
MESSAGEX.CZD
/
MESSAGEX.CMD
Wrap
OS/2 REXX Batch file
|
1988-03-31
|
2KB
|
98 lines
* MESSAGE.CMD
* For terminals WITHOUT full-screen editing!
USE USERS
* No full-screen editing
STORE F TO CHANGE,FS
IF .NOT. FS
?
ACCEPT 'Enter delete date (MM/YY) MONTH/YEAR' TO DDATE
*STORE '00/00' TO DDATE
*?
*? 'You may send this message to more than one user.'
*? 'Please enter the number of users you wish to receive'
*? 'this message (maximum of 5).'
*?
*STORE T TO WRONG
*DO WHILE WRONG
* INPUT 'Number to send to' TO SNUM
* IF SNUM=0
* STORE 1 TO SNUM
* ENDIF
* IF SNUM<6
* STORE F TO WRONG
* ENDIF
*ENDDO
STORE 1 TO SNUM
STORE 1 TO CNT
* get all the names to send TO
DO WHILE CNT<SNUM+1
STORE STR(CNT,1) TO CL
ACCEPT 'To (RETURN for all)' TO R&CL
IF R&CL=' ' .AND. SNUM>1
? 'You may not send a bulk message to ALL!'
LOOP
ENDIF
STORE !(R&CL) TO R&CL
IF R&CL=' ' .AND. SNUM=1
STORE 'ALL' TO R&CL
ENDIF
IF R&CL#'ALL'
LOCATE ALL FOR NAME=R&CL
IF EOF
? 'Not a currently known user. Try again...'
LOOP
ENDIF
ENDIF
STORE CNT+1 TO CNT
ENDDO
ACCEPT "Subject" TO RE
IF RE=' '
RELE RE,CNT,R1,SNUM,CHANGE,CL,DDATE
RETURN
ENDIF
IF SNUM=1
STORE T TO WRONG
DO WHILE WRONG
ACCEPT "Password (or '*' if private)" TO PPASS
IF PPASS='*' .AND. R&CL='ALL'
? "Can't leave private mail to ALL!"
ELSE
STORE F TO WRONG
ENDIF
ENDDO
ELSE
STORE '*' TO PPASS
ENDIF
* get the next message #
USE HEADER+'
GO BOTT
STORE NO+1 TO MSG:NMBR
?
USE MSG-TEMP
GO TOP
* If there are any records!!
IF ##0
? 'Cleaning up first...'
?
DELE ALL
PACK
ENDIF
STORE 1 TO NUM
* GO BOTT
* STORE #+1 TO FIRST
DO A:ADD-MSG
DO A:EDIT-MSG