Register Hereor login if you are already a member
The limit will be highly variable based on how many SQL statements must be pre-compiled into HLL source.
I've been having some problems compiling...
What "problems" are you having? With 25,000 source lines, it's beyond any reasonable size and should be restructured. As SQL statements are replaced with RPG statements, the resulting statement count can increase quickly.
If you generate the intermediate output from the pre-compiler into a permanent source file member, how many statements result?
The embedded SQL pre-compiler always uses a form of "COPYBOOKS", though they're not coded as such by the developer. They're better described as "macros".
Every SQL statement is expanded into all of the HLL language statements necessary to complete the SQL function. That includes all data definitions used for everything SQL does. A very large program with some significant number of SQL embedded statements could have a large number of "copybook/macro" statements added by the pre-compiler.
By specifying the TOSRCFILE() parameter on the CRTSQLxxx command, the generated source can be examined. That would at least give more info about what the actual problems are. Error message IDs would also be helpful.