1 Reply Latest reply on Jun 14, 2006 1:57 PM by draves

    invoking as/400 session  from cold fusion

    manju thammaiah Level 1
      i have a as/400 system in which there is program screen i would like to invoke and input some values into, is it possible using cold fusion. ...any ideas....thanks
        • 1. Re: invoking as/400 session  from cold fusion
          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/emula tor_programming.htm

          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&arcta b=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)

          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)

          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.