home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / zpars106.zip / COMPILE.CMD next >
OS/2 REXX Batch file  |  1996-03-03  |  3KB  |  142 lines

  1. /* process nodelist program */
  2.  
  3. parse upper arg NowFlag
  4.  
  5. /* env.cmd holds the settings for my enviornment not found in the config.sys*/
  6. /*call env*/
  7.  
  8. /* define global constants */
  9.  
  10. NodeList = "K:\NodeList"
  11. NodeStore = "Store"
  12. ProcessFlag = "False"
  13. NewNodeFlag = "False"
  14. BinkleyFlag = "D:\Binkley\Flags\Forcexit.1"
  15. NICE = "i:\ubin\sp i0 " 
  16.  
  17.  
  18. if NowFlag = 'NOW' then ProcessFlag = 'True'
  19. if NowFlag = 'ZPARSE' then Signal ZParse
  20.  
  21. rq = Directory(NodeList)
  22.  
  23. /* check whether RxFuncs are loaded, if not, load them */
  24. if RxFuncQuery('SysLoadFuncs') then
  25. do
  26.     /* load the load-function */
  27.     call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'       
  28.  
  29.     /* load the Sys* utilities */
  30.     call SysLoadFuncs                                                 
  31. end
  32.  
  33.  
  34. /* ibmNET */
  35. /* search for files only and return qualified pathname only */
  36. call SysFileTree 'D:\Binkley\Inbound\ibmlist.z??', file, "FO"
  37.  
  38. /* Process ibmNET Nodelist */
  39. If file.0 > 0 then
  40.    Do
  41.       /* erase old nodelists */
  42.       'rm ibmlist.[0123]??'
  43.       'rm FReq\ibmlist.*'
  44.       do fnum = 1 to file.0
  45.          'copy ' file.fnum NodeList
  46.          NodeFile = FILESPEC("name",file.fnum)
  47.         /* ibmNET nodelists are always ZIPped */
  48.          'unzip -o' NodeFile
  49.          'move' NodeFile 'FReq'
  50.          /*"move" NodeFile NodeStore*/
  51.       end
  52.       ProcessFlag = "True"
  53.    End
  54.  
  55.  
  56. /* IMex */
  57. /* search for files only and return qualified pathname only */
  58. call SysFileTree 'D:\Binkley\Inbound\imexlist.a*', file, "FO"
  59.  
  60. /* Process Imex Nodelist */
  61. If file.0 > 0 then
  62.    Do
  63.       /* erase old nodelists */
  64.       'rm imexlist.[0123]??'
  65.       'rm FReq\imexlist.*'
  66.       do fnum = 1 to file.0
  67.          "mmv -x -d" file.fnum NodeList
  68.          NodeFile = FILESPEC("name",file.fnum)
  69.         /* IMEX nodelists are always ARCed */
  70.          'arc2 xo' NodeFile
  71.          'copy' NodeFile 'FReq'
  72.          "move" NodeFile NodeStore
  73.       end
  74.       ProcessFlag = "True"
  75.    End
  76.  
  77. /* FidoNet (nodediffs) */
  78. /* search for files only and return qualified pathname only */
  79. call SysFileTree 'D:\Binkley\Protin\nodediff.a*', file, "FO"
  80.  
  81. /* Process Fidonet nodediff */
  82. If file.0 > 0 then
  83.    Do
  84.       'rm FReq\nodediff.*'
  85.       do fnum = 1 to file.0
  86.          "mmv -x -d" file.fnum NodeList
  87.          NodeFile = FILESPEC("name",file.fnum)
  88.         /* FidoNet nodediffs are always ARCed */
  89.          'arc2 xo' NodeFile
  90.          'copy' NodeFile 'FReq'
  91.          'mmv -x -d' NodeFile NodeStore
  92.        /*  'squishp send FReq\'||NodeFile 'to 1:340/301 crash'*/
  93.        /*  'squishp send FReq\'||NodeFile 'to 1:340/307 crash'*/
  94.       end
  95.       ProcessFlag = "True"
  96.       NewNodeFlag = "True" /* nodelist was updated */
  97.    End
  98.  
  99.  
  100.  
  101.  
  102. if NowFlag = 'TEST' then ProcessFlag = 'False'
  103.  
  104.  
  105. if NewNodeFlag = "True" then 
  106.  do
  107.    'zdiff nodelist nodediff'
  108.    if rc = 0 Then
  109.      do 
  110.        'rm FReq\nodelist.zip'
  111.        'detach sp i0 zip2 -9jq FReq\NodeList nodelist.???'
  112.      end
  113.    else
  114.      do
  115.        Say "Error Processing Nodelists RC= " rc
  116.        Signal AllDone
  117.      end
  118.  end
  119.  
  120. If ProcessFlag \= 'True' Then
  121.    Signal AllDone
  122.  
  123.  
  124.  
  125. ZParse:
  126.   'zparse'
  127.  
  128.   /* make binkleyflag and force.exit flag */
  129.    Do Until rq = "READY:"
  130.       rq = stream(BinkleyFlag, "C", "Open Write")
  131.       If rq = "READY:" then
  132.         Leave
  133.  
  134.       "Delay 15 S"
  135.    End
  136.    Signal AllDone
  137.  
  138.  
  139.    
  140. AllDone:
  141.  
  142.