I get this error message "SYSTEM E899 Function AP.ENTRY ls 3 fldno 25 E" during run time on a Unix system running Version : 4.0000 Revision : 5.3.0 Apr 01, 99 Bootstrap Rev : 4.0Y+
There was an old bug in AP.ENTRY which may not be fixed on your system. It slipped by the kernel during gen on previous versions. Don't know if this is causing your problem but - check that LS 3 is not outside the bounds of LS 2.