Error while calling an AS/400 stored procedure

160 pts.
Tags:
AS/400 error messages
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
ASKED: March 16, 2009  9:13 AM
UPDATED: March 17, 2009  1:39 PM

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

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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • 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:
    report

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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following