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.
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
  • 1172 views
  • 0 likes
  • 3 in conversation