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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 457 views
  • 0 likes
  • 2 in conversation