One idea would be to check the source panels and exec's within ISPF and see how they do it. Even if it's an IBM program, if you can provide the input and then get the already written program to do the work, who's the wiser. I've done this myself in using IBM functions to perform a selected task (in this case compare two datasets) with just setting up the panel/program and providing the input. If you're even mediocre at reading panels, like me, it's not too hard.
Good luck.
PhiloVance
Other hobbies, interests: Travel, Model RR (HO Gauge), Genealogy.