Running a SAS program with a .bat file

Gregory_Pannetier
Gregory_Pannetier Altair Community Member

Before we used SAS software and now we use Altair Workbench.
We had a .bat file that automatically launched and executed a SAS program. It contained this command :
“C:\Program Files\SASHome\SASFoundation\9.4\sas.exe” -nosyntaxcheck -sysin ”C:\chemin\vers\monfichier.sas”
I would like an equivalent .bat with Altair Worbench that would automatically launch and run this same SAS program.
I've tried the script below but it doesn't work :
“C:\Program FilesAltair\Analytics Workbench2024\eclipse\workbench.exe” -run ”C:\chemin\vers\monfichier.sas”
Could you give me a solution ?

Best Answer

  • Gregory_Pannetier
    Gregory_Pannetier Altair Community Member
    Answer ✓

    Thank you very much for your reply.
    I tested with this .bat:
    “C:\Program Files\Altair\SLC\2024\bin\wps.exe” -run ”C:\chemin\vers\monfichier.sas”
    Unfortunately, this doesn't work. I must be using the wrong arguments.
    (However, I do have access to wps.exe on my version of Altair)

Answers

  • Nico Chart_21517
    Nico Chart_21517
    Altair Employee

    The SLC compiler can be invoked from the command:

    C:\Program Files\Altair\SLC\2024\bin\wps.exe

    (Available to all paying customers but not to Personal Edition users.)

  • Gregory_Pannetier
    Gregory_Pannetier Altair Community Member
    Answer ✓

    Thank you very much for your reply.
    I tested with this .bat:
    “C:\Program Files\Altair\SLC\2024\bin\wps.exe” -run ”C:\chemin\vers\monfichier.sas”
    Unfortunately, this doesn't work. I must be using the wrong arguments.
    (However, I do have access to wps.exe on my version of Altair)

  • Gregory_Pannetier
    Gregory_Pannetier Altair Community Member

    Thank you very much Nico. Thanks to your reply, I've understood my error and it now works.