If you are really trying to fill in screen fields, assuming
you are using Iseries Access for Windows Workstation program as an
emulator, you would need to write an API program using DDE or
EHLLAPI. ColdFusion could cfexecute this program if the Workstation
emulator interface was on the Coldfusion server itself.
see
http://publib.boulder.ibm.com/infocenter/pcomhelp/index.jsp?topic=/com.ibm.pcomm.doc/emulator_progra...
If you are actually just trying to execute an AS/400 program
it was covered in this thread:
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=7&threadid=793131&arctab=arc
Here's an example of how to run an AS/400 program from
within a CF web page:
<CFQUERY name="CallProg" datasource="#dataSource#"
username="#userName#" password="#userPassword#">
CALL QSYS.QCMDEXC('CALL YOURLIB/YOURPROG', 0000000021.00000)
</CFQUERY>
Be sure to count the exact number of characters in the
actual command and place that number in the second parameter.
So you might test that with something like the following:
<CFQUERY NAME="test1" DATASOURCE="#dataSource#">
CALL QSYS.QCMDEXC('CALL QSYS/SNDMSG MSG(TEST1)
TOUSR(yourid)', 0000000041.00000)
</cfquery>
This is better than the method I had used before of using
cfexecute to invoke ftp with a script file containing a line like:
quote rcmd SNDMSG MSG(TEST2) TOUSR(yourid)
For creating a batch you may find it useful to learn how to
create an inline data file that is submitted with SBMDBJOB.