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

Hi

Please help me to understand the below step by step

 

data _null_;
dt=put(today()-1, mmddyy6.);
call symputx('dt1', 111719);
put _all_;
run;

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

 

 

dt=put(today()-1, mmddyy6.);

This creates a character variable named dt which has the value of yesterday's date, in format mmddyy6 which is 102121 (10th month, 21st day, 21st year of the century) or October 21, 2021.

 

Other than that, I am not sure what you don't understand, maybe you could explain further.

--
Paige Miller

View solution in original post

4 REPLIES 4
PaigeMiller
Diamond | Level 26

 

 

dt=put(today()-1, mmddyy6.);

This creates a character variable named dt which has the value of yesterday's date, in format mmddyy6 which is 102121 (10th month, 21st day, 21st year of the century) or October 21, 2021.

 

Other than that, I am not sure what you don't understand, maybe you could explain further.

--
Paige Miller
soujanyak
Fluorite | Level 6

please explain me these below to lines....thank you

 

call symputx('dt1', 111719);
put _all_;

PaigeMiller
Diamond | Level 26
call symputx('dt1', 111719);

creates a macro variable (not a data set variable) named &DT1 that has value 111719.

 

put _all_;

writes the names and values of all data set variables (including automatic temporary variables such as _N_ and _ERROR_) to the log

 

--
Paige Miller
soujanyak
Fluorite | Level 6

thank you

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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
  • 4 replies
  • 701 views
  • 0 likes
  • 2 in conversation