× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



First off...you'd be much, much, much, much, better off using Scott's FTPAPI :)

Secondly, everytime I've ever seen FTP scripted, there was a OVRDBF
FILE(OUTPUT) to go along with the OVRDBF FILE(INPUT). I would guess
that since you're not overriding the output to a file, FTP is waiting
so you can see the results.

Charles

On Wed, Sep 29, 2010 at 3:33 PM, Brian Piotrowski
<bpiotrowski@xxxxxxxxxxxxxxx> wrote:
Hi All,

I'm having a bit of a challenge with one of my programs and how it behaves when it is run.  The program I wrote will use an input file to go to an FTP site, get a file and quit.  However, when I execute the program it starts the FTP session in a semi-interactive session.  It's semi in the sense that the script will run, but at the end of the script where I have a QUIT command, it will pause and wait for the user to press enter to end the terminal session.

What I expect to happen is that the program will automatically exit when it encounters the QUIT.  When I try the commands manually (ie: from a CL do an FTP RMTSYS and enter each command one by one), it works fine when I type QUIT it exits the terminal session without asking for me to press enter.  However, running it in the program will prompt the user before exiting and continuing on with the program.

Here is a snippet of the code causing me grief:

           OVRDBF     FILE(INPUT) TOFILE(DEVSRC/QCLLESRC) MBR(FTPEXPDTA)

GET:        FTP        RMTSYS('xx.xx.xx.xx')
           MONMSG     MSGID(CPF0000) EXEC(DO)
              SNDUSRMSG  MSG('"SPEXP" Was not done normally as "FTP"
                           MSGTYPE(*INFO) TOMSGQ(QSYSOPR)
              GOTO       CMDLBL(END)
           ENDDO

And here is the contents of FTPEXPDTA:
(username) (password)
CDUP
SENDPA
QUOTE SITE LRECL=500 RECFM=FB
LCD Mylocaldir
CD remotelib
GET EXPEDITE (REPLACE
QUIT

Anyone have any idea why this is occurring?  It's probably something small on which I'm gapping, but I can't figure it out.

Thanks!

/b;

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Brian Piotrowski
Assistant Mgr. - I.T.
Simcoe Parts Service, Inc.
Ph: 705-435-7814 x343
Fx: 705-435-5029
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
http://www.simcoeparts.com

Please consider the environment. Don't print this e-mail unless you really need to.

The information contained in this communication is confidential and intended only for the use of those to whom it is addressed.  If you have received this communication in error, please notify me by telephone (collect if  necessary) and delete or destroy any copies of it.  Thank you!

--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.