home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 29 Fixes_o / 29-Fixes_o.zip / wr07060a.zip / US7060B2.DSK / LCU / LCU.ZIP / CASCKREX.CMD < prev    next >
OS/2 REXX Batch file  |  1995-04-05  |  1KB  |  43 lines

  1. /* CASCKREX 2.0                                         */
  2.  
  3. /* This procedure checks to see if REXX is intialized   */
  4. /* Return values:                                       */
  5. /*                                                      */
  6. /*       0 = REXX was initialized successfully          */
  7. /*       1 = REXX was not initialized                   */
  8.  
  9. parse UPPER ARG type rest
  10.  
  11. arc = RxFuncDrop('AskRemoveDiskIfFloppy')
  12.  
  13. arc = RxFuncAdd('AskRemoveDiskIfFloppy', 'CASAGENT', 'ASKREMOVEDISKIFFLOPPY')
  14.  
  15. /* Loop until function gets registered                  */
  16.  
  17. if arc <> 0 then do
  18.   dot = 0
  19.   dot_frequency = 1000
  20.  
  21.   Do i = 1 to 10000 Until arc = 0
  22.     arc = RxFuncAdd('AskRemoveDiskIfFloppy', 'CASAGENT', 'ASKREMOVEDISKIFFLOPPY')
  23.     if trunc(i / dot_frequency) = dot then do
  24.       rc = charout(,'. ')
  25.       dot = dot + 1
  26.     end
  27.   End
  28.   say " "
  29. end
  30.  
  31. If arc = 0 then do
  32.   if type <> 'CASAGENT' then
  33.     say 'REXX is initialized'
  34.   return (0)
  35. end
  36. else do
  37.   if type <> 'CASAGENT' then
  38.     say 'REXX is not initialzied'
  39.   return(1)
  40. end
  41.  
  42. exit
  43.