Products Resources Support About Us

Rocket Software

Enhancement for curl: --outfile to mvs-dataset

Actually there is a problem (of IBM) writting without --outfile directly to STDOUT.

IBM has send me a Workaround which works fine. In this Workaround STDOUT is piped to a “cp -B”-command, which is able to write to a mvs-dataset.
set -o pipefail
curl --insecure --proxy1.0
SV&license_key=Gx0aXLbbWDtWDeTq&suffix=zip” |
cp -B /dev/fd0 “//‘LRZSPFO.ZIP.OMVSOUT’”

And now my question:
May I ask you to think about an enhancement of curl:
It should be possible to reference/code under Option --outfile a mvs-dataset similar to the cp-command: “//‘LRZSPFO.ZIP.OMVSOUT’”

What do you think about this Suggestion?

Regards, Helmut Pfoser

This enhancement exists already.
The command does accept mvs dataset and writes to it, I tested following command and returned data was saved in mvs dataset named USERID.QAPI !

curl -m 15 -v -k --trace qapi.trace -o “//‘USERID.QAPI’” --url “${url}” -K-

BUT lrecl is defaulted to 80 and recfm to fixed instead of detecting newline to determine the exact lrecl with recfm variable to use.

I’ve tested your described Option already before I’ve created this Topic and I’ve done it again after your last entry.

I was able to specify the -o parameter but the command didn’t run successful.
Therefore I’Ve assumed that MVS-Datasets behind this Parameter are not supported.

LRZSPFO § MVSH18.RBGOOE.AT:/ugrz/lrzspfo #>curl --insecure --proxy1.0 -o “//‘’”
Ý1¨ 67240734
Ý2¨ 131876
Ý2¨ + Done curl --insecure --proxy1.0 -o “//‘’”
LRZSPFO § MVSH18.RBGOOE.AT:/ugrz/lrzspfo #> % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0Warning: Failed to create the file //‘
out4’: EDC5113I Bad file
Warning: descriptor.
100 20 100 20 0 0 71 0 --:–:-- --:–:-- --:–:-- 76
curl: (23) Failed writing body (0 Ü= 20)

Ý1¨ + Done(23) curl --insecure --proxy1.0 -o “//‘’”
LRZSPFO § MVSH18.RBGOOE.AT:/ugrz/lrzspfo #>

I’ve tried the command from Batch (EXEC PGM=BPXBATSL) too, please see used jcl and joblog Output as attachments.

May I ask you to help with this issue?
Aim should be writing the downloaded ZIP-File directly to a mvs dataset.

Regards, Helmutbpxbcurl.pdf (252.0 KB)bpxbcurl.joblog.pdf (254.3 KB)

Hi Helmut,

Which version of curl do you use (run “curl --version” command).

Hello Tatjana,

LRZSPFO § SYE2:/ugrz/lrzspfo #>curl --version
curl 7.52.1 (i370-ibm-openedition) libcurl/7.52.1 OpenSSL/1.0.2l zlib/1.2.11 libssh2/1.8.0 nghttp2/1.18.1
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy Metalink
LRZSPFO § SYE2:/ugrz/lrzspfo #>

Hello Helmut,

Writing to MVS data sets via -o is not supported in the version of curl you use. This feature is available in the curl that is a part of the IzODA project ( We’re going to add this feature to a future version of curl that will be shipped via Rocket’s site. The updated version will most probably be available in 3-4 months.


Thank you for your answer and your implementation commitment.

May I ask you to inform me about availibility?

Regards, Helmut