DATA Step, Macro, Functions and more

Reg:Length Issue

Reply
Regular Contributor
Posts: 229

Reg:Length Issue

I am having a table old with variable Test with length=20 now i want to increase the length how can i do it . can we do by proc datasets procedure

Super User
Posts: 9,676

Re: Reg:Length Issue

data class; set sashelp.class;run;
proc sql;
 alter table class
  modify name char(100);
quit;

Ksharp

PROC Star
Posts: 7,363

Re: Reg:Length Issue

No.  Proc datasets only changes metadata attributes and a change to a variables length means that spaces physically either have to be added or removed from each record.

Respected Advisor
Posts: 3,124

Re: Reg:Length Issue

Edit: Art is right, there is no way to do it using proc datasets.

if using data step;

data want;

length sex $100.;

set class;

run;

Regards,

Haikuo

Ask a Question
Discussion stats
  • 3 replies
  • 143 views
  • 0 likes
  • 4 in conversation