×
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 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!
As an Amazon Associate we earn from qualifying purchases.