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 (February 2011, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 8 Feb 2011 16:33:59 -0500
Reply-To:   Arthur Tabachneck <art297@ROGERS.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Arthur Tabachneck <art297@ROGERS.COM>
Subject:   Problem reading in example (was No Subject)
Comments:   To: Neal Nair <neal.nair@ACF.HHS.GOV>

Neal,

You have extra spaces in the data. Try to change the initial input to:

data example; informat mydate mmddyy8.; input a $ b $ mydate ; ; datalines; wilma stone 01122001 wilma stone 02122001 wilma stone 01012001 fred stone 03052008 fred stone 03152008 fred stone 03152009 ; run;

HTH, Art --------- On Tue, 8 Feb 2011 16:18:51 -0500, Nair, Neal K (ACF) <neal.nair@ACF.HHS.GOV> wrote:

>The following is taken from a recent SAS Tech Report: Leveraging SAS. > >-- Use an Alias to Create Multiple Columns from the Same Variable with PROC REPORT >http://sems.sas.com/bess5/get?id=-55229.1:- gjvprg7y:e55i7&RZNVY=aanve@nps.uuf.tbi&nccvq=22501 > >The example mentioned in the above is shown below: > >The following code illustrates how to use an alias to create multiple columns from the same variable. >________________________________ > >data example; > > input a $ b $ mydate mmddyy8.; ; > > datalines; > >wilma stone 01122001 > >wilma stone 02122001 > >wilma stone 01012001 > >fred stone 03052008 > >fred stone 03152008 > >fred stone 03152009 > >; > >run; > > > >ods html; > > > >title 'MIN and MAX date per patient'; > > > >proc report nowd data=example; > > column a b mydate=min_mydate mydate=max_mydate; > > define a / group; > > define b / group; > > define min_mydate / min format=mmddyy10. 'min date'; > > define max_mydate / max format=mmddyy10. 'max date'; > >run; > > > >ods html close; > > > >When I executed the above program, I got the year as 1920 for both the MIN and MAX dates. > >Could someone explain why? > >Thanks. > >Neal


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