We don't know what error is "thrown" (which means "caused by what you have coded").
Do you have documentation for SELCOPY? Look up the message and act upon it, check the syntax, look for examples, ask colleagues, ask your technical support. Having exhausted all that, come back here, with all the information, you may get lucky with suggestions.
If you don't have SELCOPY documentation, obtain it.
If you can't obtain it, point out to the person who gave you the work that it is unlikely to be successful, and that even if someone gives you a solution you won't have a clue about it, so can't use it.