Well, can you CALL that program name from the command line? Also, make
sure your authenticated user for your 1st query has the proper library
list necessary to CALL your program. I personally use the IBM Client
Access toolkit to create connections to the AS400 and execute command
lines, I find that much smoother for my purposes.
Once you install Client Access Jar's (look around for JT400 on google),
your code will look something like this:
<!---// set default attributes //--->
<CFPARAM name="loginname" default="username">
<CFPARAM name="loginpass" default="password">
<CFPARAM name="AS400" default="ip_address">
<!--- create the iSeries/AS400 object --->
<CFOBJECT action="create" type="java" class="com.ibm.as400.access.AS400"
name="iseries">
<CFOBJECT action="create" type="java"
class="com.ibm.as400.access.CommandCall" name="Command">
<!--- Initialize our contructor 'iSeries' --->
<CFSET iseries.init(AS400, Trim(UCase(loginname)), Left(Trim(loginpass),
10))>
<!--- Execute our AS400 username validation --->
<CFSET v = (iSeries.ValidateSignon())>
<!---// Now lets run AS400 commands, using my java object //--->
<CFTRY>
<!---// If the extended parameters are defined,
setup the user for AS400 login //--->
<CFSET CommandtoRun = "CALL PGM(LIBRARY/PROGRAM)
PARM('#orderNum#' '#Sequence#' ' ' ' ' ' '
'#replace(numberFormat(distAmt, "0000000.00"), ".", "")#')">
<!--- Initialize our contructor
'command' --->
<CFSET CmdCall = command.init(iSeries,
CommandtoRun)>
<!--- Execute our AS400 command we
defined above --->
<CFSET CmdRun = (Command.Run())>
<CFCATCH type="any">
Failed Order
#orderNum#<BR><cfflush>
</CFCATCH>
</CFTRY>
<!--- disconnect from the AS400 --->
<CFSET iseries.disconnectService(iseries.command)>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:269135
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4