Increasing 32K PCode size limit within a function
Posted in 2005
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues, Versions, Editions & End-of-Life
Error Received: Error number -4451. The size of the PCode generated from this function has exceeded the 32K per function limit. Environment 4GL 7.30 IDS 9.30 HP-UX 11.11 We utilize both the compiler and RDS environments. RDS is used exclusively to generate the PCode needed for using the 4GL debugger (Priceless). Background on problem: We have a function that contains about 3000 lines which controls the edits for a fairly sophisticated user data entry screen. We've ripped everything out of the function outside of the core INPUT ARRAY ..... END INPUT, but we're still running way too close to the 32K limit for comfort. Once we exceed that limit, we can no longer create the PCode file required by the debugger :*( Unfortunately, the remaining contents within the INPUT ARRAY ..... END INPUT section don't lend themselves to being relocated to another function. We're hoping that there's a way to increase the 32K PCode limit through some type of configuation setting. Any help would be greatly appreciated. Thanks. Thanks ------------------ David Murray Tel: (518)dash379dash1515 davidmurray(at)pricechopper.com
I'm not sure what the limit is in 4GL 7.32 latest but... simplify the screen...how the hell can you have that many lines of code? The array should be a module level variable. If it is complex then all processing should be done in functions. How many fields on the screen? Push everything into functions. FUNCTION screen5_after_field (lc_current_field) CASE lc_current_field... END FUNCTION FUNCTION screen5_before_field (lc_current_field) CASE lc_current_field... END FUNCTION FUNCTION screen5_input_array() INPUT ARRAY... BEFORE INPUT CALL screen5_before_input() BEFORE FIELD x CALL screen5_before_field("x") RETURNING lc_next_field IF lc_next_field != "EXIT INPUT" THEN EXIT INPUT ELSE NEXT FIELD lc_next_field END IF AFTER FIELD x CALL screen5_after_field("x") RETURNING lc_next_field IF lc_next_field = "EXIT INPUT" THEN EXIT INPUT ELSE NEXT FIELD lc_next_field END IF AFTER INPUT CALL screen5_after_input() RETURNING lc_next_field IF lc_next_field = "EXIT INPUT" THEN EXIT INPUT ELSE NEXT FIELD lc_next_field END IF END INPUT END FUNCTION This way you can build test harnesses with FUNCTION screen5_test() LET module_variables= "whatever" CALL screen5_before_input() IF module variables not set right then error LET module_variables="whatever" CALL screen5_before_field("x") RETURNING lc_next_field IF lc_next_field not set right then error IF module variables not set right then error LET module_variables="whatever" CALL screen5_after_field("x") RETURNING lc_next_field IF lc_next_field not set right then error IF module variables not set right then error CALL screen5_after_input RETURNING lc_next_field IF lc_next_field not set right then error IF module variables not set right then error END FUNCTION