From: greg6363 on
I am creating a new variable in a sas dataset and I want to populate
that field with the highest value from 9 other variables within the
same record. What would be the best way to approach this problem? An
array, a macro? Any suggestions/code examples would be greatly
appreciated. Thanks.
From: data _null_; on
On May 20, 2:16 pm, greg6363 <gregtlaugh...(a)gmail.com> wrote:
> I am creating a new variable in a sas dataset and I want to populate
> that field with the highest value from 9 other variables within the
> same record.  What would be the best way to approach this problem?  An
> array, a macro?  Any suggestions/code examples would be greatly
> appreciated.  Thanks.

I would use MAX function.
From: Reeza on
On May 20, 12:16 pm, greg6363 <gregtlaugh...(a)gmail.com> wrote:
> I am creating a new variable in a sas dataset and I want to populate
> that field with the highest value from 9 other variables within the
> same record.  What would be the best way to approach this problem?  An
> array, a macro?  Any suggestions/code examples would be greatly
> appreciated.  Thanks.

PROC SQL max operates on a column of data, Data Step max operates on a
row of data.

HTH,
Reeza