z/OS Tools & Language

Expand all | Collapse all

Curl output to mvs dataset

  • 1.  Curl output to mvs dataset

    Posted 02-03-2020 15:12

    I would like curl write output to mvs dataset.

    Following writes to dataset USERID.QAPI but changes recordlength to 80 when dataset exists or creates with lrecl 80 if dataset did not exist before :
    curl -m 15 -v -k --trace qapi.trace -o “//‘USERID.QAPI’” --url “${url}” -K-

    Following writes to qapi.txt with newline after pos 181 as it should be:
    curl -m 15 -v -k --trace qapi.trace -o qapi.txt --url “${url}” -K-

    Is there a qay to have curl use the lrecl from existing dataset or define lrecl in the command?


  • 2.  RE: Curl output to mvs dataset

    Posted 02-13-2020 11:09

    Hi Frans,

    We didn’t implement any additional functions to make curl working with datasets. So there is no way to specify lrecl in the current build. I created an internal ticket to see what we can do here. We will review it later, because we are working on requests from customers on maintenance.

    Thank you for understanding.

  • 3.  RE: Curl output to mvs dataset

    Posted 02-17-2020 04:30

    Hi Tatyana,
    I was able to apply workaround with piping to cp command. If I pre-allocate and perform transfer binary it works for me so no need to rush. Binary transfer is ok for me as i use curl to download mvs dataset thru apache http server active in other sysplex so ebcdic to ebcdic.