BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Asbon
Obsidian | Level 7

Hi,

 

from below how can i get systask command log  separately  in different path(sas_code.sas)

data a;

set b;

run;

systask command "/sas/abcd/sasgsub -GRIDSUBMITPGM /sasdata/path/CODE/sas_code.sas" taskname=Oracle1A status=auths;

data c;

set b;

run;

 

Thanks,

Kenneth.

1 ACCEPTED SOLUTION

Accepted Solutions
Asbon
Obsidian | Level 7

HI,

Below worked fine.

 

systask command "/sas/SASGMCU/sasgsub -GRIDSUBMITPGM /sasdata/path/CODE/sas_code.sas -gridsasopts ""(-altlog /sasdata/path/CODE/sas_code.log)""" taskname=sas_code1A status=auths;

 

Thanks,

Kenneth.

View solution in original post

4 REPLIES 4
gwootton
SAS Super FREQ
When a job is submitted via SASGSUB you can use the GRIDWAITRESULTS option to wait and pull down the log when the job completes, or GRIDGETRESULTS as a separate command to pull the log after the job has completed.

SASGSUB Command: Retrieving Job Output
https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/gridref/n0fei9l6d1l9itn0ztuytrbweu8r.htm
--
Greg Wootton | Principal Systems Technical Support Engineer
Asbon
Obsidian | Level 7

By using below code:

data a;

set b;

run;

systask command "/sas/abcd/sasgsub -GRIDWAITRESULTS -GRIDSUBMITPGM /sasdata/path/CODE/sas_code.sas -GRIDRESULTSDIR /sasdata/path/LOG" taskname=Oracle1A status=auths;

data c;

set b;

run;

exicuting good, RC=0 but getting below error: (it's trying to copy to "/sasgrid/SASBASEP/config/Lev2/SASBaseApp/sas_code.log." which i didn't specify anywhere.

> Grid job complete.
> 889562 (sas_code) is Finished: Submitted: 10Aug2023:00:53:26, Started: 10Aug2023:00:53:30 on Host dpds1222a, Ended:
10Aug2023:00:53:31, RC:0
> Moving job information to
"/sasdata/path/LOG/SASGSUB-2023-08-10_00.53.26.852_sas_code"
>
> Copying log and output to current directory.
> Grid job return code is 0 (0x0)
> ERROR: Insufficient authorization to access /sasgrid/SASBASEP/config/Lev2/SASBaseApp/sas_code.log.
NOTE: LOG/Output from task "Oracle1A"

 

is there a way:-

-GRIDWAITRESULTS is copying folder (SASGSUB-2023-08-10_00.53.26.852_sas_code) which has code, log, Job info. Is there a way where it can copy only log.

Folder & other details in folder not required.

Thanks.

gwootton
SAS Super FREQ
The path mentioned is the working directory for application servers like a workspace server, so it looks like SASGSUB is trying to use the working directory as an intermediary location. As normal users do not have write permission to this path, the authorization error is returned. What if you added a cd command ahead of the sasgsub? For example "cd /sasdata/path/LOG && /sas/abcd/sasgsub -GRIDWAITLOGLIST -GRIDSUBMITPGM /sasdata/path/CODE/sas_code.sas"

Using GRIDWAITLOGLIST pulls just the log/lst files.

SASGSUB Command: Batch Options
https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/gridref/n0tiy9ucwq0wg5n1d03wn46pj4dk.htm
--
Greg Wootton | Principal Systems Technical Support Engineer
Asbon
Obsidian | Level 7

HI,

Below worked fine.

 

systask command "/sas/SASGMCU/sasgsub -GRIDSUBMITPGM /sasdata/path/CODE/sas_code.sas -gridsasopts ""(-altlog /sasdata/path/CODE/sas_code.log)""" taskname=sas_code1A status=auths;

 

Thanks,

Kenneth.

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1014 views
  • 0 likes
  • 2 in conversation