home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 2 BBS
/
02-BBS.zip
/
imm_110.zip
/
DOTICK.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-11-18
|
4KB
|
116 lines
/* TIC processing */
/**************************************************************
* Load the REXX Utility Functions (RexxUtil)
**************************************************************
*/
CALL RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
CALL SysLoadFuncs
/**************************************************************
* load shareware dll for resource locking function.
**************************************************************
*/
If RxFuncQuery('RxExtra') <> 0 Then
ry = RxFuncAdd('RxExtra', 'RxExtras', 'RxExtra')
CALL RxExtra "Drop" /* Drop everything */
rc = RxFuncAdd('RxExtra', 'RxExtras', 'RxExtra')
CALL RxExtra "Load"
OS2ENV = "OS2ENVIRONMENT"
Dir_Tick = Value('tick',,OS2ENV)
Dir_MailProc = Value('mailproc',,OS2ENV)
Dir_NodeList = Value('nodelist',,OS2ENV)
Dir_Binkley = Value('binkley',,OS2ENV)
Dir_Max = Value('max',,OS2ENV)
CurDir = Directory()
/**************************************************************
* before we start make sure no one else is messing around
* with mail and the outbound FLO files. to this we obtain
* a system resource. any other mail processes must also follow
* this same technique to avoid corrupting files by walking on
* each other
**************************************************************
*/
Say 'Waiting for TicLock...'
DO UNTIL DATATYPE(hmaillock) = 'NUM'
hmaillock = RxResourceCreate('TicLock')
IF RxResourceRequest('TicLock') = 'Resource available' THEN
LEAVE
END
/**************************************************************
* Check for any received files that require additional
* processing
**************************************************************
*/
Call SysFileTree "C:\Binkley\Inbound\NodeDiff.A??", NodeDiff, 'F'
Call SysFileTree "C:\Binkley\Inbound\Fnews*.*", Fnews, 'F'
Call SysFileTree "C:\Binkley\Inbound\IbmList.Z??", IbmList, 'F'
/**************************************************************
* run the tic processor
*
* if nef was successful, update the max available files
* index
**************************************************************
*/
rq = Directory(Dir_Tick) ;
Nef
If rc = 0 Then Do
"Echo > C:\Binkley\Flags\BtReScan.01"
"Echo > C:\Binkley\Flags\BtReScan.02"
rq = Directory(Dir_Max)
fbp
End
/**************************************************************
* If a nodediff or the fido news was received, update binkleys
* okfile.lst
**************************************************************
*/
If Fnews.0 \= 0 Then Do
rq = Directory(Dir_Binkley)
"Flm -cflmokfil.cfg"
End
/**************************************************************
* if a nodediff was received, we'll go ahead and compile
* the new list. when we are done, we'll tell binkley about
* it so he can copy it to his area.
**************************************************************
*/
If NodeDiff.0 \= 0 | IbmList.0 \= 0 Then Do
rq = Directory(Dir_NodeList)
If NodeDiff.0 \= 0 Then Do
"Del D:\NodeList\Old\Node*.*"
"Copy D:\NodeList\Current D:\NodeList\Old"
"Del D:\NodeList\Current\Node*.*"
"DayNbr /d5 /+0 Copy D:\NodeDiff\NodeDiff.@A## D:\NodeList\Current "
"DayNbr /d5 /+0 Arc2 X D:\NodeDiff\NodeDiff.@A##"
End
If IbmList.0 \= 0 Then Do
"DayNbr /d5 /+0 Unzip D:\IbmNet\IbmNet\IbmList.@Z##"
End
FastLstp
rq = Directory(Dir_Binkley)
"Flm -cflmokfil.cfg"
End
EndIt:
CALL RxResourceRelease 'TicLock'
rq = Directory(CurDir)
"exit"