Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving file gets FTP error and deletes file on mainframe side #1707

Closed
Tracked by #1717
MikeKoester opened this issue Mar 24, 2022 · 5 comments
Closed
Tracked by #1717

Saving file gets FTP error and deletes file on mainframe side #1707

MikeKoester opened this issue Mar 24, 2022 · 5 comments
Labels
bug Something isn't working zFTP

Comments

@MikeKoester
Copy link

I pull a data set member from mainframe and edit it on VSC. Now when I try to save it I get the following:

File transfer failed. File contains records that are longer than the LRECL of the new file. Transfer aborted due to file error.

And when I go to the data set on the mainframe that member has now been deleted and is no longer in the data set.

I am connected through your zftp extension

@MikeKoester MikeKoester added the bug Something isn't working label Mar 24, 2022
@github-actions
Copy link

Thank you for creating a bug report. If you haven't already, please ensure you have provided steps to reproduce it and as much context as possible.

@tiantn
Copy link
Contributor

tiantn commented Mar 31, 2022

Hi @MikeKoester , I tried to recreate the problem but failed. My procedure is as following:

  • I create a test member in a PDS dataset which is fixed 80 length.
  • write one line in the member from TN3270.
  • opened the member in VSCode and add one line with 240 length.
  • saved it. The message show upload successfully.
  • check the member in TN3270. The content is truncated.
    Could you provide your steps if it's convenient? Thank you very much!

@JillieBeanSim JillieBeanSim mentioned this issue Mar 31, 2022
55 tasks
@MikeKoester
Copy link
Author

this is the data set layout

Record format . . . . FB
Record length . . . . 80
Block size . . . . . 9040
Data set name type PDS

I have a member in the data set that is 2,680 lines I even removed the sequence numbers. I am attached to the system in VSC through ZFTP. I bring the member into VSC, edit it and then save it. That is when I get the following

File transfer failed. File contains records that are longer than the LRECL of the new file. Transfer aborted due to file error.

and now when I go back to the mainframe the member is no longer in the data set.

@tiantn
Copy link
Contributor

tiantn commented Apr 1, 2022

Hi @MikeKoester , thank you for your details description. I recreate it today.

Like the document said (https://www.ibm.com/docs/en/zos/2.3.0?topic=4rc-451-file-transfer-failed-file-contains-records-that-are-longer-than-lrecl-new-file), when I change my ftp options to NOTRUNcate and NOWRAPrecord, and the contents longer than LRECL, the transfer failed with this information. And the member become empty.

So you can check your reccords'length to confirm the length is not longer the setting. And if you accept the truncated, set the ftp option to TRUNCATE.

We consider add some warning messages in zowe ftp extension to give user a note before their execution. Thank you very much!

@zFernand0
Copy link
Member

I believe this was fixed in #1746

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working zFTP
Projects
None yet
Development

No branches or pull requests

4 participants