| Date: | Fri, 11 Nov 2005 12:36:02 -0500 |
| Reply-To: | Michael Ni <Michael.Ni@COGNIGENCORP.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Michael Ni <Michael.Ni@COGNIGENCORP.COM> |
| Subject: | Re: Warning Msg |
|
| In-Reply-To: | <200511111724.jABGmkAc017752@malibu.cc.uga.edu> |
| Content-Type: | text/plain; charset=us-ascii; format=flowed |
Ya Huang,
Thanks a lot! It works!!
Best,
Michael
Ya Huang wrote:
>Use vlabel instead:
>
>v_label=vlabel(a(i));
>
>
>On Fri, 11 Nov 2005 11:33:31 -0500, Michael Ni
><michael.ni@COGNIGENCORP.COM> wrote:
>
>
>
>>Hi,
>>
>>I have problems with the following code. If I run the code repeatedly,
>>sometimes I got warning msg. sometiems I did not.
>>
>>data one;
>> do x=1 to 5;
>> do y=1 to 5;
>> do z=1 to 5;
>> output;
>> end;
>> end;
>> end;
>>label x='XX'
>> y='YY'
>> z='ZZ';
>>run;
>>
>>data two ;
>> set one;
>> array a(*) x y z;
>> do i=1 to dim(a);
>> value=a(i);
>> v_name=vname(a(i));
>> v_label=varlabel(open("one","i"),varnum(open("one","i"),v_name));
>> output;
>> end;
>> label value='Value'
>> v_name='Variable Name'
>> v_label='Variable Label';
>>run;
>>
>>proc print;
>>run;
>>
>>The warning msg:
>>
>>Segmentation Violation In Task ( DATASTEP ]
>>Fault Occurred at [0xfed02324(?)]
>>
>>Task Traceback
>>
>>No Traceback Available
>>
>>
>>Could you tell me how to fix it or another way to code it?
>>
>>Thanks so much in advance,
>>Michael
>>
>>
|