Hello! Please help a SAS EG new user.
I have 6 separate projects that are producing 6 final scores;
mylib.Level1_finalscore,
mylib.Level2_finalscore,
mylib.Level3_finalscore, etc., through mylib.Level6_finalscore
I then have an overall score project that adds all the scores together: mylib.overall_finalscore
I needed to correct the programming in levels 1 and 2 to calculate the correct scores, and have saved them as permanent datasets. When I run the last project the updated versions of Levels 1 and 2 are not being run. The old incorrect tables are still in the project and not the new versions. How do I get SAS EG to recognize/update/refresh (I'm not sure what term to use) the datasets?
/* 1. Merge all segments and finalscore datasets.*/
Data PMdata.StackAll ;
merge PMdata.pmsegments
PMdata.Level1_overall_finalscore
PMdata.Level2_overall_finalscore
PMdata.Level3_overall_finalscore
PMdata.Level4A_overall_finalscore
PMdata.Level4B_overall_finalscore
PMdata.Level4C_overall_finalscore;
by PM_order;
if MD_PM_segment = . then delete;
Proc sort;
by PM_order;
run;
Thanks,
I assume new to SAS EG means new to SAS?
SAS EG is your client with which you connect to a SAS server. SAS EG sends SAS code to a SAS server for execution and then surfaces the log and results.
The data (the SAS table) is stored on the SAS Server side.
Ensure that your libname for the same libref always points to the same physical path in any program and that you're always connecting to the same SAS server for running your programs (example: SASApp).
If above two conditions are met then first run the program that creates the tables. These tables are physical files with extension .sas7bdat and stored under the folder to which your libref points. There can only ever be a single instance (version) of such a physical file in a folder. If you change these tables then they will be changed for any program that accesses them later (as long as you execute under the same SAS Server and the libname (libref) used points to the same folder).
To avoid table locking issues and ensure you're always looking at recent data make sure to set below two EG options
Hello Patrick,
Thanks for replying. I found the options tool -->data--->performance but unfortunately the only check box I have is "close data grid after period of inactivity (specify in minutes".
I'm going to try deleting all of my finalscore datasets, then rerun the projects to see if the corrected data is then available to pull into the final project.
Cheers,
@CJJC It shouldn't be really necessary to delete all these tables if you re-run all the code that creates them. ...but it's eventually a good check to verify that you really run all the code that creates them.
Below a scripted approach for such a deletion.
/* select all tables under libref PMDATA that match search condition */
/* store result in macro variable &memlist */
proc sql noprint;
select memname into :memlist separated by ' '
from dictionary.tables
where libname='PMDATA' and memname like 'LEVEL%OVERALL_FINALSCORE'
;
quit;
/* delete all tables listed in macro variable &memlist */
proc datasets lib=PMDATA nolist nowarn;
delete &memlist;
quit;
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.