Help using Base SAS procedures

SAS code ordering

Reply
Contributor
Posts: 22

SAS code ordering

Hi all,

I have a large messy code but i want it in an ordered manner.Is there any short cut to get that.'

ex:

data x;

set y;

do i=1 to 10;

j=i;

end;

run;

i want the above code in the below manner

data x;

set y;

   do i=1 to 10;

       j=i;

   end;

run;

thanks & regards

Karthik

Super Contributor
Posts: 578

Re: SAS code ordering

Posted in reply to KarthikSrivasthav

Ctrl-I will format code for you...at least in a code node in EG. (or Edit>Format Code)

Super User
Posts: 10,018

Re: SAS code ordering

Posted in reply to KarthikSrivasthav

Set up SAS University Edition , and at the top bar , there is a format code button. Click it . everything is OK.

Frequent Contributor
Posts: 84

Re: SAS code ordering

Posted in reply to KarthikSrivasthav

in SAS 9.2 is there any option to format the code

Respected Advisor
Posts: 4,173

Re: SAS code ordering

9.2 - I believe no. Post your code and we can run it through the "code formatter" of later SAS versions for you. Works fine with data step code, o.k. with SQL and not so good with SAS Macro code.

Alternatively: Install SAS University Edition on your PC/Laptop and use the "format button" as suggests.

Ask a Question
Discussion stats
  • 4 replies
  • 270 views
  • 1 like
  • 5 in conversation