BookmarkSubscribeRSS Feed
ijmoorejr
Calcite | Level 5
My company has an installation of Viya 4 on Linux. I have a .sas program in /home/abc123/test.sas . What statement can I place inside a korn shell script to execute test.sas when the korn shell script is executed? I'm trying to figure how to run .sas programs in batch with the .log written to the same directory has the .sas. Please provide an example.
5 REPLIES 5
ijmoorejr
Calcite | Level 5

Yes, I have read that post.  I created the following test.ksh, but get the message sas-viya: 'submit-pgm' is not a sas-viya command. See 'sas-viya' --help'. upon execution of the korn shell script. Also, I see no evidence of the /home/abc123/test.sas being executed. I do not see a test.log or test.lst.

#!/bin/ksh

cd /loc/of/cli
./sas-viya --profile ${SAS_CLI_PROFILE} batch jobs submit-pgm --pgm-path /home/abc123/test.sas --context default --watch-output --wait-output --wait-log-list --results-dir /home/abc

The contents of /home/abc123/test.sas are as follows:

proc options; run;
Tom
Super User Tom
Super User

Raise a support ticket.  https://support.sas.com/

Let use know what you find out.

BrunoMueller
SAS Super FREQ

The plugins are updated on a regular basis, so I suggest to do an update/install of all the plugins of the sas-viya CLI. You can do this like so:

sas-viya plugins install --repo SAS all

In case this does not work, you might have an older version of the sas-viya CLI. I recommend do download the latest version from here: https://support.sas.com/downloads/package.htm?pid=2512

gwootton
SAS Super FREQ
The error you mention receiving would occur if you ran "sas-viya submit-pgm" instead of "sas-viya batch jobs submit-pgm". Some example output:
$ sas-viya submit-pgm
sas-viya: 'submit-pgm' is not a sas-viya command. See 'sas-viya --help'.
$ sas-viya batch submit-pgm
sas-viya batch: 'submit-pgm' is not a sas-viya batch command. See 'sas-viya batch --help'.
$ sas-viya batch jobs submit-pgms
sas-viya batch: 'submit-pgms' is not a sas-viya batch command. See 'sas-viya batch --help'.
$ sas-viya batch jobs submit-pgm
A context must be specified.
--
Greg Wootton | Principal Systems Technical Support Engineer

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Discussion stats
  • 5 replies
  • 1012 views
  • 0 likes
  • 4 in conversation