diff --git a/content/feed/sas-special-missings/index.md b/content/feed/sas-special-missings/index.md index 282576f..16a6450 100644 --- a/content/feed/sas-special-missings/index.md +++ b/content/feed/sas-special-missings/index.md @@ -28,6 +28,8 @@ A display gotcha worth knowing: a regular missing prints as `.`, unless `options In a SAS dataset they are written with a leading period (`.A`, `.B` ... `._`). In Data Controller you type just the letter or the underscore - no period - and the letter is not case sensitive. Two letters, or a letter mixed with a number, are refused rather than guessed. +There is one cell where the letter cannot be typed at all. A numeric column that carries a date, datetime or time format is edited through a date picker rather than the numeric editor, and a picker accepts only a date. + ## Carrying them between the browser and SAS The Data Controller frontend and the SAS backend exchange data as JSON, and JSON has no way to express a letter as a numeric value - `A` is a string. The conversion is handled in the open source [SASjs Adapter](https://github.com/sasjs/adapter#variable-types): @@ -37,7 +39,7 @@ The Data Controller frontend and the SAS backend exchange data as JSON, and JSON - Two cases cannot be inferred from the values alone: a numeric column containing *only* special missings looks like a single character column, and a character column containing only nulls looks numeric. For those, the adapter accepts an explicit format for the column - and Data Controller sends one automatically, because it already knows each column's SAS format from the metadata returned by the backend. - A value that is neither a number nor a single valid character is refused rather than guessed (for example `aaaa`, or `!` in a numeric column), and a literal `.` is refused in favour of `null` for a regular missing. -There is nothing to configure. Special missings are available by default, for numeric cells. +There is nothing to configure. Special missings are available by default, for numeric cells - a date, datetime or time formatted column aside, since those edit through a date picker. Once in SAS they are ordinary values, so they are what the approval DIFF screen compares, and the DIFF's formatted / unformatted switch shows either the formatted representation or the raw value - useful for confirming exactly which missing was set. @@ -90,6 +92,7 @@ We solved that in the open source SASjs Adapter, and it has been in Data Control - the adapter infers the column type from the values, so a column of numbers that also holds a lone letter is written to SAS as numeric, with the letter as a special missing - where the type cannot be inferred - a numeric column holding ONLY special missings - Data Controller passes the column format explicitly - you type the letter on its own: a or A, no period, and case does not matter +- one exception: a date, datetime or time formatted numeric column edits through a date picker, which takes only a date How they behave in Data Controller's validation rules: