Date: Fri, 9 Apr 2004 09:06:30 -0400
Reply-To: "Couch, Timothy" <Timothy.Couch@BANKOFAMERICA.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Couch, Timothy" <Timothy.Couch@BANKOFAMERICA.COM>
Subject: Question on formatting on mainframe
Content-type: text/plain; charset=iso-8859-1
I had a question earlier in the week about a date problem that the group helped me out with, now I have a question on formatting problem.
Here is an example of what I am doing on the mainframe, I am trying to get all zeros if I have a blank date.
data old; /* just creating a sample data set here *
input date date9.;
cards;
01APR2004
02APR2004
.
04APR2004
05APR2004
;
run;
PROC FORMAT;
VALUE MYDATEF .= '00000000'
OTHER = [YYMMDDN8.];
RUN;
DATA _NULL_;
SET OLD;
FILE MDTEST NOPRINT NOTITLES;
PUT @001 DATE MYDATEF.
;
RUN;
When I do the put statement this is what I am getting in the output file, I need the real date and not what is below:
[YYMMDDN8.]
[YYMMDDN8.]
00000000
[YYMMDDN8.]
[YYMMDDN8.]
I have tried changing the proc format around a little with the following but that did not work either.
other = ?<YYMMDDN8.>?
and
other = <?YYMMDDN8.?>
and
other = ?<YYMMDDN8.?>
Any ideas?
thanks
Tim
Bank of America