BookmarkSubscribeRSS Feed
federicasbrana
Calcite | Level 5

Hi everybody,

I am trying to use SAS JobExecution on Viya to launch jobs that are not stored in a folder.

 

If I write a SAS program and create a job from it I can run the job using both of these syntaxes:

s1) https://viya.xxxx.it/SASJobExecution/?_job=/jobDefinitions/definitions/f2ac3f78-9189-45de-9f7d-d4e6...

s2) https://viya.xxxx.it/SASJobExecution/?_program=/Users/yyyyy/My%20Folder/test_job_print

and everything is ok, but if I create a job from an interactive import in ‘Manage environment” this job does not reside in a folder so I can't use syntax s2.....

By the way its definition can be found in Environment Manager > Jobs and inside the job properties we can find the jobdefuri (es. 90b5e740-85b0-4411-a47f-68a16152ddc0).

If I execute:  https://viya.xxxx.it/jobDefinitions/definitions/90b5e740-85b0-4411-a47f-68a16152ddc0

I correctly obtain the job definition, so the definition is correct,  but if I try to execute the job using :

https://viya.xxxx.it/SASJobExecution/?_job=/jobDefinitions/definitions/90b5e740-85b0-4411-a47f-68a16...

SAS returns error.


Anybody can help me to launch SAS Viya Jobs that are not stored in folder?

Thanks in advance for any tips! 

 

Federica

 

8 REPLIES 8
gwootton
SAS Super FREQ
I was able to reproduce this by creating a job definition with only code (no name, parentFolderUri, etc). Doing the same adding a parentFolderUri did not resolve the issue, but when I patched my original adding a "type" of "Compute" it was able to complete.

Does your job failing job definition have a type defined?
--
Greg Wootton | Principal Systems Technical Support Engineer
federicasbrana
Calcite | Level 5

Thank you very much Greg for you answer.
My job type (the job is created automatically from Data Explore by importing a data) is: "EXPLORER-PROXY" and I can't modify it.

federicasbrana_0-1626689401063.png

I've tried to pass in the url a different job arguments as:

https://xxxxx/SASJobExecution/?_job=/jobDefinitions/definitions/90b5e740-85b0-4411-a47f-68a16152ddc0... 

but it doesn't work

federicasbrana_1-1626689680879.png

the property tab contains this information:

federicasbrana_2-1626690754242.png

but the launch with this id returns "job not found".

Thank you very much for any suggestions.

federica

gwootton
SAS Super FREQ
Do you see any errors in the jobexecapp or jobexecution logs that might indicate the issue?
--
Greg Wootton | Principal Systems Technical Support Engineer
federicasbrana
Calcite | Level 5

unfortunately not

the jobexecapp log is ok
2021-07-19 17:57:11.399 INFO 4934 --- [0-auto-1-exec-6] com.sas.jobexec.AppController : f.sbrana(xxx) [xxx] Avvio dell’esecuzione - Programma: /jobDefinitions/definitions/90b5e740-85b0-4411-a47f-68a16152ddc0 Utente: f.sbrana
2021-07-19 17:57:13.818 INFO 4934 --- [0-auto-1-exec-6] com.sas.jobexec.AppController : f.sbrana(xxx) [xxx] Esecuzione completata - Programma: /jobDefinitions/definitions/90b5e740-85b0-4411-a47f-68a16152ddc0 Utente: f.sbrana

 

in jobexecution log I don't find anything  about the executions. 

 

It seems that the job execution WebApp can't execute this kind of job becouse the code is not standard sas....

 

 

gwootton
SAS Super FREQ
What is the error returned to your browser when you try to execute using https://viya.xxxx.it/SASJobExecution/?_job=/jobDefinitions/definitions/f2ac3f78-9189-45de-9f7d-d4e6e...
--
Greg Wootton | Principal Systems Technical Support Engineer
federicasbrana
Calcite | Level 5

error.png

It's a generic error . The job definition is found but it's not able to execute it...

Does it work in your platform?

I've created the job from import frame in SAS Data Explorer clicking on "New job" icon

federicasbrana_0-1626763355883.png

 

 

gwootton
SAS Super FREQ
I created my test job definitions using the REST APIs rather than a particular front-end. When I created a job definition without a type I got a similar error to yours (the screen just says "System Error" and then "null"). When I then updated the type (also using the REST API) it was successful.
In looking at the jobexecapp log I see a java NullPointerException after the log indicates successful execution (presumably because it's looking for that missing type object), it sounds like yours does not have this message though:
2021-07-20 08:22:09.766 INFO 21766 --- [0-auto-1-exec-9] com.sas.jobexec.AppController : grwoot(9d6c3748) [ae798643b0b14346] Starting execution - Program: /jobDefinitions/definitions/9ace2522-212b-4962-9d3b-7f97fef09c63 User: grwoot
2021-07-20 08:22:13.665 INFO 21766 --- [0-auto-1-exec-9] com.sas.jobexec.AppController : grwoot(9d6c3748) [ae798643b0b14346] Completed execution - Program: /jobDefinitions/definitions/9ace2522-212b-4962-9d3b-7f97fef09c63 User: grwoot
java.lang.NullPointerException
...
You may wish to engage SAS Technical Support on this one.
--
Greg Wootton | Principal Systems Technical Support Engineer
federicasbrana
Calcite | Level 5

thank you i'll try with the support