Sorry but I don't understand what you are attempting to do from your description
Can you post, sample data of what you have, what you want and any code you have already tried.
If your have data is in a SAS dataset you can use this macro to convert it into code to paste here
Data2DataStep Maco instructions
If not then generate the code yourself with infile/input/card statements
Thanks