BookmarkSubscribeRSS Feed
nsahotay
Calcite | Level 5

Hi,

 

Have an issue where we have two control tables, one lists all the data files we get in and shows flags that confirm the data is loaded and merged into the relevant SAS library. The other table is the Control Parameter table, again it lists all the data files that we have and the frequency of when the current file and the next file is due.

 

We have a data file that comes in every 2 months but normally we don't load this file due to the size of the data. However once in a while we will load it when needed. I'm trying to load the last 2 data supplies and I've tried to update the Control Parameter table in SAS Enterprise Guide by using the following step:

 

%access_remove (CONTROL) ;

run;

/**DATA for 2010 and 2017 years. **/

data ctl_parms ;

set control.ctl_parms ;

where macvar="LTST_DATA2010";

MacVar="LTST_DATA2017";

value="072018";

/*description="Date of the last DATA2017 loaded on system";*/

description="Date of the latest extract stored in the Snapshot Library:SNAP_DATA_072018_2017";

modified_DT=.;

run ;

proc append base=control.ctl_parms data=ctl_parms ;

run ;

%access_replace (CONTROL) ;

run ;

 

Or I've even tried the %access_remove step, opened the table, took the protection off and physically changed the name followed by %access_replace. It makes the change but as soon as I close the table and run the load and merge job, the changes revert back to what the original data month was last loaded.

 

I don't know why this keeps happening and I was wondering is anyone had any alternative suggestions I could try?

 

Kind regards

1 REPLY 1
Kurt_Bremser
Super User

What does the log of this code say?

 

And from where does control.ctl_parms originate? If your append succeeds, but the changes disappear afterward, there is another piece of code somwhere that creates this dataset from a different source.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 730 views
  • 0 likes
  • 2 in conversation