160 pts.
 Error while calling an AS/400 stored procedure
I created a stored procedure as below CREATE PROCEDURE devbidta.POC_ENROL9(IN compid INT) DYNAMIC RESULT SETS 1 LANGUAGE SQL NOT DETERMINISTIC MODIFIES SQL DATA BEGIN DECLARE c1 CURSOR WITH RETURN TO CLIENT FOR SELECT LEAD_NUMBER,MAX(ENROLLMENT_FLAG) AS ENROLLMENT_FLAG, MIN(COLLECTOR_TRAIL_SEQ) AS CODE_POSITION FROM UATBIDTA.F_LEAD WHERE RECORD_TYPE = ' ' AND COLLECTOR_TRAIL = ' ' AND COLLECTOR_COMPONENT_ID = compid GROUP BY COLLECTOR_COMPONENT_ID ,LEAD_NUMBER; OPEN c1 ; END I used the commmand below to call the procedure: CALL PGM(DEVBIDTA/POC_ENROL7) PARM(1) I got the error below: Message . . . . : Application error. MCH3601 unmonitored by POC_ENROL7 at statement 0000000009, instruction X'0000'. Cause . . . . . : The application ended abnormally because an exception occurred and was not handled. The name of the program to which the unhandled exception is sent is POC_ENROL7 POC_ENROL7 main. The program was stopped at the high-level language statement number(s) 0000000009 at the time the message was sent. If more than one statement number is shown, the program is an optimized ILE program. Optimization does not allow a single statement number to be determined. If *N is shown as a value, it means the real value was not available. Recovery . . . : See the low level messages previously listed to locate the cause of the exception. Correct any errors, and then try the request again. Kindly help me to figure out what could be the error

Software/Hardware used:
ASKED: March 16, 2009  9:13 AM
UPDATED: March 17, 2009  1:39 PM

Answer Wiki:
You didn't say what environment you issued the call from. Perhaps the CALL PGM(DEVBIDTA/POC_ENROL7) PARM(1) 1 in PARM(1) is not being assumed to be integer? Phil Probably just a typo but your CL is not calling the same name as your stored procedure. You built your procedure as devbidta.POC_ENROL9, but in your CLP you are calling devbidta.POC_ENROL7. Frank ////////////////////////////// Jacky Frank is right - you gave us the code from POC_ENROL9 with the call and error in POC_ENROL7 We cannot help you unless you show us the code that is failing. Phil
Last Wiki Answer Submitted:  March 17, 2009  1:39 pm  by  FCARPENTER   200 pts.
All Answer Wiki Contributors:  FCARPENTER   200 pts. , philpl1jb   44,180 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Hi Frank,
By mistake i typed 7 instead of 9

I am trying to call the procedure from the emulator i.e. where i see options to work with files,libraries.
let me know if u find anything else wrong

 160 pts.