Opendatasource can only be used for querying another server.
you can try to use dynamic sql, but there are always challenges doing so.
http://www.sommarskog.se/dynamic_sql.html
But using a stored procedure to create another stored procedure is unusual at best.