BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello

I have a SAS datasets generated monthly to which I would like to include a new variable called FileDate. The filedate variable has a fixed value of end of month

Could anybody help me as to how I can :
- Copy this value of filedate till the end of file is reached or the last record of each monthly dataset.
- Roll up these datasets to a quarterly jumbo dataset.

Thanks for your time.
2 REPLIES 2
Flip
Fluorite | Level 6
data xxx;
set monthly1;
RETAIN FILEDATE value;
...
...
...
Run;

proc append;
base=jumbo;
data = xxx;
run;
etc
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
To address your quarterly jumbo file request, you should have a "month ending" date, and with that you can derive a quarter-ending/starting date using the INTNX function in a DATA step assignment statement. Then depending on your SAS variables, you can use PROC SUMMARY / MEANS to generate your quarterly file using the quarter-ending date in your CLASS / BY statement.

Scott Barry
SBBWorks, Inc.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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