10-21-2014 02:24 PM
I have used proc format in the past and have a wired question...
I want to know what happens if I don't put the other in the proc format?????
as u can see I used "other" in $origin and not in the $origin...............and I am using those two formats on the same variable
automatically doesn't it get set to missing? do we have to use OTHER????
'25', 'NS', 'NP', 'NB'='5'
if TYPE=4 then NB04=put(Code,$orignB.);
10-21-2014 03:28 PM
Generally if you do not use an OTHER assignment then the original value will be displayed. If numeric that may be in a BEST type format. I think if your format is character and you assign a default length shorter than "other" values they could be truncated to the length of the setting in the format.
10-22-2014 09:44 AM
Thanks for the reply
If I have properly understood you then:
In my example above" if I did not use "Other "u meant : what ever is the CODE value will be put into NB04.....even if I didn't say so????????
NB04 has a value of 28 and 29 where CODE is 28 and 29?????
10-22-2014 04:13 PM
I was thinking so far if I am creating a new variable(UBO4) like shown below and then put the resultant in that variable after applying the format........
28 and 29 would not come there into the UBO4 column.....even if you give a length of how much ever to the format.
I was thinking there would be a blank in UBO4 column corresponding to the 28 and 29 in the ID column!!!!!!!!since we did not assign anything to it........it seems clearly that is bringing the ID values (original values) for which ever format doesn't get applied????
But it seems clearly that it is wrong!!!!
input CODE $;
10-22-2014 04:22 PM
That's exactly the behavior I mentioned earlier: if you don't have an "other" then the original value is the result of the format. If you want a blank then use an other= ' ' statement in your format.