BookmarkSubscribeRSS Feed
karthickbe
Calcite | Level 5
We have been using Netezza as one of the source in SAS which will be assigned as libname, so that we can able to drive those tables as like other SAS libraries. Issue : Netezza have only DATE datatype and when I open the table in SAS it shows as numeric and format as Date9. But am expecting the date format as MMDDYY10. to be displayed in format. With Date9. format while appending the data to column have MMDDYY10. warning has been displayed. Is there any way to change all the date format to MMDDYY10. in Libname itself..
3 REPLIES 3
Kurt_Bremser
Super User

Just checked here: you get a WARNING entry in the log, but the SYSCC is not changed, so you won't have a problem in a batch job.

 

But have you considered using a data step with

data basedata;
set
  basedata
  appenddata
;
run;

?

In this case, you get no WARNING, and the format from basedata is kept.

karthickbe
Calcite | Level 5

Thanks Kurt...

 

Netezza DATE datatype is displayed as DATE9. format in SAS...

My main concern is any option available to control implicit date format conversion to MMDDYY10. instead of DATE9. in Libname statement..

 

 

regards..Karthick

Kurt_Bremser
Super User

How about defining a view to the netezza table that sets the correct attribute, and then use that view as the data= in proc append?

 

Another option is to use the stringdates= option in the libname statement and treat all date values as character until you finally need them as numeric in SAS.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 3 replies
  • 1019 views
  • 0 likes
  • 2 in conversation