Hi everyone,
Can someone help me on how to do this in a Census roster?
CENSUS has variables NAME, AGE, SEX:
NAME AGE SEX
Occ1. mike 33 male
Occ2. gen 22 female
Occ3. dan 45 male
Occ4. jody 55 female
Occ5....
After entering Household members in CENSUS, I want to save the list of Female household members from oldest to youngest.
Currently I have this code,
preproc
list string eligible;
for numeric line_number in CENSUS000 where AGE > 17 and SEX = female do
eligible.add(NAME);
endfor;
How can I sort the list string eligible Names by Oldest to youngest?
Thank you,
Josh
Eligible Names in a roster with sorting
-
- Posts: 20
- Joined: August 17th, 2022, 11:07 pm
Re: Eligible Names in a roster with sorting
Hi Josh,
If you build a valueset instead of a list, you can sort the VS.
https://www.csprousers.org/help/CSPro/v ... ction.html
Sherrell
If you build a valueset instead of a list, you can sort the VS.
https://www.csprousers.org/help/CSPro/v ... ction.html
Sherrell
-
- Posts: 20
- Joined: August 17th, 2022, 11:07 pm
Re: Eligible Names in a roster with sorting
Thanks Sherrell, it works.