Skip to content
New issue

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

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

Already on GitHub? # to your account

Pull from Mainframe is adding extra characters to each record/line #2169

Closed
zFernand0 opened this issue Mar 3, 2023 · 7 comments
Closed
Labels
bug Something isn't working On-Hold priority-high Production outage - this quarter or at least next quarter severity-high Bug for which there may be workaround but limits the usage of the Zowe for major use cases

Comments

@zFernand0
Copy link
Member

When I right click on the member name and click "Pull from mainframe" it adds 1 space in front of each line of the JCL. So I delete that line, save the member and try to re-run the job and it still gives me this same error. I am not sure what is causing this reformat to happen, but it basically makes the option to use zowe through vs code unusable...

Originally posted by @LukeG-96 in #1116 (comment)

@zFernand0 zFernand0 added bug Something isn't working priority-high Production outage - this quarter or at least next quarter severity-high Bug for which there may be workaround but limits the usage of the Zowe for major use cases labels Mar 3, 2023
@github-actions
Copy link

github-actions bot commented Mar 3, 2023

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.

@zFernand0
Copy link
Member Author

zFernand0 commented Mar 3, 2023

Personally, I thought this could be related to a race condition in how we save and upload contents to the mainframe


From @LukeG-96:

I get the "Data Set Uploaded successfully" message but when I follow the steps you suggested it still puts one space in front of every line and adds a new line at the bottom...

Below is what is looks like after I make my changes and save the member:
image

Here is what it looks like after I issue a Pull from mainframe
image

@zFernand0
Copy link
Member Author

Hey @LukeG-96 ,
Could you share the attributes of the dataset?
I tried a few things and I still cannot reproduce the Pull from mainframe adding an extra space.

List of things I tried:

  • Data-loss issue in previous versions of Zowe Explorer (v2.6.2 and earlier)
    • With this mechanism I was able to reproduce the fact that my "edits" (i.e. removing all spaces at the front of each line) were not successfully uploaded, even though VSCode said otherwise.
    • Because of this, I was getting the spaces back after every Pull from Mainframe
    • Note: this was resolved in 2.7.0 (and I couldn't reproduce it the same way)
  • CR/LF differences
    • I tried uploading content with different line-endings and pull from mainframe would just convert the line endings automatically (depending on the OS - Windows: CRLF | *nix - LF)
    • Result: no spaces being added to each line
  • Record datasets
    • I tried downloading and uploading datasets and the only way to get it to fail was uploading a record-type dataset in binary format (to a PDS with variable record format)
    • This failure was expected since the first couple of bytes basically describe the the record length and it is not valid JCL
      image
  • Encoding differences
    • Results: Similar to the CR/LF, no spaces being added to each line
    • In this case, z/OS takes care of the conversion and the data/JCL should be fine as long as we don't change to a codepage that is fundamentally different.

@LukeG-96
Copy link

@zFernand0 As it turns out, my site is in the process of upgrading Endevor for our z/OS system. I believe this is the reason for my weird errors I'm receiving in VSCode for the Zowe extension.

Once we get this upgraded I am going to give this another try and see if it will work then.

I appreciate all your help on this and taking the time to open a new thread. I will post an update once we're upgraded and I've tested again.

@FALLAI-Denis
Copy link

Hi,

Similarly, pulling a file or a member from the mainframe adds a blank line to the end of the downloaded file, i.e. adds a newline after the last line which creates a blank line.

@zFernand0
Copy link
Member Author

Similarly, pulling a file or a member from the mainframe adds a blank line to the end of the downloaded file, i.e. adds a newline after the last line which creates a blank line.

Hey @JillieBeanSim, should we create an issue for this particular behavior?

@JillieBeanSim
Copy link
Contributor

@zFernand0 I would assume it would be handled along with this issue since newline = newline char at end of line

@t1m0thyj t1m0thyj moved this from New Issues to High Priority in Zowe Explorer for VS Code Dec 26, 2023
@t1m0thyj t1m0thyj moved this from High Priority to Release Backlog in Zowe Explorer for VS Code Dec 26, 2023
@JTonda JTonda closed this as not planned Won't fix, can't repro, duplicate, stale Apr 4, 2024
@github-project-automation github-project-automation bot moved this from Release Backlog to Closed in Zowe Explorer for VS Code Apr 4, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working On-Hold priority-high Production outage - this quarter or at least next quarter severity-high Bug for which there may be workaround but limits the usage of the Zowe for major use cases
Projects
None yet
Development

No branches or pull requests

7 participants