BookmarkSubscribeRSS Feed
Getting the Most from Your Post: SAS Syntax Highlighter
LainieH
Community Manager

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

 

12 Comments
caibird
Calcite | Level 5
what is the running man icon look like? I see nothing in my window.
Rick_SAS
SAS Super FREQ

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

LainieH
Community Manager

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

 

 

jeniffer_jacob
Fluorite | Level 6

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.

AnnaBrown
Community Manager

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

mingfeng07
Fluorite | Level 6

 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.

ShelleySessoms
Community Manager
@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.
WaelAburezeq
Obsidian | Level 7

Hi,

 

I have been trying to post a new message since 3 hours with no luck. I used SAS Insert code, I added a photo of the error, I also provided detailed description of the topic along with SAS version. However, I keep getting the followings:

 

"

Welcome! You're about to tap into a huge network of SAS experts, and they all want to help you. Help them! Before you complete your post, make sure that you:
  • provide a descriptive subject line for your question
  • describe your data, or (better!) provide a sample (here's one method)
  • describe the steps you've already tried (use the Insert SAS Code tool)
  • include screen shots or pictures of errors or of your desired result (use the Insert Photos tool)" 

 

What should I do ?

 

This is my original post:

"

Hi Geeks,

 

I am trying to run SAS OPTGRAPH Procedure as to learn more about Travelling Salesman problem (for ShortestPath). I followed the same instructions in SAS Forum. The sample data includes two nodes (the starting point which is classified as "FROM" and the end point classified as "TO") in addition to the weight of this transaction coded as below:

 

Data:

 

 

data LinkSetIn;

input from $ to $ weight @@;

datalines;

A B 1.0 A C 1.0 A D 1.5 B C 2.0 B D 4.0

B E 3.0 C D 3.0 C F 3.0 C H 4.0 D E 1.5

D F 3.0 D G 4.0 E F 1.0 E G 1.0 F G 2.0

F H 4.0 H I 3.0 I J 1.0 C J 5.0 F J 3.0

F I 1.0 H J 1.0

;

 

 

Procedure: 

 

proc optgraph

loglevel = moderate

data_links = LinkSetIn

out_nodes = NodeSetOut;

tsp

out = TSPTour;

run;

%put &_OPTGRAPH_;

%put &_OPTGRAPH_TSP_;

 

 

but unfortunately I keep getting the following error:  

Capture.PNG

 

SAS Version is: 9.2

 

Please help

 

Thanks, 

Wael

 " 

abudyak
Calcite | Level 5

I am trying to post a question, but this keeps coming up after I hit post. I am not sure what "select a board" means. What should I do?

 

Capture.PNG

malhotra_jazz
Calcite | Level 5

Hi,

 

I have been trying to post a new message since 2 hours with no luck. I used SAS Insert code, I also provided detailed description of the topic along with SAS version. However, I keep getting the followings:

 
 
 
 

Capture.PNGCan anybody please explain me from where do i need to select this board?

I can't find it anywhere.

 

Thanks!

Rick_SAS
SAS Super FREQ

1. Go to the New User Community at https://communities.sas.com/t5/New-SAS-User/bd-p/new-users

2. If the upper right corner has a button that says "Sign In", then click it and sign in to your account.

3. After you are signed in, click the orange button in the upper right corner that says "Start A Topic."

I suspect you can figure it out from that point.

Tom
Super User
Super User

This thread has gone off on a tangent, but there does not appear to be any place to move the new thread to a thread of its own.  Probably because this "article" is not really a "question" to begin with.

 

There are two issues here.  @Rick_SAS seems to be trying to answer the question HOW to start posting a new question/thread.  That appears to be much harder now with the newest update.  When you are looking a particular board (community) you will see an orange start new topic button up to the right of the search area new the top of the page.

image.png

But that button only appears when you are looking at the list of topics in a particular board.

image.png

It does not show up when looking at an existing "topic". 

image.png

Or when looking at the higher level folder above the board level.

image.png

 

The second problem is getting the system to take your new topic.  For that you need to specify a specific board to place the new topic into.  When you start the post using the Start a new Topic button from with a board 

image.png

then it does work.

image.png

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Article Labels
Article Tags