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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1180 views
  • 0 likes
  • 3 in conversation