DATA Step, Macro, Functions and more

self defined import format & later cannot open the file because informat was not found

Accepted Solution Solved
Reply
Super Contributor
Posts: 312
Accepted Solution

self defined import format & later cannot open the file because informat was not found

I used a self defined important format to read ina time variable, but later when I tried to open the data set , I could not open it and got this info in the log:

 

Informat IMPORTDATETIME not found or couldn't be loaded for variable LOGIN_TIMESTAMP.

 

I re-run the format code when I imported it, and then I can open the data set. Is there a way to save the informat to overcome this issue?


Accepted Solutions
Solution
‎03-09-2016 04:29 PM
Super User
Posts: 5,257

Re: self defined import format & later cannot open the file because informat was not found

Yes, store it in a permanent library. Point the fmtsearch global option to that libname.
Data never sleeps

View solution in original post


All Replies
Solution
‎03-09-2016 04:29 PM
Super User
Posts: 5,257

Re: self defined import format & later cannot open the file because informat was not found

Yes, store it in a permanent library. Point the fmtsearch global option to that libname.
Data never sleeps
Super User
Posts: 5,257

Re: self defined import format & later cannot open the file because informat was not found

If you created that informat just for the cause of importing the data, you don't have to store the variable with the informat specification. Either change your import code, or remove it from the data set using PROC DATASETS.
Data never sleeps
Super Contributor
Posts: 312

Re: self defined import format & later cannot open the file because informat was not found

Thank you. I will look into proc datasets. 

Super User
Posts: 10,511

Re: self defined import format & later cannot open the file because informat was not found

The SAS option treating that as an error and preventing use of the set is FMTERR.

 

If you use

Options nofmterr;

you  will get a message in the log about the missing format but can do anything with the set that does not require use of the missing format.

 

I have that set as a persistent system option because of the occasional dataset I get from other folks with such things and access to the format may not be possible.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 235 views
  • 0 likes
  • 3 in conversation