Hello,
I have the following coding:
data work.aa1;
start_dat = .;
start_year=put(year(start_dat),4.);
run;
When I run it via Enterprise Guide it returns:
When I run it in Batch it returns:
If the date value is non missing it works as expected in both, but when the date value is missing the above happens and I have a problem with that. Now of course I could replace the periods with blanks in an extra step or check for missing values but I'm wondering if there is an option I could set so that both environments run the same.
I'm on SAS 9.4M2, EG 7.1 and SAS is running on AIX 7.1.
Thanks in advanced for your time and kind regards
@Criptic wrote:
@andreas_lds you can reproduce it by setting the option for missing to be " ".
I know just chaning the global value of missing is not something you just do, but I want to know how to do it for my own understanding.
Of course, when i set the option missing to be " ", the issue is reproducible, what meant, that in a default setup EG does not show missing numerics as blanks.
Such options can be changed in autoexec_usermods.sas in the configuration directory of SASApp. BUT Enterprise Guide changes some options on startup, e.g. fmterr to nofmterr.
options missing = ' ';
The best place would be in your SAS App server AUTOEXEC_USERMODS.SAS program
@Criptic wrote:
Thank you for the quick response. Could you please tell me where I can set that option for all sessions?
First of all, it is a bad idea to globally set options missing to something other than the default value. People who work with SAS expect default behaviour, and set non-default behaviour locally on demand.
So, in your case, I would go hunting for the options missing statement that changes the behaviour of your workspace server, and remove it. It should be used only in the code where you need blanks to be shown.
Places to look at:
autoexec_usermods.sas files (SASApp and SASApp/WorkspaceServer) in your configuration tree
code sent from EG when a server session starts
code sent from EG when a task node is executed
code sent from EG when a code node is executed
Autoexec process flow in your EG project
Okay after some additional searching I found the option:
options missing=' ';
Now I want to change my questions sligthly where can I set that option globaly for EG and SAS Base?
I can't reproduce the result you showed for Enterprise Guide. When i execute the code you provided, i get:
Changing the appearance of missing numerics for the whole system, sound like a bad idea. Users expect to see a dot, when a numeric variable is missing.
@andreas_lds you can reproduce it by setting the option for missing to be " ".
I know just chaning the global value of missing is not something you just do, but I want to know how to do it for my own understanding.
@Criptic wrote:
@andreas_lds you can reproduce it by setting the option for missing to be " ".
I know just chaning the global value of missing is not something you just do, but I want to know how to do it for my own understanding.
Of course, when i set the option missing to be " ", the issue is reproducible, what meant, that in a default setup EG does not show missing numerics as blanks.
Such options can be changed in autoexec_usermods.sas in the configuration directory of SASApp. BUT Enterprise Guide changes some options on startup, e.g. fmterr to nofmterr.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.