Architecting, installing and maintaining your SAS environment

SAS Autoload script getting error

Accepted Solution Solved
Reply
Contributor
Posts: 65
Accepted Solution

SAS Autoload script getting error

I am getting below error while submit the job schedule.sh: - 

 

ERROR: Unrecognized SAS option name USERMODS_OPTIONS.
ERROR: (SASXKRIN): KERNEL RESOURCE INITIALIZATION FAILED.
ERROR: Unable to initialize the SAS kernel.


Accepted Solutions
Solution
‎02-08-2017 12:25 PM
Super User
Posts: 7,768

Re: SAS Autoload script getting error

Posted in reply to sewa_bal_gmail_com

Replace this

USERMODS_OPTIONS="-memsize 0 -cpucount ACTUAL "

with these two lines

-memsize 0
-cpucount ACTUAL

the USERMODS_OPTIONS= line was meant for a shell script, but not a SAS configuration file.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers

View solution in original post


All Replies
Super User
Posts: 7,768

Re: SAS Autoload script getting error

Posted in reply to sewa_bal_gmail_com

USERMODS_OPTIONS is a UNIX environment variable set in the _usermods.sh extension to the shell script.

It should be called in the main shell script as $USERMODS_OPTIONS (inside double quotes).

This seems to have been modified in a faulty way, or setting it was removed from the _usermods.sh, or the _usermods.sh is no longer called from your shell script.

 

To verify this, post the schedule.sh shell script code.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Contributor
Posts: 65

Re: SAS Autoload script getting error

Posted in reply to KurtBremser

Thanks for reply.

 

I can see there is no value has been defined on /opt/sas/config/Lev1/SASApp/sas_usermods.sh

 

SAS_USERMODS_OPTIONS=

 

Please explain in very simple steps how to fis this issue.

Super User
Posts: 7,768

Re: SAS Autoload script getting error

Posted in reply to sewa_bal_gmail_com

Please read my post again, thoroughly.

I specifically asked you to post the code of your scripts.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Contributor
Posts: 65

Re: SAS Autoload script getting error

Posted in reply to KurtBremser

Please see below schedule.sh script

#!/bin/bash
#
# schedule.sh
#
# syslog Schedule AutoLoad.sas
#

RUNSAS_PATH="/opt/sas/config/Lev1/Applications/SASVisualAnalytics/VisualAnalyticsAdministrator/runsas.sh"
TIME_INTERVAL_MINUTES=15


#call to runsas.sh
cat <(fgrep -i -v $RUNSAS_PATH <(crontab -l)) <(echo "*/$TIME_INTERVAL_MINUTES * * * * $RUNSAS_PATH > /dev/null ") | crontab -

Trusted Advisor
Posts: 1,312

Re: SAS Autoload script getting error

Posted in reply to sewa_bal_gmail_com

@sewa_bal_gmail_com,

 

I guess @KurtBremser meant more scripts, this one cannot give us much information. So, runas.sh and its dependent scripts.

Contributor
Posts: 65

Re: SAS Autoload script getting error

Posted in reply to JuanS_OCS

Please see below runsas.sh script. 

 

#!/bin/bash
#
# runsas.sh
#
# syslog Run AutoLoad.sas
#

# Source level_env
. /opt/sas/config/Lev1/level_env.sh

SERVER_CONTEXT=SASApp
APPSERVER_ROOT=$LEVEL_ROOT/$SERVER_CONTEXT
AUTOLOAD_ROOT=/opt/sas/config/Lev1/Applications/SASVisualAnalytics/VisualAnalyticsAdministrator

FILENAME="$AUTOLOAD_ROOT/AutoLoad.sas"
LOG_FILE="$AUTOLOAD_ROOT/Logs/AutoLoad_#Y.#m.#d_#H.#M.#s.log"
LST_FILE="$AUTOLOAD_ROOT/Logs/AutoLoad.lst"
PID_FILE=$AUTOLOAD_ROOT/autoload.pid
CFG_FILE="$AUTOLOAD_ROOT/AutoLoad.cfg"
MOD_FILE="$AUTOLOAD_ROOT/AutoLoad_usermods.cfg"

# Set config file path
export SASCFGPATH="$APPSERVER_ROOT/sasv9.cfg, $APPSERVER_ROOT/sasv9_usermods.cfg, $CFG_FILE, $MOD_FILE"

# Function to run the autoload.sas program and save the pid
fnRunSAS()
{
cd $APPSERVER_ROOT
$SAS_COMMAND -sysin $FILENAME -log $LOG_FILE -print $LST_FILE -batch -noterminal -logparm "rollover=session" &

echo $! > $PID_FILE
}

# Ensure process listed in autoload.pid is not running
if [ -f $PID_FILE ]; then
kill -0 $(< $PID_FILE) > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "autoload still running (pid $(< $PID_FILE))"
exit 1
else
fnRunSAS
fi
else
fnRunSAS
fi

exit 0

Super User
Posts: 7,768

Re: SAS Autoload script getting error

Posted in reply to sewa_bal_gmail_com

I see no reference to USERMODS_OPTIONS or SAS_USERMODS_OPTIONS here.

Next inspect all the .cfg files named. Changes from the default should only be made in the _usermods.cfg files.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Trusted Advisor
Posts: 1,312

Re: SAS Autoload script getting error

Posted in reply to KurtBremser

And their parents.

 

One example is  as on your code:

CFG_FILE="$AUTOLOAD_ROOT/AutoLoad.cfg"
MOD_FILE="$AUTOLOAD_ROOT/AutoLoad_usermods.cfg"

 

You might want to check your SASApp and SASApp/WorkspaceServer folder as well.

Contributor
Posts: 65

Re: SAS Autoload script getting error

Posted in reply to KurtBremser

Please see below AutoLoad_usermods.cfg file.

/*
* AutoLoad_usermods.cfg
*
* This config file extends options set in sasv9.cfg.
* Place your options specific to this AutoLoad in this file.
*
* Do NOT modify the AutoLoad.cfg file.
*
*/
USERMODS_OPTIONS="-memsize 0 -cpucount ACTUAL "

 

 

and autoload.cfg file

 

/*
* AutoLoad.cfg
*
* This config file should not be edited.
*
* Place SAS option customizations specific to this AutoLoad in
* AutoLoad_usermods.cfg
*
*/

 

 

 

Solution
‎02-08-2017 12:25 PM
Super User
Posts: 7,768

Re: SAS Autoload script getting error

Posted in reply to sewa_bal_gmail_com

Replace this

USERMODS_OPTIONS="-memsize 0 -cpucount ACTUAL "

with these two lines

-memsize 0
-cpucount ACTUAL

the USERMODS_OPTIONS= line was meant for a shell script, but not a SAS configuration file.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Contributor
Posts: 65

Re: SAS Autoload script getting error

Posted in reply to KurtBremser

Thanks....Now I am getting SAS error while loading data into LASR server . Please find sas log.

Trusted Advisor
Posts: 1,312

Re: SAS Autoload script getting error

Posted in reply to sewa_bal_gmail_com

Hello @sewa_bal_gmail_com,

 

If this is a continuation of https://communities.sas.com/t5/SAS-Visual-Analytics/Unable-to-load-data-into-Lasr-server-via-autoloa... please close one of the two topics. It makes sense to open this one here if it is a more technical question, but then, please close the other one and mark the most suitable solution to the initial question.

 

Besides this, this message seems to me again a problem of permissions, your user cannot access the usermods file/s. Your Linux administrator should be able to help you properly.

 

Thank you!

Best

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 12 replies
  • 254 views
  • 3 likes
  • 3 in conversation