[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using Expect Script for SFTP



Dan,

This mailing list is for HTTPAPI and FTPAPI, please. This question is not about either.

Instead, please consider using one of these fine sites to ask your question:

http://www.code400.com (web-based forums)
http://www.midrange.com (e-mail based discussion lists)

Or IBM's IBM i Cafe on DeveloperWorks
https://www.ibm.com/developerworks/community/forums/html/forum?id=11111111-0000-0000-0000-000000002675

Thanks!


On 12/22/2015 1:13 PM, Dan Dan wrote:
    Trying to work with Benefit Focus to send & receive information via
    SFTP. The people there now are clueless and the most they can say is
    things are setup correctly on their side and are you able to get on our
    website at sbsftp.benefitfocus.com
    Which we can do that but do not want this to be a manual process from
    someones pc.
    Additional research has show that their site wants the User Id and
    Password so reading Scott's information I installed Expect. I followed
    the following commands.
    [1]http://www.scottklement.com/expect/
    Downloaded the following two files into /tmp
[2]expect.5.43.tar.Z       13-Aug-2008 00:00  2.5M
[3]tcl.8.4.9.tar.Z         13-Aug-2008 00:00  3.1M

Then did the following:

CALL QP2TERM
$ cd /tmp
$ uncompress tcl.8.4.9.tar.Z
$ uncompress expect.5.43.tar.Z
$ cd /
$ tar xf /tmp/tcl.8.4.9.tar
$ tar xf /tmp/expect.5.43.tar
$ ln -s /qopensys/usr/bin/stty /usr/local/bin/stty
Press F3 to exit PASE.

I'm using the example CLP and when I run
QSH        CMD(&CMD)
&CMD =
           ....5...10...15...20...25...30...35...40...45...50...55...60
      1   'PATH=$PATH:/QOpenSys/usr/bin:/QOpenSys/usr/local/bin && expe'
     61   'ct -f myscript.exp                                          '
I get the following from /tmp/expect.log
qsh: 001-0019 Error found searching for command expect. No such path or director
y.

** Note we are on V7r2 **

Any suggestions would be very helpful.

Thanks
Dan

References

    1. http://www.scottklement.com/expect/
    2. http://www.scottklement.com/expect/expect.5.43.tar.Z
    3. http://www.scottklement.com/expect/tcl.8.4.9.tar.Z



-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------