BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Criptic
Lapis Lazuli | Level 10

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:

Output via EGOutput via EG

When I run it in Batch it returns:

Output via BatchOutput via Batch

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

1 ACCEPTED SOLUTION

Accepted Solutions
andreas_lds
Jade | Level 19

@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.

View solution in original post

10 REPLIES 10
Criptic
Lapis Lazuli | Level 10
Thank you for the quick response. Could you please tell me where I can set that option for all sessions?
SASKiwi
PROC Star

The best place would be in your SAS App server AUTOEXEC_USERMODS.SAS program

Kurt_Bremser
Super User

@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

Criptic
Lapis Lazuli | Level 10

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?

andreas_lds
Jade | Level 19

I can't reproduce the result you showed for Enterprise Guide. When i execute the code you provided, i get:missing_different.PNG

 

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.

Criptic
Lapis Lazuli | Level 10

@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.

andreas_lds
Jade | Level 19

@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.

Criptic
Lapis Lazuli | Level 10
Thanks the autoexec_usermods.sas was exactly the place where the option was set differently.
akash1088
Obsidian | Level 7
If you don't want to update missing value for whole system then you can use coalesce function.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 10 replies
  • 1549 views
  • 6 likes
  • 5 in conversation