Security Considerations:
- Owner: root(prevents unauthorized modifications)
- Group: root(restricts administrative access)
- Permissions: 755 (executable by all users, writable only by root)
- Important: File must be executable (+x) for SLC to process it automatically
Administrative Tasks
Initial Setup:
#Createtheconfigurationfilesudo touch/opt/altair/slc/2026/altairslcenv.sh
Set ownership and permissions:
sudo chown root:root /opt/altair/slc/2026/altairslcenv.shsudo chmod 755 /opt/altair/slc/2026/altairslcenv.sh
Edit the configuration:
sudo nano /opt/altair/slc/2026/altairslcenv.sh
Verification and Testing:
Test the script manually
source /opt/altair/slc/2026/altairslcenv.sh
Verify variables are set
env | grep -E "(LD_LIBRARY_PATH|ODBCINI|GOOGLE_APPLICATION_CREDENTIALS)"
Test SLC startup to ensure automatic loading
Test as a non-root user. This also tests if the shell has its $PATH variable include the<$wps_home/bin> directory as part of the $PATH value.
slc -sysin /dev/null
Troubleshooting:
Check if file exists and is executable
ls-la /opt/altair/slc/2026/altairslcenv.sh
Test script syntax
bash -n /opt/altair/slc/2026/altairslcenv.sh
Check SLC process environment
ps aux | grep slccat /proc/[SLC_PID]/environ | tr '\0' '\n' | grep -E "(ODBCINI|LD_LIBRARY_PATH)"
Best Practices for Global PATH Configuration:
Add to system-wide profile for non-interactive executionecho 'export PATH="/opt/altair/slc/2026/bin:$PATH"' | sudo tee -a/etc/profile.d/slc.shsudo chmod 644 /etc/profile.d/slc.sh
This command creates the /ect/profile.d/slc.sh shell script in a global location for all users to use the SLC command-line command wps without referencing the full-path.
Security Best Practices:
- Store sensitive credentials (service account keys) in secure locations with restricted permissions (600)
- Use absolute paths in environment variables to avoid path traversal issues
- Regularly rotate service account credentials
- Monitor the configuration file for unauthorized changes
- Consider using configuration management tools (Ansible, Puppet) for large deployments
Maintenance:
- Document all environment variable changes with timestamps and rationale
- Test configuration changes in development environment before production deployment
- Backup the configuration file before making changes
- Use version control to track configuration file history
Multi-Environment Support:
- For organizations with multiple environments (dev/test/prod), consider: Setting environment-specific configuration files
/opt/altair/slc/2026/altairslcenv-dev.sh/opt/altair/slc/2026/altairslcenv-test.sh/opt/altair/slc/2026/altairslcenv-prod.sh
Symlink to active configuration
sudo ln -sf /opt/altair/slc/2026/altairslcenv-prod.sh/opt/altair/slc/2026/altairslcenv.sh
SLC Autocall Macro Library Configuration
Overview
An autocall macro library allows SLC to automatically find, expand and execute SAS macro programs without using %include statements. When you call a macro (e.g.,%my_macro()), SLC automatically searches the Autocall directories for a file namedmy_macro.sas and executes it in the user’s SLC execution stack.
This behavior enables an administrator to provision a customized SLC execution environments. Many organizations use Autocall macro libraries as a way of managing software IP. Rather than have users develop custom logic, macros provide a level ofabstraction for commonly shared tasks. Macro logic permits calling larger blocks of code and passing parameters to this logic, similar to the way parameter passing works in lover- level languages where functions can be user-defined.
Altair ships a collection of vendor-defined macros already set-up in an Autocall Macro Library. It attaches the label SASAUTOS to this location. In the altairslc.cfg file, it uses the -set SASAUTOS directive as:-set SASAUTOS ('!wpshome/sasmacro')
!wpshome is the internal shell variable used by SLC to reference the SLC home installation directory. By default, for the Altair-supplied production macros at this location is a directory something like: /opt/altair/slc/2026/sasmacro
AUTOCALL Macro Library Setup Steps:
Directory Structure
Select a directory structure suitable for your environment. These directories can be nested since the Autocall processing will search recursively.
/opt/slc_autocall/├── slc_connect_to_bq_libname.sas└── [other macro files]
File Naming Convention
Macro processing in SLC is enabled through a set of filename searches and are referenced by name. As a result, Autocall macros have strict naming conventions.
Critical: Autocall macro files must follow this naming convention:
- File name must match the macro name
- File name must be lower case
- File must contain only one macro with the same name
Configure SASAUTOS System Option
Once the Autocall macro library is defined, it must be exposed to SLC users’ execution stack. There are multiple methods for exposing/defining the library, depending on the customer’s particular use cases.
Method A: Set manually in SLC Session
This method is useful for developing and testing purposes.
/* Add your autocall directory to the existing sasautos path */ options sasautos=("/opt/slc_autocall" sasautos);
Method B: Set in Configuration File
Add the-sasauto directive to your SLC local configuration file. Default SLCl ocation is similar to this path:
/opt/altair/slc/2026/altairslc.cfg
The -sasautos directive is added in the altairslc_local.cfg configuration file:
-sasautos/opt/slc_autocall
It is recommended to not alter the Altair supplied altairslc.cfg file. Make a copy called altairslc_local.cfg for local customizations.
Method C: Set via Environment Variable
Define the environment variable SASAUTOS in the appropriate shell start-up script like:
~/.bashrcor~/.profileexport SASAUTOS="/opt/slc_autocall:$SASAUTOS"
Refer to the section entitled, Passing Environment Variables to SLC.
Method D: Define SASAUTO as part of SLC’s AUTOEXEC Processing (Recommended)
Search paths can be defined for SASAUTOs by concatenating paths. The search begins in the first directory and all paths are searched recursively. In cases where there are macro name collisions the last macro found is executed.
/* Set up autocall macro library */ options sasautos=("/opt/slc_autocall" "<additionalpaths>" sasautos);
See the section: SLC Autoexec Processing below.
Verify Autocall Setup
After setting up the Autocall processing, you can use various methods for test and verification.
Method A: PROC OPTIONS
/* Check current SASAUTOS settings */ proc options option=sasautos;run;
Note that this program returns all of the global systems options set at execution time. Many of these options can be set individually in each user’s instance of SLC.
Method B: PATHNAME() function
/* Test that your macro can be found */%put %sysfunc(pathname(sasautos));
In our example, this returns:
7/ Test that your macro can be found */8%put %sysfunc(pathname(sasautos)); ('/opt/altair/slc/2026/sasmacro')
Method C: Test Autocall Functionality
Before (with %include):
%include "/opt/slc_autocall/slc_connect_to_bq_libname.sas";%slc_connect_to_bq_libname(/home/trb/.gcp/bigquery-service- account.json);
After (with autocall):
/* No %inc needed: macro is being called from the AUTOCALL library */%slc_connect_to_bq_libname(/home/trb/.gcp/bigquery-service- account.json);