DATA Step, Macro, Functions and more

options FORMCHAR="|----|+|---+=|-/\<>*";

Accepted Solution Solved
Reply
Super Contributor
Posts: 271
Accepted Solution

options FORMCHAR="|----|+|---+=|-/\<>*";

Hello everyone,

 

May I ask what is the scenario to use options FORMCHAR="|----|+|---+=|-/\<>*";?

 

Thanks!


Accepted Solutions
Solution
3 weeks ago
Super User
Posts: 13,542

Re: options FORMCHAR="|----|+|---+=|-/\<>*";

Posted in reply to GeorgeSAS

Use of the FORMCHAR characters creates boxes and such in the LISTING output primarily.

If you don't use listing (plain text pretty much) then don't worry.

FORMCHAR helps create documents in plain text that are more legible if a fixed width font is used than might result for some uses if you use a font that others may not have available.

For instace this code running using the SAS MONOSPACE which uses drawing characters

ods listing;

proc tabulate data=sashelp.class;
   class sex age;
   table  age,sex;
run;

 

Looks like this in a system without SAS Monospace.

 

„ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ…ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ†
‚                      ‚           Sex           ‚
‚                      ‡ƒƒƒƒƒƒƒƒƒƒƒƒ…ƒƒƒƒƒƒƒƒƒƒƒƒ‰
‚                      ‚     F      ‚     M      ‚
‚                      ‡ƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒ‰
‚                      ‚     N      ‚     N      ‚
‡ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒ‰
‚Age                   ‚            ‚            ‚
‡ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ‰            ‚            ‚
‚11                    ‚        1.00‚        1.00‚
‡ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒ‰
‚12                    ‚        2.00‚        3.00‚
‡ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒ‰
‚13                    ‚        2.00‚        1.00‚
‡ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒ‰
‚14                    ‚        2.00‚        2.00‚
‡ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒ‰
‚15                    ‚        2.00‚        2.00‚
‡ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒ‰
‚16                    ‚           .‚        1.00‚
Šƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ‹ƒƒƒƒƒƒƒƒƒƒƒƒ‹ƒƒƒƒƒƒƒƒƒƒƒƒŒ

View solution in original post


All Replies
Solution
3 weeks ago
Super User
Posts: 13,542

Re: options FORMCHAR="|----|+|---+=|-/\<>*";

Posted in reply to GeorgeSAS

Use of the FORMCHAR characters creates boxes and such in the LISTING output primarily.

If you don't use listing (plain text pretty much) then don't worry.

FORMCHAR helps create documents in plain text that are more legible if a fixed width font is used than might result for some uses if you use a font that others may not have available.

For instace this code running using the SAS MONOSPACE which uses drawing characters

ods listing;

proc tabulate data=sashelp.class;
   class sex age;
   table  age,sex;
run;

 

Looks like this in a system without SAS Monospace.

 

„ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ…ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ†
‚                      ‚           Sex           ‚
‚                      ‡ƒƒƒƒƒƒƒƒƒƒƒƒ…ƒƒƒƒƒƒƒƒƒƒƒƒ‰
‚                      ‚     F      ‚     M      ‚
‚                      ‡ƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒ‰
‚                      ‚     N      ‚     N      ‚
‡ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒ‰
‚Age                   ‚            ‚            ‚
‡ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ‰            ‚            ‚
‚11                    ‚        1.00‚        1.00‚
‡ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒ‰
‚12                    ‚        2.00‚        3.00‚
‡ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒ‰
‚13                    ‚        2.00‚        1.00‚
‡ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒ‰
‚14                    ‚        2.00‚        2.00‚
‡ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒ‰
‚15                    ‚        2.00‚        2.00‚
‡ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒ‰
‚16                    ‚           .‚        1.00‚
Šƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ‹ƒƒƒƒƒƒƒƒƒƒƒƒ‹ƒƒƒƒƒƒƒƒƒƒƒƒŒ
Super Contributor
Posts: 271

Re: options FORMCHAR="|----|+|---+=|-/\<>*";

ods listing;
options FORMCHAR="|----|+|---+=|-/\<>*";
proc tabulate data=sashelp.class;
   class sex age;
   table  age,sex;
run;

Thank you very much!

 

 

I tried your code on SAS 9.4, without the MONOSPACE, when I copy the output and paste here,I can get :

 

„ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ…ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ†
‚ ‚ Sex ‚
‚ ‡ƒƒƒƒƒƒƒƒƒƒƒƒ…ƒƒƒƒƒƒƒƒƒƒƒƒ‰
‚ ‚ F ‚ M ‚
‚ ‡ƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒ‰
‚ ‚ N ‚ N ‚
‡ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒ‰
‚Age ‚ ‚ ‚
‡ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ‰ ‚ ‚
‚11 ‚ 1.00‚ 1.00‚
‡ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒ‰
‚12 ‚ 2.00‚ 3.00‚
‡ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒ‰
‚13 ‚ 2.00‚ 1.00‚
‡ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒ‰
‚14 ‚ 2.00‚ 2.00‚
‡ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒ‰
‚15 ‚ 2.00‚ 2.00‚
‡ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒ‰
‚16 ‚ .‚ 1.00‚

 

 

with the MONOSPACE I get:

 


--------------------------------------------------
| | Sex |
| |-------------------------|
| | F | M |
| |------------+------------|
| | N | N |
|----------------------+------------+------------|
|Age | | |
|----------------------| | |
|11 | 1.00| 1.00|
|----------------------+------------+------------|
|12 | 2.00| 3.00|
|----------------------+------------+------------|
|13 | 2.00| 1.00|
|----------------------+------------+------------|
|14 | 2.00| 2.00|
|----------------------+------------+------------|
|15 | 2.00| 2.00|
|----------------------+------------+------------|
|16 | .| 1.00|
--------------------------------------------------

Super User
Posts: 13,542

Re: options FORMCHAR="|----|+|---+=|-/\<>*";

Posted in reply to GeorgeSAS

@GeorgeSAS wrote:
ods listing;
options FORMCHAR="|----|+|---+=|-/\<>*";
proc tabulate data=sashelp.class;
   class sex age;
   table  age,sex;
run;

Thank you very much!

 

 

I tried your code on SAS 9.4, without the MONOSPACE, when I copy the output and paste here,I can get :

 

 


You want to paste plain text output in to a code box opened using the forum's {I} menu button. The main message windows here seem to have a severe dislike for white space characters and compress spaces or tabs.

☑ This topic is solved.

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

Discussion stats
  • 3 replies
  • 70 views
  • 1 like
  • 2 in conversation