From: greg6363 on 20 May 2010 15:16 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 20 May 2010 15:44 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 20 May 2010 16:28 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
|
Pages: 1 Prev: Read formats into Dataset Next: WITH (NOLOCK) in Proc SQL |