Page 1 of 1

sFTP from Mainframe to server

PostPosted: Mon Dec 08, 2014 10:58 pm
by dphill06
Currently have following and is working great.

99.999.999.99    (EXIT=16
ANONYMOUS
sample@sample.NET
cd prod/arc/import
put 'EPLEGD00.DB2.EP270408(0)'  ach_returns
 quit


What I would like to do is add a sequence number at the end of the file being created on the serve. At the present, if a current file exist, the new file will replace it. I need to maintain all files.

Coded

Re: sFTP from Mainframe to server

PostPosted: Tue Dec 09, 2014 3:17 pm
by Blackthorn
Good idea. Sounds simple enough.

Re: sFTP from Mainframe to server

PostPosted: Tue Dec 09, 2014 7:30 pm
by dphill06
OK, sounds easy enough; then what is your suggestion?

Re: sFTP from Mainframe to server

PostPosted: Tue Dec 09, 2014 7:48 pm
by Blackthorn
Use a language of your choice, e.g.; Rexx, to generate the sysin with the appropriate file name.

Re: sFTP from Mainframe to server

PostPosted: Tue Dec 09, 2014 8:06 pm
by dphill06
Sounds good, but I believe there is a seq number command that can be used to increment and add to the end of the file name if a file already exist in the directory. I am unable to locate this again.

I thought it was something like UNIQ=0 or 1 depending on if you wanted to add sequence number or replace.

Re: sFTP from Mainframe to server

PostPosted: Tue Dec 09, 2014 9:35 pm
by enrico-sorichetti
as per man pages
sunique Toggle storing of files on remote machine under unique file names. The remote FTP server
must support FTP protocol STOU command for successful completion. The remote server will
report unique name. Default value is off.


but You will have to run a few tests

Re: sFTP from Mainframe to server

PostPosted: Tue Dec 09, 2014 9:39 pm
by dphill06
just to get this correct in my mind, Shout the SUNIGUE=1 be after the PUT command or on the same line as the OUT command

Re: sFTP from Mainframe to server

PostPosted: Tue Dec 09, 2014 9:51 pm
by enrico-sorichetti
why not run a few experiments Yourself and tell us ???