BookmarkSubscribeRSS Feed
KarthikSrivasthav
Calcite | Level 5

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

4 REPLIES 4
DBailey
Lapis Lazuli | Level 10

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

Ksharp
Super User

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

kumarK
Quartz | Level 8

in SAS 9.2 is there any option to format the code

Patrick
Opal | Level 21

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.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1179 views
  • 1 like
  • 5 in conversation