COPY/PASTE SAS code in this website

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 85
Accepted Solution

COPY/PASTE SAS code in this website

how to do a proper copy/paste of sas code in this discussion forum??

I always lose some lines/columns !!

GreetZ,

Herman


Accepted Solutions
Solution
‎01-12-2015 10:57 AM
Respected Advisor
Posts: 3,775

Re: COPY/PASTE SAS code in this website

I think it depends on where the code comes from.  For me I "Copy HTML source to clipboard", from SAS EG editor.

1-12-2015 9-45-34 AM.png

Then switch to this editor to HTML

1-12-2015 9-48-51 AM.png

And you end up with something like the following after switching back.

1-12-2015 9-55-12 AM.png

data a;
   input col1-col3 col4 $;
   cards;
1  1  5  g
1  2  4  b
1  3  4  b
2  4  7  d
;;;;
   run;
proc summary descend descendtypes chartype data=a;
   class col:;
   ways 1;
  
output out=counts;
   run;
proc print;
  
run;

View solution in original post


All Replies
Esteemed Advisor
Esteemed Advisor
Posts: 7,223

Re: COPY/PASTE SAS code in this website

Yep, its really annoying.  I copy my code to notepad, then copy that to the editor box.  Its a great excuse though if my code doesn't work Smiley Happy

Frequent Contributor
Posts: 85

Re: COPY/PASTE SAS code in this website

sometimes I see nice code snippets :smileyshocked:

Esteemed Advisor
Esteemed Advisor
Posts: 7,223

Re: COPY/PASTE SAS code in this website

Could be various options.  There is a button just to the right of emoticons which allows HTML to be used.  That may support objects.  Also, to the right above that in the grey outline is a link to the advanced editor - though never used that myself.

Solution
‎01-12-2015 10:57 AM
Respected Advisor
Posts: 3,775

Re: COPY/PASTE SAS code in this website

I think it depends on where the code comes from.  For me I "Copy HTML source to clipboard", from SAS EG editor.

1-12-2015 9-45-34 AM.png

Then switch to this editor to HTML

1-12-2015 9-48-51 AM.png

And you end up with something like the following after switching back.

1-12-2015 9-55-12 AM.png

data a;
   input col1-col3 col4 $;
   cards;
1  1  5  g
1  2  4  b
1  3  4  b
2  4  7  d
;;;;
   run;
proc summary descend descendtypes chartype data=a;
   class col:;
   ways 1;
  
output out=counts;
   run;
proc print;
  
run;
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 227 views
  • 1 like
  • 3 in conversation