Let me preface this question by saying I've never tried calling an AS400/DB2 program from Coldfusion. So please assume I know nothing and respond with as much 'hand holding' info as you see fit.
I've been tasked with inserting a record in a DB2 table on our AS400. Doing a basic insert is not a big deal. The problem is the insert requires a recID which is generated by calling a program. The program, when called, should return the recID thus providing the one piece needed prior to inserting a record. I'm stuck on calling the program and retrieving the recID.
The code I'm trying is:
When executing the above I am met with the following error:
Error Executing Database Query.
[SQL0204] myPRG in myLIB type *N not found.
If I execute the same CFSTOREDPROC omitting the CFPROCPARAM the AS400 gives the following error:
Cause . . . . . : RPG procedure myPRG in program myLIB/myPRG at
statement 98 had an error due to a pointer not being correctly set. The
cause of the error is most likely one of the following:
-- A basing pointer was not set.
-- A procedure pointer was not set.
-- The pointer was set, but the object it referenced has been destroyed.
-- A parameter was not passed to the program containing the procedure.
-- A parameter was not passed to the procedure by its caller within the
I just need the AS400 program to return the recID value to CF so I can perform the appropriate insert.
Resources I've referenced but am not completely understanding: