BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
mmohotsi
Obsidian | Level 7

I have created two macros using PROC SQL from a table attached as follows

proc sql;
create table March_Quarter_Begin as
select March as MarchStart from prototype
where Milestone = 'Quarter_Start';
select cats('',put(MarchStart,WORDDATX19.),'') into : Kotara_start from March_Quarter_begin;
quit;run;

 

proc sql;
create table March_Quarter_end as
select March as MarchEnd from prototype
where Milestone = 'Quarter_Stop';
select cats('',put(MarchEnd,WORDDATX19.),'') into : Kotara_end from March_Quarter_end;
quit;run;

 

I then created a pdf report using the code below.

 

ods pdf file = "&TMC_Report\Weekly_TMC_Performance_Report.pdf_file" notoc;
ods text = "Quarter performance: &Kotara_start to &Kotara_end";
Proc report data=Prototype;
run;

The results are in the pdf file attached.

 

The problem is that the dates are showing on two rows instead of a single row in the report.

 

Is there something I am not doing correct?

 

Please assist?

 

Regards

MMohotsi

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
s_lassen
Meteorite | Level 14

To me it looks like the title may be too long for the margin/page settings you have in your report. I think that is because CATS normally returns a result of length 200, you can use the TRIMMED options to ret rid of trailing blanks:

select cats('',put(MarchStart,WORDDATX19.),'') into : Kotara_start TRIMMED from March_Quarter_begin;

View solution in original post

1 REPLY 1
s_lassen
Meteorite | Level 14

To me it looks like the title may be too long for the margin/page settings you have in your report. I think that is because CATS normally returns a result of length 200, you can use the TRIMMED options to ret rid of trailing blanks:

select cats('',put(MarchStart,WORDDATX19.),'') into : Kotara_start TRIMMED from March_Quarter_begin;

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 1 reply
  • 492 views
  • 0 likes
  • 2 in conversation