Please elaborate on what doesn't work - possibly show how you want your SAS variables to appear at input and then at output (DATA step completion), including in your post one or more DATA steps as you mention "consecutive selection".
You will need to share your SAS log information listing the exact error message and the failing SAS code, after reviewing the output yourself. If you using macro code, you will want to specify the following SAS statement to generate the most diagnostics info possible: