home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / netdor3.zip / VNDINST / FRNTENDS / SPSS / PACKRUN.CMD < prev   
OS/2 REXX Batch file  |  1996-04-04  |  3KB  |  83 lines

  1. /******************************************************************
  2.  
  3. Description:    SPSS Run Exec.
  4.  
  5. Details:        This exec sets up the appropriate SPSS environment
  6.                 then executes SPSS.
  7.  
  8. Dependencies:
  9.    Externals:   RXUTILS.DLL - Part of VENDOR package.
  10.                 HIDEWIN.EXE - Part of VENDOR package.
  11.    Drive(s):    Always use same drive.
  12.    Directories: DLLs and EXEs in current directory.
  13.    Window Type: FS/Win
  14.    App Title:   SPSS Statistics for OS/2
  15.  
  16. Last Updated:   9/24/92
  17. ******************************************************************/
  18. '@echo off'
  19. trace 'o'
  20.  
  21.  
  22. /* Load externals */
  23. call RxFuncAdd 'RXPAUSE',     'RXUTILS', 'RXPAUSE'
  24. call RxFuncAdd 'RXOS2INI',    'RXUTILS', 'RXOS2INI'
  25.  
  26.  
  27. /* Get drive letter being used and set vars */
  28. parse upper source . . drv
  29. drv = left(drv,2)
  30. env = 'OS2ENVIRONMENT'                /* Short Hand */
  31. Session = 'SPSS Statistics for OS/2'  /* Session title (used by HIDEWIN) */
  32.  
  33.  
  34. /* Give header */
  35. say
  36. say 'SPSS Statistics for OS/2'
  37. say '------------------------'
  38. say
  39.  
  40. /***************************************************************************/
  41. /** Check if Local Directory exists, if not tell user to run installation **/
  42. /***************************************************************************/
  43.  
  44. Local.Directory = RxOS2Ini(, 'Directories', 'SPSS')
  45. if Local.Directory = '$RXERROR' then do
  46.    Local.Directory = RxOS2Ini(, 'SPSS', 'WORKDIR')
  47.    if Local.Directory <> '$RXERROR' then do
  48.       call RxOS2Ini , 'Directories', 'SPSS', Local.Directory
  49.       call RxOS2Ini , 'SPSS', 'WORKDIR', '$RXDEL'
  50.    end
  51. end
  52.  
  53. if rxDirExist(Local.Directory)=0 then do
  54.    say
  55.    say d2c(7)|| ' Local SPSS directory not set.'
  56.    say ' You must run the installation program.'
  57.    say
  58.    call RxPause
  59.    'exit 10'
  60. end  /* Do */
  61.  
  62.  
  63. say ' Local SPSS directory = 'Local.Directory
  64. say
  65.  
  66. /** Give message that we are starting the program **/
  67. say ' Starting the SPSS program.'
  68. say ' This will take a few moments, please be patient.'
  69. say
  70. say ' Once SPSS has started, this window will be hidden.'
  71. say ' This window must be present for SPSS to run.....'
  72.  
  73.  
  74. /** Setup session and run SPSS **/
  75. call value 'PATH',    drv'\;'value('PATH', ,env),  env
  76. call value 'DPATH',   drv'\;'value('DPATH', ,env), env
  77. call value 'SPSS',    drv'\',                      env
  78. call value 'SPSSTMP', Local.Directory'\TEMP',      env
  79. call directory Local.Directory
  80. 'start hidewin /D=10 'Session
  81. 'spsspm.exe'
  82. 'exit'
  83.