BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
MariaD
Barite | Level 11

Hi folks, 

 

We are making some test using the following command line to execute on batch. 

 

/sas/config/Lev1/SASMain/BatchServer/sasbatch.sh -log /path/log.#Y_#m_#d.log -batch -noterminal -logparm "rollover=session" -xcmd -sysin /path/program.sas &

The test SAS program only copy a SASHELP.CLASS table. After reviewing the generated log, we identified some libname definitions on it. We reviewed the autoexec included on BatchServer folder and the autoexec is empty. We reviewed the autoexec included on /home/user folder and is empty too. How could I identify which autoexec used?

 

Regards, 

 

1 ACCEPTED SOLUTION

Accepted Solutions
gwootton
SAS Super FREQ

Thanks @MariaD 

 

If you wanted to prevent it from assigning the libraries for a particular execution you could add an invalid option like -metaautoresources "foo" to the command line. This would produce the message:

 

NOTE: No preassigned object definitions were found on the metadata server.

As @Kurt_Bremser  pointed out, the pre-assigned libraries are supposed to be assigned for any server started from that context so it may not be desirable to prevent these from assigning all the time by modifying the configuration file.

If you don't want them to be assigned ever for any server session, you can remove the pre-assignment from the libraries in SAS Management Console. If you do not want them to assign for particular users, you can deny ReadMetadata permission to the library for those users. This could be helpful if you are running your batch jobs as a particular user.

--
Greg Wootton | Principal Systems Technical Support Engineer

View solution in original post

6 REPLIES 6
gwootton
SAS Super FREQ

Hi @MariaD ,

 

Do you have any pre-assigned libraries associated to the SASMain application server context? These would be loaded during startup by way of the METAAUTORESOURCES option in SASMain/sasv9.cfg. The autoexec files sourced are those for the context and the Batch Server specifically. i.e. SASMain/appserver_autoexec(_usermods).sas and SASMain/BatchServer/autoexec(_usermods).sas.

 

You can identify these by following the autoexec option. sasbatch.sh sources BatchServer/sasv9.cfg which contains the autoexec option pointing to BatchServer/autoexec.sas. That file sources autoexec_usermods.sas and ../appserver_autoexec.sas, which sources ../appserver_autoexec_usermods.sas.

--
Greg Wootton | Principal Systems Technical Support Engineer
MariaD
Barite | Level 11

Thanks @gwootton . There is any way to unable the METAAUTORESOURCES for specific process? Something like "-NOMETAAUTORESOURCES" to add in some config fiel or options METAAUTORESOURCES = NO...

 

 

Regards, 

Kurt_Bremser
Super User

@MariaD wrote:

Thanks @gwootton . There is any way to unable the METAAUTORESOURCES for specific process? Something like "-NOMETAAUTORESOURCES" to add in some config fiel or options METAAUTORESOURCES = NO...

 

 

Regards, 


Don't do that. There is a REASON why the application-server based context is also valid in the subservers, one of them being the batch server. After all, you expect that programs that work in the workspace server will also work in batch.

gwootton
SAS Super FREQ

Thanks @MariaD 

 

If you wanted to prevent it from assigning the libraries for a particular execution you could add an invalid option like -metaautoresources "foo" to the command line. This would produce the message:

 

NOTE: No preassigned object definitions were found on the metadata server.

As @Kurt_Bremser  pointed out, the pre-assigned libraries are supposed to be assigned for any server started from that context so it may not be desirable to prevent these from assigning all the time by modifying the configuration file.

If you don't want them to be assigned ever for any server session, you can remove the pre-assignment from the libraries in SAS Management Console. If you do not want them to assign for particular users, you can deny ReadMetadata permission to the library for those users. This could be helpful if you are running your batch jobs as a particular user.

--
Greg Wootton | Principal Systems Technical Support Engineer
MariaD
Barite | Level 11

Thanks folks! Yes, for some executions, because we have a lot of external libname that takes time, we preferer to exclude it. Regards, 

dcmacedo
Obsidian | Level 7

These are pre-signed libraries. It is an option of the libraries registered in metadata.
To find out more, please consult: https://documentation.sas.com/?docsetId=bidsag&docsetTarget=p0u8xcdo2ll3kmn1oqfz2s0ybooq.htm&docsetV...

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
  • 6 replies
  • 2259 views
  • 4 likes
  • 4 in conversation