News from your SAS community managers

Getting the Most from Your Post: SAS Syntax Highlighter

by Community Manager on ‎10-23-2015 08:00 AM (1,960 Views)

From the 5 Quick Tips: Getting the Most from Your Post series where a new quick tip was rolled out each day this week. Tip #5:

 

5. You can add highlighted SAS code to your post.

     Good-to-know (or remember):

  •  Just click the running man icon. A box pops open. Type or paste your SAS code. Then post.
  • The highlighting will not appear in preview mode, but when you post it looks like this:

code.jpg

 

 

  • Kudos to @Patrick for using this feature so effectively.

 



That's all the tips for now. I hope this series helped you start to get the most from your posts. 

 

Feel free to post comments below. Do you have ideas or requests for more quick tips?  Let me know.  Talk with you soon!

 

To be notified of future posts, choose subscribe under blog options on the Community Memo

 

<View Previous Tip #4

 

Comments
by Occasional Contributor caibird
on ‎11-11-2017 03:16 AM
what is the running man icon look like? I see nothing in my window.
by SAS Super FREQ
on ‎11-11-2017 06:42 AM

When you post a comment or question, the edit box has icons across the top. I have circled the "Running Man" icon in red, below:

 

Region Capture.png

by Community Manager
on ‎12-07-2017 09:59 AM

Thank you for answering, @Rick_SAS@caibird if you need more info, you can find it here: https://communities.sas.com/t5/tkb/articleprintpage/tkb-id/community_articles/article-id/286

 

 

by Occasional Contributor jeniffer_jacob
on ‎12-18-2017 11:32 AM

I try to create a new binary variable Perform (1 or 0) based on another numeric variable Days. I am using SAS Enterprise guide 6.1

 

Example:

 

data want;

  set test;

  if Days =< 30 then Perform = 0;

  else if Days > 30 then Perform = 1;

run;

 

 

 

But the Perform only shows 0 although many observations have Days > 30. I also tried to switch the order of the codes as follow:  

 

Example:

 

data want;

  set test;

  if Days > 30 then Perform = 1;

  else if Days =< 30 then Perform = 0;

run;

 

 

 

I got the same results. The new variable Perform shows 0 for all the observations.

 

Can anybody help me with this problem?

 

Any help is highly appreciated.

by Community Manager
on ‎12-18-2017 11:39 AM

Hi @jeniffer_jacob,

 

Thanks for your question! It's best to start a New Message in the SAS Enterprise Guide community - that way a host of experts will see it and hopefully be able to respond.

 

All the best,

Anna

by Occasional Contributor mingfeng07
Monday

 I'm going to add a new line for my posttext option  in proc report , and I found that title statement can realize it  in title  with ods escapechar statement, but posttext option can't do it.

 

ods escapechar='^'; title "He^{newline}llo ";
proc report data = sashelp.class style(report) = {just = left pretext = 
"表{\field{\fldinst{SEQ table}}}.CGX1321 ^{newline} Cohorts"
posttext = "Hello,^{newline} world"};
run;

 

 

Besides, I want to devise my pretext and posttext option style separatedly, like that:

 

proc report data = sashelp.class style(report) = {just = center fontsize = 10pt pretext = "Hello,everyone" just = left fontsize = 5pt posttext = "Hello,world"}; run;

 

But the result is not ideal,the pretext and posttext are all located left and fontsize are 5pt.

 

If anyone has good idea, please tell me , thank you very much.

by Community Manager
Monday
@mingfeng07 Please start a new question on this topic. You will have a higher likelihood of responses to a new question, rather than responding to this old post. Thanks and best of luck.