Cold Fusion calling an iSeries (AS/400) program

We are trying to call an iSeries program, passing parms, from a Cold Fusion web page.  Can you please help out in trying to get this to work.  We tried this (<CFQUERY NAME="test1" DATASOURCE="AS400"username="OPERATOR"
password="DSEWAL">CALL QSYS.QCMDEXC('CALL QSYS/SNDMSG MSG(TEST1) TOUSR(CATE)',0000000039.00000)</CFQUERY>), but was not succcessful.  Any help would be appreciated.

magnatronAsked:
Who is Participating?
 
tliottaCommented:
You have:

   CALL PGM (HHHLIB/WEBTEST PRAM('010025 ')

Should probably be:

   CALL PGM(HHHLIB/WEBTEST) PARM(''010025 '')

Removed space after "PGM". Added ")" after "WEBTEST". Changed "PRAM" to "PARM". Changed both single-quotes to be two single-quotes.

You also have the length as [0000000069.00000]. Should be [0000000040.00000].

I assume that '010025 ' is intended to be a character variable at least six characters long. The trailing blank is okay even if not needed by the WEBTEST program. However, if that PARM() is intended to be a numeric integer or packed-decimal value, then the PARM() will need to be specified differently.

Tom
0
 
tliottaCommented:
Try it this way:

   CALL QSYS.QCMDEXC('QSYS/SNDMSG MSG(TEST1) TOUSR(CATE)',0000000034.00000)

SNDMSG is a command that would be executed by QCMDEXC. The way that have it, QCMDEXC would be trying to CALL a program named SNDMSG in the QSYS library.

Tom
0
 
magnatronAuthor Commented:
Now our issue is to call an iSeries program with parms:

<CFQUERY name="CallProg" datasource="AS400" username="OPERATOR"
password="DSEWAL">
CALL QSYS.QCMDEXC('CALL PGM (HHHLIB/WEBTEST PRAM('010025 ')', 0000000069.00000) </CFQUERY>

0
 
magnatronAuthor Commented:
Still waiting for customer to test code, but response was quick and looks accurate.  It is much apprecited.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.