If you want to have some code in a dataset and some other code in-stream, you can do that in your JCL as follows...
//SYSIN DD DISP=SHR,DSN=BLAH.BLAH
// DD *
[in-stream data]
//*
...but @Bill Woodger asks a good question, why not assemble the subroutines separately and link them in. Personally, I would find that more "normal."