If the program was created with visiblity, you might be able to get it back with
Code:
DMPOBJ OBJ(mylib/mypgm) OBJTYPE(*PGM)
You can then copy this to a PF, then use SQL to re-format & re-create. This is messy and will require quite a lot of work but might work for you. DMPOBJ is very finicky and sometimes does give all info e.g. with *QRYDFN objects.

Good luck!