×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Another option might even be to consider another mechanism such as lftp or curl perhaps.

Or do an IFS check before even attempting to transfer your file and create a modified script on the fly as necessary so that you don't attempt to transfer a non-existent file.

Regards,
Richard Schoen
Web: http://www.richardschoen.net
Email: richard@xxxxxxxxxxxxxxxxx

----------------------------------------------------------------------

message: 1
date: Fri, 27 Nov 2020 17:31:15 -0500
from: PaulMmn <PaulMmn@xxxxxxxxxxxxx>
subject: Re: SFTP Script halting

Another way to consider the problem--

If there is no data to be written, write a do-nothing record to the IFS file. Of course, your process needs to be able to handle this record.

The advantage of this marker record instead of a blank file is that you know the RPG process did complete normally, and the file wasn't deleted or cleared accidentally.

--Paul E Musselman

.



At 2:35 PM +0000 11/27/20, Greg Wilburn wrote:
I have an SFTP script that is running within a CL program. It puts
several transaction files on a server (these text files are created on
the IFS by an RPG program).

I recently discovered that the script halts if one of the files is not
present (put crd*.txt).

Is there any way around this? I'd like for the script to ignore the
error and keep going - sometimes there are simply no transactions.



This thread ...


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

This mailing list archive is Copyright 1997-2026 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.