|
First, the example really did have it the way that Neal had posted the code.
Toby, did it really read that in as intended on a Sun? I would think that,
other than how tabs would be treated, mixing input forms would work the same
way on all machines.
Just curious,
Art
--------
On Tue, 8 Feb 2011 16:33:59 -0500, Arthur Tabachneck <art297@ROGERS.COM>
wrote:
>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
|