12-06-2012 09:46 AM
SAS getting automatically closed when i run this bellow code..
Is this a bug???Any IDEA???
Now i supposed to add one more value to this format for the value 3.
i am writing code like this..
Actually in above code i have to specify new format name,but i forgot and i did't get any error too.
Now i am applying this format to a dataset;
format x xyz.;
i really wondered after running above code ,because SAS getting Closed automatically.i tried this for couple of times but same result.
Why this is happening???
Any Idea about this????
12-06-2012 09:51 AM
I ran the code below (your code, with a very small modification -- in bold) and in worked.
value abc 3="Don't know"
other = [xyz.]
format x abc.;
Can you give more details about what SAS version you are using?
12-06-2012 10:01 AM
Thanks For your response..
Am using SAS 9.2 version now
and coming to your code modification,
i mentioned in my post as "Actually in above code i have to specify new format name,but i forgot and i did't get any error too".
so I too changed format name and it worked perfectly.
But my question is why SAS getting closed when i run previous code.????
12-06-2012 10:04 AM
When I ran your original code it did not close SAS.
Not sure what may have been the issue.
Glad it's working now; but it would be good to know what caused SAS to behave this way.
Best of luck!
12-06-2012 10:15 AM
The original program had a recursive format definition ... to look up a value in the XYZ format, look for "3" and if it's not there then look in the XYZ format. That this situation closed SAS looks like a bug that was fixed in 9.3. I would expect that 9.3 gives you some sort of related message when you try the original code.
12-06-2012 10:18 AM
You are correct, Astounding.
This is the error from SAS(9.3):
ERROR: XYZ is given as a format-as-label within the format of the same name. This would cause
recursion and is not allowed.
12-06-2012 10:19 AM