I think this tread covers it pretty well. I have use dummy obs and the break option and then specify GROUP=gender etc. There are newer options too if you have a more current version of SAS, see entire thread.
If you have earlier versions of SAS, the easiest way would be to use the corresponding options available in GTL called LINECOLORGROUP and LINEPATTERNGROUP. They may not be documented, but have been in the code since SAS 9.2. and have been documented since SAS 9.4. Just output the GTL code from the SGPLOT using the TMPLOUT option, and then add these options to the SERIESPLOT statement.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.