When you say something like this, you need to be prepared to pay the going rate (typically 500 to 1000 US dollars per day) to professionals for their work product -- which is what you are asking for. Someone may voluntarily provide you code, but if you ask for it then you need to expect to pay for it.

If you insist on doing it in such a weird way, you'll find everything you need in Chapter 5 of the DFSORT Application Programming Guide. I don't think you need more than that, and your researches, but bear in mind that for what you have shown it, an EXIT, is the wrong way to go.