BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

I have run a query on the data supplied in my system. There was one record that the date against it was "." As this was in a field that should not be null I checked my data in the system against the Record Identifier there was a date in the system it was 08/08/0018 why did it not show up in the query output? Is there a certain date that EB doesn't recognize anything before it?

Thanks,
4 REPLIES 4
Doc_Duke
Rhodochrosite | Level 12
There is. It's described in the SAS system concepts help. SAS dates go back to sometime in the 1572, the start of the Gregorian calendar.
Cynthia_sas
Diamond | Level 26
Hi, you might also want to check the value of the YEARCUTOFF option for your session or installation configuration (using PROC OPTIONS). Is the year really 0018 or was there some kind of data input error?

cynthia
deleted_user
Not applicable
If the source data is an external flat file (not a SAS dataset, not a database table) then there may be another issue at hand.

Check how you are reading the records in, there may be a mis-match in the field identification/parsing/delimiting/alignment. I habe been nabbed by this on many occasions, where a field is missing, and SAS skips across the missing field and values are then shifted left causing the right most field(s) to be missing, and numeric fields may be missing because a text field was there instead.

Make sure you have sufficient logging options on to trap conversions and datatype errors. It is possible to tell SAS not to report on input errors, which greatly speeds up processing, but also can cause you to miss input errors.
advoss
Quartz | Level 8
I think the clue is located in [checking Record ID]. You are reading from a relational database, like DB2 which allows dates like 08/08/0018, whereas noted earlier, SAS only goes back to 1582. If you check your log, (not sure if that is possible/easy in EG), you would probably see a note like:
NOTE: The data value for column DATE1 (DATE1) was truncated or was out of range 1 times when retrieving that data from the DBMS.
That's what caused your missing value. I just verified this with PC/SAS 9.1.3 and DB2.

So, the real question is...Is that a data entry error or do you have to figure out an alternate method for handling really old dates?

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

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 2641 views
  • 0 likes
  • 4 in conversation