home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 2 BBS
/
02-BBS.zip
/
control.zip
/
bink2.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-11-26
|
2KB
|
77 lines
/* Line 2 */
signal on failure name EXIT
signal on halt name EXIT
signal on syntax name EXIT
Drive = 'C:' /* Drive with all the goodies*/
Messages = 'C:' /* Drive with Message Bases*/
Log = 'C:' /* Drive containing logs*/
Logpath = 'log' /* Path to the logs*/
CmdPath = 'binl' /* Path to the Command files .cmd*/
MaxPath = 'max'
/* Setup
Queue*/
CntlQueue = 'Cntl'
Drive
'cd\binl'
'erase binkley.scd'
'MODE COM3:38400,n,8,1,to=on,xon=off,dtr=off,idsr=off,odsr=off,octs=on,rts=hs'
Do forever
'SET TBUF='
'SET RBUF='
'SET BTPRIO=F16'
'c:'
'cd \'CmdPath
'btp share'
errorlevel = RC
say 'CODE = 'errorlevel
select
when errorlevel = 99 then call toss
when errorlevel = 97 then call toss
when errorlevel = 95 then call toss
when errorlevel = 60 then call toss
when errorlevel = 31 then call prtlog
when errorlevel = 30 then call toss
when errorlevel = 20 then call toss
otherwise NOP
end
end
TOSS:
/* Go toss all incoming mail*/
oq = RXQueue('Set',CntlQueue)
QUEUE 'toss 2'
xx = RXQueue('Set',oq)
return
PRTLOG:
Log
'cd\'Logpath
'copy binklex.log bu.log'
'erase binklex.log'
'copy cost02.log co2.log'
'erase cost02.log'
Drive
'cd\'MaxPath
'copy 2 mx2.log'
'erase 2'
return
EXIT:
/* Check that control is running*/
xx = RXQUEUE('Create', CntlQueue)
/* REXX will name queue to another name - otherwise it exists*/
say 'Try to create - 'xx
if xx = CntlQueue then do
/* Remove it and let control recreate it*/
xx = RXQUEUE('Delete',CntlQueue)
Drive
'cd\'CmdPath
'start /fs /b control'
return
end
else
xx = RXQUEUE('Delete',xx)
/* Let control startup bink1*/
return'exit'