Joel Charme
Joel Charme

Reputation: 31

SAS MMYYSw. format but not informat?

According to SAS not recognizing date format, 4 years and 6 months ago, MMYYSw. was unaccepted as SAS informat (but worked, and still works, as SAS format).

Nowadays, when I submit the following SAS piece of code:

DATA _NULL_;
    INPUT x :MMYYS7.; 
    CARDS;
    10/1946;
RUN;

I get "ERROR 48-59: The informat MMYYS was not found or could not be loaded".

My question is: do I get this error due to a coding error or because SAS still refuses MMYYS7. as an informat? Thanks in advance for your help.

Upvotes: 1

Views: 386

Answers (1)

data _null_
data _null_

Reputation: 9109

ANYDTDTE seems to work.

43         DATA _NULL_;
44             INPUT x :ANYDTDTE.;
45             format X mmyys.;
46             put x=date9. x=mmyys.;
47             CARDS;

x=01OCT1946 x=10/1946

Upvotes: 0

Related Questions