SFTP to MVS system


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting SFTP to MVS system
# 1  
Old 07-02-2007
SFTP to MVS system

Hi All,

I have written a script that transfers(FTP) files from Unix system to MVS system.

Below is the code for it.

ftp -inv $HOST<<ftp_test
quote site LRECL=200
quote site BLKSIZE=28000

mput SOURCE DEST
ftp_test


Here I need the help, if the above code can get converted to SFTP with same functionality? If so, what the code shall be?

NOTE: The size of file is more than 100MB.
# 2  
Old 07-03-2007
Quote:
Originally Posted by rinku11
Hi All,

I have written a script that transfers(FTP) files from Unix system to MVS system.

Below is the code for it.

ftp -inv $HOST<<ftp_test
quote site LRECL=200
quote site BLKSIZE=28000

mput SOURCE DEST
ftp_test


Here I need the help, if the above code can get converted to SFTP with same functionality? If so, what the code shall be?

NOTE: The size of file is more than 100MB.
I'm having to deal with that very issue myself. Unless your MVS system has SFTP loaded to it, you won't be able to transfer files that way. If your system does have SFTP, you'll need to generate a public/private key pair on your server, and have the public key loaded to your MVS system. Basically your code will look the same, except you'll have an "S" in front of FTP.
# 3  
Old 07-03-2007
Thanks!

But usually, SFTP also works even if you do not exchange the public keys. The only difference is that, if the keys are shared, it will not prompt for the password. To handle this issue, I am ready to pass the username and password.

But will the same code work in the same case? As sftp does not recognizes the "-i" option. It even does not recognize the QUOTE option.

Please share with me, if you have a script already in place?


Thanking you again....
# 4  
Old 07-05-2007
Quote:
Originally Posted by rinku11
Thanks!

But usually, SFTP also works even if you do not exchange the public keys. The only difference is that, if the keys are shared, it will not prompt for the password. To handle this issue, I am ready to pass the username and password.

But will the same code work in the same case? As sftp does not recognizes the "-i" option. It even does not recognize the QUOTE option.

Please share with me, if you have a script already in place?


Thanking you again....


Ah yes, I forgot about that part. I've brought that issue up to management also, and they are looking into it. For now, I've been given an exception to the SFTP debacle on the mainframe. And you're right, the -i option, -n, and a few others are also unavailable in SFTP. Makes me wonder why they'd secure FTP and remove functionality?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Typeset -i in MVS (Mainframe system)

Hi, I have one job that runs daily and creates daily files. At the end I compare the today's file with previous day's file. And if today's file size is greater or equal to previous day's file, then it is ok, else I need to through error. I have following piece of code: typeset -i... (2 Replies)
Discussion started by: ppatra
2 Replies

2. UNIX for Advanced & Expert Users

MVS compression that unix can uncompress

Dear all, I have been given the opportunity at the last minute to help on a project. There is a need to move some very large files from an MVS machine to an AIX one. The servers are remote with (I think) a 2Meg network pipe between them. The people on the project have been moving small... (1 Reply)
Discussion started by: rbatte1
1 Replies

3. Shell Programming and Scripting

Sending File from Unix to MVS

Hi, I am trying to send a txt file via FTP to the Mainframe or MVS. the file gets sent to the MVS but the user name gets appended to the file name. For eg if i am sending test.txt, in the mainframe it lands as username.test.txt. I tried putting the filename inside single quotes but I get an... (3 Replies)
Discussion started by: naveensraj
3 Replies

4. Shell Programming and Scripting

Open and System command in SFTP

Hi Unix team, Is there any alternative option and command which one can use in ftp for sftp usage. open, system command --> alternative for sftp usage -n option --> alternative for sftp usage sftp supports only binary transmission. how one can achieve ascii mode file... (8 Replies)
Discussion started by: mayleeshwaran
8 Replies

5. AIX

MVS DB2 Connection from AIX

Hi, I want to try to connect to a DB2 (MVS) database from an AIX, through my c++ custom program. Is anybody who knows how can I do this? Which libraries should I use? Should I have a DB2 connect installed on my AIX? Thank you in advance. (3 Replies)
Discussion started by: develo
3 Replies

6. Emergency UNIX and Linux Support

SFTP issue when connecting from MVS to AIX

Dear all, I was given the ID_DSA.pub by an MVS user, which I placed in the appropriate user's authorized_keys file. When the user tris to SFTP from their side to the AIX box, the following error is got: error: debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY ... (6 Replies)
Discussion started by: ggayathri
6 Replies

7. UNIX for Advanced & Expert Users

Link from mount point to sftp account of file system

Hi, Is it possible to do hard link between the mount point of file some structure to the sftp account of some other server ? If possible then what could be the behavior of link properties? Is it could be the same as we found in our environment (unix/linux). Even if we do such link , then it... (1 Reply)
Discussion started by: posix
1 Replies

8. Linux

SFTP an internet address from a system behind an internet proxy

I was wondering if it is possible to setup SFTP to go through the internet proxy while connecting to an internet location. Problem: Client system is behind internet proxy. SFTP to any internet location fails as there is no documented way to configure SFTP to connect to internet locations through... (4 Replies)
Discussion started by: toobrown1
4 Replies

9. UNIX for Advanced & Expert Users

MVS->Unix FTP : Using chmod as part of FTP.

We are transferring file from mainframes to unix, & in FTP process itself we would like to set access rights for unix machine. Has anyone used chmod command in association with site command in ftp? How it should be used? Thanks in advance. (1 Reply)
Discussion started by: videsh77
1 Replies

10. Solaris

ftp flat file from MVS(OS390) to Solaris

I've been working on this for a while and decided to see if anyone else here had this same issue. I'm trying to ftp a file from a mainframe (OS390) to Solaris. Obviously this is easily done, however the file is somehow being stripped of data in comparison to the way we transfer the file via a... (5 Replies)
Discussion started by: douknownam
5 Replies
Login or Register to Ask a Question