I know I've run into this the past, but I can't remember the fix. I am using V5R4 and trying to use CALLSUBR in my CLLE. I end my mainline with a RETURN, then I have a SUBR/ENDSUBR... and a 2nd SUBR/ENDSUBR.. then a ENDPGM. When the compiler hits the 2nd SUBR I get a CPD0304 and it rejects any commands following. The QCPFMSG message file shows this for CPD0304
Message . . . . : SUBR command not allowed. Cause . . . . . : A SUBR command was specified inside a subroutine. Recovery . . . : Either remove the SUBR command, or add an ENDSUBR command to close the previous subroutine before the SUBR command, and then try compiling the CL procedure again.
iSeries, V5R4, CLLE
October 27, 2009 4:10 PM
October 28, 2009 9:08 PM