I'd like to create a local or global macro with the IDs (string variable: record_id) of all observations in my dataset that meet my chosen criteria (criteria: if female==1&age<60). The end result would be a macro with a long list of record_id's. Thanks in advance for the assistance. JA