0 votes
by (120 points)
edited

Hi,

We are using Rebex SFTP in SSIS 2005 to transfer the files. I could find the site method to mention the SITE commands RECFM=VB LRECL=3004 in Rebex FTP .But i could not find such method for Rebex SFTP.I tried to SFTP the file without mentioning the site commands but my client received the file as unformatted. And they asked us to mention the RECFM=VB LRECL=3004 site commands.

Can u pls tell me how to achieve it in REBEX SFTP.

Thanks,

Applies to: Rebex SFTP

2 Answers

0 votes
by (58.9k points)
edited

Hello,

actually there is no SITE command present in the SFTP protocol.

Did you not mean Rebex FTP over SSL? Please check on this article about difference between Rebex SFTP and Rebex FTP/SSL protocols. These two protocols sometimes get confused.

However, if you really need SFTP protocol, it is possible to execute remote commands with Rebex SFTP as described in this article.

by (120 points)
edited

Hi,

Thanks for ur reply.

Yep we are using SFTP protocol to transfer the file. I have used the following code, but no luck.Still the files are received as unformatted on mainframe side

Dim channel As Rebex.Net.SshChannel = sftpx.Session.OpenSession()
channel.RequestExec("ls /+lrecl=3004,recfm =VB")
sftpx.PutFile(SourceFilePAth, RemotePath)
channel.Close()

Thanks

by (58.9k points)
edited

Please see my answer below.

0 votes
by (58.9k points)
edited

Hello,

if you were told to issue SITE command, it definitely means you have to switch to FTP protocol. There is no SITE command in the SFTP protocol and executing the remote command via SSH channel will not simulate the FTP SITE command. Sorry! So please download Rebex FTP/SSL trial and give it a try.

...