Joined: 26 Apr 2004 Posts: 4649 Location: Raleigh, NC, USA
First, find out how many EXEC statements there are that use PGM=program-name. Exclude those out. Then, find out how many EXEC statements are left. Those are the procs, and can be coded as either EXEC procname or EXEC PROC=procname.
Then, look for nested procs by repeating this same process for each proc you find.