02-14-2012 05:48 AM
I am executing a datastep by creating 50 variables with the lenghth of 200 characters each, but when i am executing it, am getting a error message
as "ERROR: An exception has been encountered" i have attached screen shot of error message as jpg format.
Please help me to solve the issue
02-14-2012 06:42 AM
Access violation can occur in a variety of situations, and can be quite unpredictable.
Try to initialize you variable a50, and see if that makes any difference.
If not, the log is quite clear: "Please contact technical support...". I suggest that you do that.
02-14-2012 02:26 PM
Try simplifying your program until the error disappears - this should give you an indication of what statement is causing the problem.
Then search the SAS support site for access violation errors relating to the statement.
It will be likely that Tech Support will ask you to do something similar.
02-14-2012 07:20 PM
You can gain more information into the problem by running the datastep in question in debug mode.
data foo /debug;
and when you run the code you will get the debugging window. If you are unfamiliar with the process there are plenty of good papers on the subject, and as others have mentioned there is always tech support. Especially when you share no code or complete logs there is not much anyone here can do to help you with the issue.
02-15-2012 12:38 AM
The code which i used , it is working up to 48 variables but not after that
length a1-a50 $200.;
a1 = 'Do you have any trouble doing strenuous activities,like carrying a heavy shopping bag or a suitcase? ';
a2 = 'Do you have any trouble taking a long walk?';
a3 = 'Do you have any trouble taking a short walk outside of the house?';
a4 = 'Do you need to stay in bed or a chair during the day?';
a5 = 'Do you need help with eating, dressing, washing yourself or using the toilet?';
a6 = 'Were you limited in doing either your work or other daily activities?';
a7 = 'Were you limited in pursuing your hobbies or other leisure time activities?';
a8 = 'Were you short of breath?';
a9 = 'Have you had pain?';
a10 = 'Did you need to rest?';
a11 = 'Have you had trouble sleeping?';
a12 = 'Have you felt weak?';
a13 = 'Have you lacked appetite?';
a14 = 'Have you felt nauseated?';
a15 = 'Have you vomited?';
a16 = 'Have you been constipated?';
a17 = 'Have you had diarrhea?';
a18 = 'Were you tired?';
a19 = 'Did pain interfere with your daily activities?';
a20 = 'Have you had difficulty in concentrating on things, like reading a newspaper or watching television?';
a21 = 'Did you feel tense?';
a22 = 'Did you worry?';
a23 = 'Did you feel irritable?';
a24 = 'Did you feel depressed?';
a25 = 'Have you had difficulty remembering things?';
a26 = 'Has your physical condition or medical treatment interfered with your family life?';
a27 = 'Has your physical condition or medical treatment interfered with your social activities?';
a28 = 'Has your physical condition or medical treatment caused you financial difficulties?';
a29 = 'How would you rate your overall health during the past week?';
a30 = 'How would you rate your overall quality of life during the past week?';
a31 = 'Did you feel uncertain about the future?';
a32 = 'Did you feel you had setbacks in your condition?';
a33 = 'Were you concerned about disruption of family life?';
a34 = 'Did you have headaches?';
a35 = 'Did your outlook on the future worsen?';
a36 = 'Did you have double vision?';
a37 = 'Was your vision blurred?';
a38 = 'Did you have difficulty reading because of your vision?';
a39 = 'Did you have seizures?';
a40 = 'Did you have weakness on one side of your body?';
a41 = 'Did you have trouble finding the right words to express yourself?';
a42 = 'Did you have difficulty speaking?';
a43 = 'Did you have trouble communicating your thoughts?';
a44 = 'Did you feel drowsy during the daytime?';
a45 = 'Did you have trouble with your coordination?';
a46 = 'Did hair loss bother you?';
a47 = 'Did itching of your skin bother you?';
a48 = 'Did you have weakness of both legs?';
a49 = 'Did you feel unsteady on your feet?';
a50 = 'Did you have trouble controlling your bladder?';
02-15-2012 12:45 AM
There is nothing wrong with that code. You probably had a temporary problem with your computer. Perhaps the disk where your WORK library is located was full? If you are running on a server perhaps some over eager admin deleted your work libary files out from under you.
02-15-2012 12:58 AM
i tried working this in SAS 9.1.3 its working good, but in SAS 9.3 it shows these issue, and it is working for 48 variables. I tried in New session also.