home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / REXXSTRT.ZIP / REXXSTRT.CMD
OS/2 REXX Batch file  |  1990-07-29  |  2KB  |  53 lines

  1. /*    */    
  2. /*   REXXSTRT  is a sample STARTUP.CMD that does different
  3. things depending on the way the system was started. The file
  4. STARTUP.STT contains the startup flags. The REXX command
  5. CHGSTT alters that flag.
  6.  
  7. In the lines LOAD etc, notice that the entire string is enclosed in     
  8. single quotes. This is to keep REXX from trying to interpret
  9. the non-national language characters ( /,:,\,etc) as commands
  10. */    
  11.  
  12. DOBACKUP = 'MONDAY'
  13. STATUSFILE = 'STARTUP.STT'
  14.  
  15.  
  16. /* set up my COMM port  */
  17.   say 'Setting the communications port parameters '
  18. '@mode com1:9600,n,8,1,octs=off,odsr=off,idsr=off'
  19.  
  20. /* always load the PAGEPRINTER Program */
  21.  
  22. say 'Loading the Pageprinter emulator'
  23. '@load "PPMON"  /PM c:\pp\ppmon.exe C: LPT1'
  24.  
  25. /*  now the conditional processing starts  */
  26.  
  27. /* If it's Monday, do the backup  */
  28. if date(WEEKDAY) = DOBACKUP
  29.    then  do
  30.              say 'Backup program will be initiated "
  31. /*            '@load "PS2BACK" /PM D:\PS2TAPE\OS2TAPE.EXE'   */        
  32.              end
  33.    else say 'No Backups today , 'date(weekday)
  34. if linein(STATUSFILE) = 'NORMAL'
  35. then do
  36.         /* load the monitor program  */
  37.         say 'Normal environment loaded'
  38.         say 'Monitor Program'
  39.         '@load "Monitor" /PM D:\os2util\monitor.exe'             
  40.         /* load random rectangles  */
  41.         say 'Rectangle program'
  42.         '@load "Random" /PM D:\os2util\randrect.exe'
  43.         end
  44.    else do
  45.         /* load trace facility  */
  46.        say 'Test environment loaded '
  47.        say 'WWDWATCH loading'
  48. /*        '@load "WWDWATCH" /PM D:\OS2UTIL\WWDWATCH.EXE' */        
  49.          end
  50.  
  51. say 'STARTUP complete'
  52. exit
  53.