The SAS Output Delivery System and reporting techniques

Is it possible put 'invisible' character elements in proc report?

Reply
Frequent Contributor
Posts: 148

Is it possible put 'invisible' character elements in proc report?

Hi all,

 

Could you please advise with the following issue: Is it possible put 'invisible' character elements in proc report? Should 'escapechar' be used and what is the correct syntax?

 

Here below is my attempt to use '~w' as invisible element after ODS ESCAPECHAR = "~w":

 

1.jpg

Super User
Super User
Posts: 8,371

Re: Is it possible put 'invisible' character elements in proc report?

Posted in reply to DmytroYermak

Well, ods escapechar tells SAS what character(s) to use to indicate an escape code, so you don't want ~w as the characters only the ~:

ods escapechar="~";

Note how I don't code all in uppercase.

 

Now I don;t know where your ~w is coming in, is it in the data, if so that change should work (and assuming w is a real code).  If not post some full code so can see.  Also, one option to remember on proc report is asis, which if you have spaces will show them, rather than trimming:

define var / style=(asis=on);

 

Super User
Posts: 10,205

Re: Is it possible put 'invisible' character elements in proc report?

Posted in reply to DmytroYermak
firstly, use
ods escapechar="~";

then  ~_  stands for a white blank .




Frequent Contributor
Posts: 148

Re: Is it possible put 'invisible' character elements in proc report?

Thank you! I can review thoroughly a little bit later on, sorry for that.
SAS Super FREQ
Posts: 8,958

Re: Is it possible put 'invisible' character elements in proc report?

[ Edited ]

Hi, the ESCAPECHAR sequence of ESCAPECHAR+underscore is an older form of syntax that was first introduced in SAS 8.3 to insert a "non-breaking space" -- not necessarily the same as a "white space".

The newer syntax is
ESCAPECHAR+{NBSPACE 1}.

So if Escapechar is defined at ~, then instead of ~_ you would have
~{NBSPACE 1} as shown here: http://go.documentation.sas.com/?docsetId=odsug&docsetTarget=p11xia2ltavr8ln17srq8vn4rnqc.htm&docset...

cynthia

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