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

Hi everyone:

 

My question is, I configured smtp in the sasv9.cnf file

 

-emailsys SMTP
-emailhost www.xxx.yyy.zzz
-emailport 25
-emailauthprotocol login
-emailid  user@mail.com
-emailpw password

 

when I run the next code from SAS Enterprise Guide this works ok

 

options emailsys=SMTP
 emailhost=www.xxx.yyy.zzz
 emailport=25
 emailauthprotocol=login
 emailid=user@mail.com
 emailpw=password;

Filename mymail Email
    To='user@anothermail.com'
    Subject='Test';

Data _NULL_;
    File mymail;
    put 'This is a test';
Run;

 

but if I run the same code from CLI (Command Line Interface) in linux the mail not send, Any idea?,

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
PaulHomes
Rhodochrosite | Level 12

In a platform installation there are many sasv9.cfg files and which ones are used will depend on how you invoke SAS. Running a SAS program in SAS EG will use the chain of sasv9.cfg files for the SAS Workspace Server. Running a SAS program from the command line using the Foundation SAS command (e.g. /opt/sas/sashome/SASFoundation/9.4/sas) will most likely not be using the same config files (unless you tell it to).

 

One way to debug this is to run proc options in your SAS code to determine which options have been set and how they were set. Look for the CONFIG option. Compare what you get in SAS EG and what you get from the CLI.

View solution in original post

2 REPLIES 2
PaulHomes
Rhodochrosite | Level 12

In a platform installation there are many sasv9.cfg files and which ones are used will depend on how you invoke SAS. Running a SAS program in SAS EG will use the chain of sasv9.cfg files for the SAS Workspace Server. Running a SAS program from the command line using the Foundation SAS command (e.g. /opt/sas/sashome/SASFoundation/9.4/sas) will most likely not be using the same config files (unless you tell it to).

 

One way to debug this is to run proc options in your SAS code to determine which options have been set and how they were set. Look for the CONFIG option. Compare what you get in SAS EG and what you get from the CLI.

SASKiwi
PROC Star

For starters you should NEVER modify sasv9.cfg, you should change sasv9_usermods.cfg.

 

To ensure all of your SAS environments within SASApp (if that's the name of your logical SAS server) get the required changes then apply it to sasv9_usermods.cfg in:

 

\.......\SAS\Config\Lev1\SASApp

 

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 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1464 views
  • 5 likes
  • 3 in conversation