When upgrading to V5R1 or V5R2 have a look to the notes 392165 + 444524 !!!
As we detected a lot of problems after OS/400 Upgrades to the releases V5Rx, we really would please ask you, to read these notes very carefully and apply all the steps described in there. Otherwise, you can e.g. expect severe problems with LCKW after starting your SAP system. Especially DO the STROBJCVN, that is described in note 444524, even when somebody tells you, you could "workaround" this somehow. Mostly this created a lot of problems in the past!!!