I have a binary dataset on Linux already in a z/os codepage and I need to FTP this to a FTP server. I cannot use FTP on Linux as the file is not in the Linux locale.
Normally I would use todsn -b to send this to z/OS and then FTP it from there. I want to use cozclient on Linux to do this but I need the correct syntax to do this.
Something like cat linux.file | cozclient ftp......
cozclient on Linux invoke FTP on z/os
Re: cozclient on Linux invoke FTP on z/os
If I understand it, you need to run the FTP client on z/OS, using a file that is on Linux.
Piping your data into the z/OS FTP client won't work - it won't accept a file that way.
One way would be to run a two-step jop on z/OS. The first would transfer the file from Linux to z/OS, maybe to a temporary data set. You could use Co:Z Launcher for this, targeting the Linux box. In the second step you could run z/OS FTP.
Piping your data into the z/OS FTP client won't work - it won't accept a file that way.
One way would be to run a two-step jop on z/OS. The first would transfer the file from Linux to z/OS, maybe to a temporary data set. You could use Co:Z Launcher for this, targeting the Linux box. In the second step you could run z/OS FTP.
Re: cozclient on Linux invoke FTP on z/os
Is there a way to use iconv on Linux to change from source codepage 420 to the Linux codepage and then pipe it to ftp on linux?
Something Like:
icon -s IBM-420 linuxfile.txt > ftp ......
Something Like:
icon -s IBM-420 linuxfile.txt > ftp ......
Re: cozclient on Linux invoke FTP on z/os
The ftp command doesn't accept a file as input, but you might be able to use the cURL command which supports the FTP protocol. cURL is available on both linux and z/OS (under IBM Ported Tools)
I'm not really clear as to where you are starting from and where you want to run FTP.
If you started with a Co:Z Launcher script running on Linux, and wanted to call back into the z/OS version of cURL, it would be something like:
On the other hand, if you started with a Co:Z Launcher script to a remote Linux system and wanted to run cURL (FTP) from the Linux box using a z/OS dataset as input:
If you are going to try this, please test first using the cURL command interactively, using local file input and make sure that you have that working first before you test with Co:Z Launcher.
I'm not really clear as to where you are starting from and where you want to run FTP.
If you started with a Co:Z Launcher script running on Linux, and wanted to call back into the z/OS version of cURL, it would be something like:
Code: Select all
cat somefile.bin |
cozclient -ib /usr/lpp/ported/bin/curl --ftp-pasv -T- ftp://rhost.com/somedir/somefile.bin
Code: Select all
fromdsn -b //DD:MYDD |
curl --ftp-pasv -T- ftp://rhost.com/somedir/somefile.bin