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
SAS Super FREQ
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?

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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