09-29-2017 07:01 AM
Could anybody tell me if the following behaviour is intended or not:
I created a format ($test2b) with the following dataset (created with datalines to simulate real data), with the expectation that the format will contain 2 values - 'other' and 'test'. Instead, the resulting format has only 1 value 'test' plus an other range (see image below)! I could circumvent the issue by adding hlo=' ' to all records, just don't think this has been mentioned anywhere in the documentation.
infile datalines dlm=' ';
length start label $32;
input start label;
proc format cntlin=fmt1;
Thanks in advance.
09-29-2017 07:04 AM
"other" is a keyword when creating formats. A pseudo-value of "other" covers all values not dealt with by the other entries.
09-29-2017 07:10 AM
"other" is not a keyword, rather other (without quote) is, i.e. there would differences between the formats created by the following examples:
Since I have using a dataset without specifying HLO='O', so 'other' should be consider as a text string like in Example 1 above.
09-29-2017 08:35 AM
If you want more confidence that "other" won't be treated as a keyword, add this to your DATA step:
Need further help from the community? Please ask a new question.