Variable not in file error

Reply
Regular Contributor
Posts: 167

Variable not in file error

Hi,

I am getting the following error while running the code for proc sort

3646  proc sort data= tmp.project_tracker;
3647   by ANALYSIS_NAME ANALYST_NAME;
3648  run;

ERROR: Variable PUBLISH_DATE is not on file tmp.PROJECT_TRACKER.

I initialy created a tracker with publish date but i dropped the dataset, removed all the constraints, and recreated the dataset.

But am getting this error.

Can anyone guide me on this?

Regards,

Sheeba Swaminathan





Super User
Posts: 19,870

Re: Variable not in file error

What does proc contents show for the dataset?

Regular Contributor
Posts: 167

Re: Variable not in file error

Hi Reeza,

I was unable to run the proc contents on this dataset . Same error was coming up.

Regards,

Sheeba Swaminathan

Super User
Posts: 19,870

Re: Variable not in file error

If you can't run proc contents, I'm out of ideas.

Talk to tech support or hopefully someone else has better answers.

I'd delete everything and start again...or at least restart SAS and try again, but who knows Smiley Happy

Regular Contributor
Posts: 167

Re: Variable not in file error

HI Reeza,

Yeah I tried that a couple of times and same error was coming up.

I figured out the issue. The library was preassigned using the SAS Management console and the library was registered in the metadata. Deleting the library solved the issues.

Thanks a lot for the suggestions.

Regards,

Sheeba Swaminathan

Super Contributor
Posts: 334

Re: Variable not in file error

Is it a dataset or a view? If the view is still referencing the variable but the variable no longer exists you will get a similar error.

Just a thought.

EJ

Regular Contributor
Posts: 167

Re: Variable not in file error

Hi EJ,

It is the dataset and not view.

Regards,

Sheeba Swaminathan

Ask a Question
Discussion stats
  • 6 replies
  • 1804 views
  • 0 likes
  • 3 in conversation