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
pointed me to this:https://www.scottklement.com/presentations/Setting%20up%20and%20Scripting%20the%20OpenSSH,%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
sending to. Haven't been able to test /anything/ in the actual SFTParea.)
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
Please contact support@xxxxxxxxxxxx for any subscription related
Help support midrange.com by shopping at amazon.com with our affiliate