× 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.



Hi Brian,

It's not pausing because there's a QUIT.

It's pausing so that the user has a chance to read the messages on the screen. Otherwise, they may flash on the screen and disappear without the user having time to read them.

As everyone else has already responded, you can solve the problem by redirecting the output to a file, (or by using another tool for FTP, such as FTPAPI...)


On 9/29/2010 2:33 PM, Brian Piotrowski 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!

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.