You might consider whether the 'scp' tool will work for you, as this would make it much simpler.  With 'scp' you don't need to create a script, you just have to specify the from/to host and filenames to the command.   The disadvantage is that it can't do things like rename or delete -- if you need to do those, you'll need to use sftp instead.

As for your question...   If you're talking about the end-of-line characters for a file that's sent to a Unix system, you would use x'25'  (without the x'0d' -- that's the only difference vs. Windows text files.)


On 10/24/2018 3:30 PM, Jeff Crosby wrote:

A couple of months ago I asked about using SFTP from the IBM i. Brad Stone
pointed me to this:,%20SFTP%20and%20SCP%20Utilities%20on%20IBM%20i.pdf

which has been very helpful.

I'm using Scott Klement's "RPG and the IFS" stuff (he seems to have tools
for everything, doesn't he?) to build the script in the IFS, because the
transmitted file name is going to change every week. I did this a couple
of times before (10+ years ago) where the file was going to be sent to a
Windows server. For that, I appended x'0d25' to the end of the data for
every write() operation.

New question: This time, the file is going to be sent to a Unix system.
Do I need to append something else to the data instead?


(PS: In 2 months time, the vendor I am going to be transmitting to has
still not given me pertinent information like, uh, the site I'm going to be
sending to. Haven't been able to test /anything/ in the actual SFTP area.)

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

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