Much like the CISC to RISC upgrade there were programs which could not 
work on higher levels of machine.  Basically if the programs were compiled 
prior to a certain release with a certain fix and observability was 
removed then they would not work on 6.1 and above.
We had a vendor, Unbeaten Path, which sent us software which would not 
work on our version.  And it wasn't like this was a new thing.  We were on 
some flavor of 7 at the time.  They had to fix it and reship it.
http://www-01.ibm.com/support/docview.wss?uid=nas8N1014133
Now, there are also a number of other reasons things may no longer work. 
One would have to read the Memo To Users for each and every release 
between V5R4 and your target release.  It may be as simple as you're using 
a custom command called RUNSQL and IBM introduces their own command with 
the same name (they did).  Or you're using commands no longer supported, 
like when people imbedded OV/400 commands and they died after V4R5.
Some things may only bite you at compile time.  Like when IBM added RID as 
a reserved word in SQL and a BPCS program had imbedded SQL in it referring 
to the rid column in the FRT file.
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.