LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2011, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 20 Apr 2011 07:57:32 -0700
Reply-To:     "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Subject:      Re: date format problem
Comments: To: oslo <oslo@yahoo.com>
In-Reply-To:  A<110000.60500.qm@web37507.mail.mud.yahoo.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi Hokut,

I couple of things come to mind, but they differ depending upon clarifying the terminology in your request.

In your first paragraph you mention reading in a CSV external file in the first sentence and then in the second sentence of the same paragraph you mention the date specification in your dataset. This could be interpreted two ways. IF, your referred to dataset with the 3/18/1999, 2/6/1999, 11/19/1999, 11/4/1999 is really the CSV external flat file, then I would guess that the sequenced offsets of length truncation are probably due to the INPUT statement reading the CSV file. Somehow the syntax bveing used is causing the pointer to increment by 1 for each field undesirably. Likely the inputting of the CSV file is not handling a blank space in between the date characters or something... If you show us the syntax for the csv input we could help on that.

IF, you really do mean that "in my data set is as 3/18/1999, 2/6/1999, 11/19/1999, 11/4/1999" if this data is already in a SAS-dataset which has already been loaded from the csv, then your SAS processing code or merge is somehow causing the truncation. It again would be helpful if you could share the syntax at these locations to troubleshoot this non-input portion of your code.

As you can see, it is confusing for us to know for sure which way to help because we typically refer to a "dataset" as a SAS-dataset only. Any other type of file we would not call a dataset. (yes, sometimes in other platforms and languages you may call a table of data a "dataset", etc. but when asking a question on SAS-L we need to be able know if we are talking about a SAS dataset or some external file. This way we can immediately tell "where" we need to be looking to locate and solve the problem.

Maybe one of the clues above may help, or feel free to give us some more details and possibly some stripped down sample code.

I'm guessing the problem is with your input code for the csv file with a wrong length being requested and the actual file a different length due to delimiters or something.

Hope this is helpful.

Mark Terjeson Investment Business Intelligence Investment Management & Research Russell Investments 206-505-2367

Russell Global Leaders in Multi-Manager Investing

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of oslo Sent: Wednesday, April 20, 2011 7:23 AM To: SAS-L@LISTSERV.UGA.EDU Subject: date format problem

Dear SAS user;

I tried to merge to different data set and import it into csv file. The date spesification in my data set is as 3/18/1999, 2/6/1999, 11/19/1999, 11/4/1999 and so and.

When SAS merges data set it gives the datse column correctly for for example 2/6/1999. However it cuts the last one or last to digits of year in dates for 3/18/199 and 11/19/19 respectively. What is the why to makes read date correctly as what they are

Regards

Hokut


Back to: Top of message | Previous page | Main SAS-L page