Question

I want to transfer a test file to mainframe, but the test file has lines exceeding 80 characters, which is default for FTP. Because the created dataset has record length 80, I am getting

451-File transfer failed. File contains records that are longer than the LRECL of the new file.

error. I tried this;

curl --ftp-ssl -k -v -B -T BBBBB -u USERNAME:PASS ftp://HOST_NAME:PORT/'DATASET_NAME(BBBBB)'

To solve this problem, I added -Q "site lrecl=250" but this didn' t help.

Was it helpful?

Solution

Are you creating a dataset or are creating a Member in a PDS ???. The syntax DATASET_NAME(BBBBB) implies you could be creating a member in an existing PDS. The LRECL characteristics are defined in the PDS definition and can not be changed by the send command.

If it is an existing PDS, you will need to create a new dataset / PDS either through the send command or be creating a new dataset on the Mainframe with the correct characteristics and then doing the send.

OTHER TIPS

Pre-allocate, on the Mainframe, a dataset with the characteristics that you want, like the LRECL (record-length) and RECFM (record format, are all the records a "fixed" length, or can they differ?).

If you ftp to that dataset, does that give you a problem?

I don't think that 80 is a "default" value for ftp, it is likely just the LRECL of the dataset you are trying to stuff the data into.

Somewhere amongst the Mainframe Support staff are people who know the standards for your Mainframe's ftp usage. It would be worth locating them, explaining what you have and what you need to do, and ask them the correct way to do it. Better than struggling away now, then have it "bounced" along the way as being "non-standard".

If this is a one-time or seldom repeated task, you could transfer the file to the Unix file system and then use OGET to create the "classic" z/OS file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top