I have an adapter that is running on AS400 Machine. The functionality of this adapter is to get the message from one queue, checks the messageID of the message present in the message header.
There is a configuration(ini) file that helps out to match this MessageID. If the MessageID is "AB" the it puts to queue "AB1" else if MessageID is "CD" the it puts to queue "CD1".
When I run this adapter manually using the call program the adapter executes well picks the message correctly and put to correct queue. Below is how I call the adapter manually
call PGM(ABCD/ADAPTERSUB) PARM(('-c') ('/ABC/adapters/AdapterSubscribe/AdapterSub.ini'))
ADAPTERSUB is the executable of the adapter present in the ABCD library and "-C" is the parameter and then followed by the path where the adapter configuration file resides. This is working fine.
I have created a script file called "ADSUB.PGM" and compiled to ABCD library. In the script I have specified the above path, I have created this script so that I need not call the above big statement many times. When ever I need this adapter to run I can call the script file "ADSUB".
I have executed this adapter against the queue and it well executed the adapter picked the message and put to queue.
Since the adapter is working perfectly I created a Trigger to the queue. I created the process defination and in the ApplicationID I have given the Script name "ABCD/ADSUB". I have assigned the Initiation queue and processDefination to the queue where the message will be picked call the queue as "INPUT.Q". I have switched on the trigger for this queue. The process name is "ADSUBENT"
When I put the message to this queue, the trigger goes off and the message remains in the queue and not picked by the adapter.
I saw the Joblog for and found out the the below error :
CPI1125 Information 00 11/17/06 00:27:39 QWTPIIPP QSYS 02DC *EXT *N
Message . . . . : Job 100637/QMQM/QDFTJOBD submitted.
Cause . . . . . : Job 100637/QMQM/QDFTJOBD submitted to job queue QBATCH in
QGPL from job 099541/QMQM/RUNMQTRM. Job 100637/QMQM/QDFTJOBD was started
using the Submit Job (SBMJOB) command with the following job attributes:
JOBPTY(5) OUTPTY(5) PRTTXT() RTGDTA(QCMDB) SYSLIBL(RBTSYSLIB QSYS
QSYS2 QHLPSYS QUSRSYS QMQMJAVA) CURLIB(*CRTDFT) INLLIBL(QTEMP
QMQM QGPL) LOG(4 00 *NOLIST) LOGCLPGM(*NO) INQMSGRPY(*RQD)
OUTQ(/*DEV) PRTDEV(PRT01) HOLD(*NO) DATE(*SYSVAL) SWS(00000000)
MSGQ(QUSRSYS/QMQM) CCSID(65535) SRTSEQ(*N/*HEX) LANGID(ENU) CNTRYID(US)
*NONE Request 11/17/06 00:27:39 QWTSCSBJ *N QCMD QSYS 0173
Message . . . . : -QSYS/CALL PGM(ABCD/ADSUB) PARM('TMC 2INPUT.Q
CPD0172 Diagnostic 30 11/17/06 00:27:39 QCACALL QSYS 02A3 QCMD QSYS 01A1
Message . . . . : Parameters passed on CALL do not match those required.
Cause . . . . . : The parameters passed on the CALL command do not match the
parameters required by program ADSUB in library ABCD. Correct program not
found or correct parameters not passed. The number of parameters or the type
of parameters passed on the CALL command must match those expected by the
program called. Recovery . . . : If correct program not found, change or
specify the library name on the command or in a library list. Change the
CALL command and then try the command again.
CPF0001 Escape 30 11/17/06 00:27:39 QCACALL QSYS 02B5 QCMD QSYS 01A1
Message . . . . : Error found on CALL command.
Cause . . . . . : The system detected errors in the command. Recovery . . .
: See the previously listed messages in the job log. Correct the errors
and then try the command again. *N instead of a command name means that the
name had not been determined before the error was found.
CPC2402 Completion 50 11/17/06 00:27:39 QCMD QSYS 05D4 *EXT *N
Message . . . . : Job ended. Cancel message received at command processor.
Cause . . . . . : A message with a severity equal to or exceeding the end
severity was received at the command processor. Recovery . . . : See the
messages previously listed to determine the message that caused the job to
be ended. Correct the errors, and then try the request again.
CPF1164 Completion 00 11/17/06 00:27:39 QWTMCEOJ QSYS 00BC *EXT *N
Message . . . . : Job 100637/QMQM/QDFTJOBD ended on 11/17/06 at 00:27:39; 1
seconds used; end code 20 .
Cause . . . . . : Job 100637/QMQM/QDFTJOBD completed on 11/17/06 at 00:27:39
after it used 1 seconds processing unit time. The job had ending code 20.
From the error log I find that the parameters passed are incorrect, but when I manually run the script using "Call (ABCD/ADSUB)" it worked fine pulled the message from source queue and put to the target queue with out any error.
But when I use the same in the trigger it give me an error.
Also, please let me know what is meant by "QCACALL"
Please provide me a solution.