WPS Batch Jobs?

Jim_20918
Jim_20918 New Altair Community Member
edited October 2023 in Community Q&A

I'm brand new to WPS.  I've figured out how to run jobs within Altair Workbench.  I see references to running batch jobs, but I can't find examples or documentation.  Where can I find documentation on running a WPS/SAS program in batch mode from the command line?  

Best Answer

Answers

  • Nico Chart_21517
    Nico Chart_21517
    Altair Employee
    edited October 2023 Answer ✓

    Hi Jim,

    Here's a note about the batch command line of SLC/WPS on Windows:

    https://community.altair.com/kb_view.do?sysparm_article=KB0120940

    There's a similar note for Linux/Unix available if you need it.

    (Please note that batch mode is only available for commercial licensees i.e. is not not available for 'Community Edition' users.)

    Best Regards,
    Nico

  • Jim_20918
    Jim_20918 New Altair Community Member
    edited October 2023

    Hi Jim,

    Here's a note about the batch command line of SLC/WPS on Windows:

    https://community.altair.com/kb_view.do?sysparm_article=KB0120940

    There's a similar note for Linux/Unix available if you need it.

    (Please note that batch mode is only available for commercial licensees i.e. is not not available for 'Community Edition' users.)

    Best Regards,
    Nico

    OK, thank you.  I'll check that out.  I'm using a commercial license, so this should be very helpful.

    Jim

  • Jim_20918
    Jim_20918 New Altair Community Member
    edited October 2023

    Hi Jim,

    Here's a note about the batch command line of SLC/WPS on Windows:

    https://community.altair.com/kb_view.do?sysparm_article=KB0120940

    There's a similar note for Linux/Unix available if you need it.

    (Please note that batch mode is only available for commercial licensees i.e. is not not available for 'Community Edition' users.)

    Best Regards,
    Nico

    I’ve got WPS batch jobs working.  It’s fairly simple (once you figure it out).

    First, one needs to add the location of program wps.exe to the Windows PATH variable.

    Second, one needs to execute in the directory containing the SAS program to be run (or fully qualify the program name by prepending the path).

    Third, for a putative program named test_pgm.sas, one needs to run one of the below four command line strings.  These are all basically same command except that I’m adding various components of date and time to the log file name.  If no date and time are embedded in the log file name, the log will be overwritten each run.

    1. wps -stdio <test_pgm.sas >test_pgm.log -print test_pgm.lst 2>&1
    2. wps -stdio <test_pgm.sas >test_pgm_%date:~10,4%-%date:~4,2%-%date:~7,2%.log -print test_pgm_%date:~10,4%-%date:~4,2%-%date:~7,2%.lst 2>&1
    3. wps -stdio <test_pgm.sas >test_pgm_%date:~10,4%-%date:~4,2%-%date:~7,2%_%time:~0,2%%time:~3,2%.log -print test_pgm_%date:~10,4%-%date:~4,2%-%date:~7,2%_%time:~0,2%%time:~3,2%.lst 2>&1
    4. wps -stdio <test_pgm.sas >test_pgm_%date:~10,4%-%date:~4,2%-%date:~7,2%_%time:~0,2%.%time:~3,2%.%time:~6,2%.log -print test_pgm_%date:~10,4%-%date:~4,2%-%date:~7,2%_%time:~0,2%.%time:~3,2%.%time:~6,2%.lst 2>&1

    The following log files are, respectively, produced by each of the preceding commands:
    1. test_pgm.log
    2. test_pgm_2023-10-30.log
    3. test_pgm_2023-10-30_2028.log
    4. test_pgm_2023-10-30_20.28.46.log