Page 1 of 2

FTP to Mainframe (Z/OS)

Posted: Thu Aug 27, 2020 6:33 am
by ivan.ulens@vcst.be
Hi,
is it possible to use the FTP command to transfer files to an IBM Mainframe (Z/OS)?
regards,
Ivan Ulens

Re: FTP to Mainframe (Z/OS)

Posted: Thu Aug 27, 2020 9:43 am
by Oleg
Why not if Z/OS supports FTP protocol?

Re: FTP to Mainframe (Z/OS)

Posted: Thu Aug 27, 2020 10:18 am
by ivan.ulens@vcst.be
I receive following message:
E: 2020-08-27 11:13:50: 550 Mismatched quotes on pathname 'CG061.SMD935'/14022020.xml

Re: FTP to Mainframe (Z/OS)

Posted: Thu Aug 27, 2020 10:21 am
by ivan.ulens@vcst.be
see attachement

Re: FTP to Mainframe (Z/OS)

Posted: Thu Aug 27, 2020 10:33 am
by Oleg
I think that you have to use remote folder name without quotes
only CG061.SMD935 (not 'CG061.SMD935')

I think that 'CG061.SMD935'/14022020.xml is invalid name therefore you get an error

Re: FTP to Mainframe (Z/OS)

Posted: Thu Aug 27, 2020 10:47 am
by ivan.ulens@vcst.be
on Z/OS there are some rules: a dataset name without quotes will change with the name of the user in prefix.
example:
* FTP connect with USER FTP001. The dataset (file) SMD935 will change to FTP001.SMD935
* FTP connect with USER FTP001. The dataset (file) 'CG061.SMD935' will not change

Re: FTP to Mainframe (Z/OS)

Posted: Thu Aug 27, 2020 10:52 am
by ivan.ulens@vcst.be
If I change the remote folder to CG061.SMD935, I receive
E: 2020-08-27 11:51:33: 501 Invalid data set name "CG061.SMD935/14022020.xml". Use MVS Dsname conventions.

Re: FTP to Mainframe (Z/OS)

Posted: Thu Aug 27, 2020 10:58 am
by Oleg
What database/dataset?
FTP - File Transfer Protocol. Only files and folders
I'm afraid that you have to refer to documentation of Z/OS

Re: FTP to Mainframe (Z/OS)

Posted: Thu Aug 27, 2020 11:11 am
by ivan.ulens@vcst.be
when I use native FTP on my Windows PC I use the following PUT statement and this works fine:
put "C:\Data\Edison\14022020.xml" "'CG061.SMD935'"

Re: FTP to Mainframe (Z/OS)

Posted: Thu Aug 27, 2020 11:33 am
by ivan.ulens@vcst.be
a dataset is a file