To answer "Is your code correct", you should run the code to see if there are errors, and to see if the output makes sense.
If you still need help, please show us your code, and provide a clear explanation.
To post example code or log from running code: copy the text from your editor or log window, on the forum open text box using the</> icon above the message window and paste the text. The code box is important to preserve format of text as the message window will reformat pasted text.
Better is to run the code and if you have questions then copy the LOG text and share that.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.