BookmarkSubscribeRSS Feed
andypandy_swe
Obsidian | Level 7

When I use the datagrid view to look at a dataset on the server that contains special missing values like ".A" ".E" ".N" ".U" I experience some odd behaviour.

The special missing values are included in the format for the variable so that when I open the dataset in the grid view I don't see .N (or N). Instead I see [Not applicable].

 

If I've got a formatted value in the datagrid I usually just double click the cell in order to view the unformatted value. However when I do this in a cell with a special missing value [Not applicable] doesn't turn into .A, it turns into a regular missing-dot (.) instead.

 

And what's even more strange (and scary) is that the regular missing-dot is written to the server. If I do the above double click and a colleague opens a new session and views the same data, they see a regular missing-dot instead of [Not applicable] or .N (or N). The missing "flavour" seems to be lost forever...

1 REPLY 1
CaseySmith
SAS Employee

Hi @andypandy_swe,

 

Some simple code and steps to reproduce greatly help investigation.  However, I was eventually able to reproduce the problem you described (though I didn't create the format, since not needed to reproduce the problem)...

 

I submitted the following code to create sample data similar to what you described:

data mydata;
missing A E N U;
input a;
datalines;
1
.A
3
.E
5
6
.N
.N
9
.U
run;

Then, as you described, the formatted values are displayed properly in the data grid.  However, if you go into table update mode and enter edit mode for a cell (ex. double-click a cell) with a special missing value, the grid shows the raw value as an empty string.  If you press Enter or click elsewhere, you are committing that (empty) value back to the data source.  This results in EG storing the blank value as a regular missing value, thus the formatted value is a '.' (period) after you commit the value (by pressing Enter), as you can see in this animated gif:

editingSpecialMissingValuesProblem.gif

The EG data grid does not currently support setting special missing values.  I will add this as a requirement to the EG data grid, since it should handle this better (and as you experienced, can too easily result in a data integrity issue).

 

In the meantime, if you wish to simply view a raw value, press the Esc key (rather than the Enter key or clicking elsewhere) when you wish to leave edit mode for a cell, so the value is not committed back to the source (which I did in the last two edits on record 7 in the animated gif above, showing the special missing value is preserved).

 

Thanks for the feedback.

 

Casey


Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Discussion stats
  • 1 reply
  • 774 views
  • 0 likes
  • 2 in conversation