SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
Sticky
Fluorite | Level 6

Hi found a problem with ODS word with Proc ttest. when you have more than one analysis variable the title doesn't change from the first one.

For example if you have code something like this:

ods word file='junk.docx';

proc ttest data=screen;
var SCREEN_B_WDHR SCREEN_B_WEHR;
class NAPLAN3_R_NMS;
title 'Screen time ';
run;

ods word close;

When the analysis variable changes to SCREEN_B_WEHR the title still says the first variable, ie SCREEN_B_WDHR, which makes the output confusing to read.

 

It can be overcome by including the option 'options(body_title="yes")' in the ODS word statement, but that seems a bit clunky.

For it to work it would need a section break when the variable changes.

Regards

R

3 REPLIES 3
ballardw
Super User

ODS Word is preproduction. That means it is still in testing and development.

 

Use ODS rtf instead. Use your word processor software to open and save as if you need Docx file format.

 

 

Sticky
Fluorite | Level 6

Its been preproduction for quite a while now.

R

Sticky
Fluorite | Level 6

The same occurs with ODS EXCEL even though every table is on a separate sheet. ODS excel is not labelled preproduction so I would call this a bug.

R

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 725 views
  • 0 likes
  • 2 in conversation