BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
radha009
Quartz | Level 8

i want to display the date next to the column name on the report. can;t get the firday date from %let = %sysfunc(weekday("&sysdate"d));

 

&todaydate1. = 10/21/2019

 

 

proc report data=sh1.week_sch
STYLE(Header)={background=lightgreen foreground=black}
style(column)={background=White foreground=black}
style(report)={width=10in};
column Support_Type Friday_order Saturday_order Sunday_order Monday_order;
define Support_Type / display ' Schedule';
define Friday_order / display 'Friday' &todaydate1.;
define Saturday_order / display 'Saturday' ;
define Sunday_order / display 'Sunday Support';
define Monday_order / display 'Monday Support';
run;

 

 

NOTE: Line generated by the macro variable "TODAYDATE1".
1 10/21/2019
--
22
76
ERROR 22-322: Syntax error, expecting one of the following: a quoted string, ;, ACROSS,
ANALYSIS, CENTER, COLOR, COMPUTED, CONTENTS, CSS, CV, DESCENDING, DISPLAY,
EXCLUSIVE, F, FLOW, FORMAT, GROUP, ID, ITEMHELP, LEFT, MAX, MEAN, MEDIAN, MIN,
MISSING, MLF, MODE, N, NMISS, NOPRINT, NOZERO, ORDER, P1, P10, P20, P25, P30,
P40, P5, P50, P60, P70, P75, P80, P90, P95, P99, PAGE, PCTN, PCTSUM, PRELOADFMT,
PROBT, PRT, Q1, Q3, QRANGE, RANGE, RIGHT, SPACING, STD, STDERR, STYLE, SUM,
SUMWGT, T, USS, VAR, WEIGHT, WGT, WIDTH.
ERROR 76-322: Syntax error, statement will be ignored.

 

Thank you for the help.

1 ACCEPTED SOLUTION

Accepted Solutions
JosvanderVelden
SAS Super FREQ
"/" is the default split character in proc report. That's why the date is printed on multiple lines.
Try this to see if that works for you: proc report data=sh1.week_sch
STYLE(Header)={background=lightgreen foreground=black}
style(column)={background=White foreground=black}
style(report)={width=10in} split='~';

View solution in original post

5 REPLIES 5
Ksharp
Super User
%let x= %sysfunc(today(),mmddyy10.);

...........
define Friday_order / display "Friday  &x ";
radha009
Quartz | Level 8

column name displays as

Friday 10
21
2019

JosvanderVelden
SAS Super FREQ
"/" is the default split character in proc report. That's why the date is printed on multiple lines.
Try this to see if that works for you: proc report data=sh1.week_sch
STYLE(Header)={background=lightgreen foreground=black}
style(column)={background=White foreground=black}
style(report)={width=10in} split='~';
Tom
Super User Tom
Super User

Or just use a different delimiter when generating the date value.

radha009
Quartz | Level 8

How to get the friday date of this week? in %sysfunc

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
  • 5 replies
  • 1681 views
  • 1 like
  • 4 in conversation