|
Masoud,
I agree with datanull's suggestion, except if your k: variables were not
entered in sequential order. For example:
data a;
call missing(of a b c d e f k3 k2 k4 k1);
run;
proc print data=a;
var b d a e k:;
run;
However, if you can get away with a bunch of notes in your log, you could
correct that as follows:
data a;
retain k1-k99;
set a;
run;
proc print data=a;
var b d a e k:;
run;
HTH,
Art
--------
On Tue, 29 Jul 2008 16:26:11 -0500, data _null_, <datanull@GMAIL.COM>
wrote:
>Sas Variable List (Name: ) If you don't have any K variables you get a
warning.
>
>data a;
> call missing(of a b c d e f k1 k2 k3 k4);
> run;
>proc print data=a;
> var b d a e k:;
> run;
>
>data a;
> call missing(of a b c d e f);
> run;
>proc print data=a;
> var b d a e k:;
> run;
>
>On 7/29/08, Masoud Pajoh <mpajoh@odot.org> wrote:
>> I have a data set a which has these vars:
>>
>> a b c d e f k1 k2 k3 k4
>>
>> To print in the order I want I would do;
>>
>> proc print data=a;
>> var b d a e k1 k2 k3 k4;
>> run;
>>
>> that is easy.
>>
>> Now in my situation I do not know how many K's the data set has, if any.
>> but I still want to print:
>> var b d a e
>> and then all the present K's in order if there are any.
>> The K's are always sequentially numbered, i.e. k1 k2 k3 . . .
>>
>> how can I do that?
>>
>> thanks for all the help.
>>
|