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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
magnatronAuthor Commented:
Still waiting for customer to test code, but response was quick and looks accurate.  It is much apprecited.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Operating Systems

From novice to tech pro — start learning today.