Error while calling an AS/400 stored procedure

160 pts.
AS/400 errors
AS/400 SQL
AS/400 stored procedures
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

Answer Wiki

Thanks. We'll let you know when a new response is added.

You didn’t say what environment you issued the call from.
1 in PARM(1) is not being assumed to be integer?

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 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.


Discuss This Question: 1  Reply

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Jacky
    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 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: