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

Members aren't saved, message "Saving data set..." but nothing happens and never ends. #2533

Closed
ssamayoa opened this issue Oct 6, 2023 · 24 comments · Fixed by zowe/zowe-cli-ftp-plugin#152 or #2712
Assignees
Labels
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 zFTP
Milestone

Comments

@ssamayoa
Copy link

ssamayoa commented Oct 6, 2023

Describe the bug
Members aren't saved, message "Saving data set..." but nothing happens and never ends.
Some works but most of the time doesn't.
Used to work and suddenly stopped.

Expected and actual results

  1. Expected behavior:
    Members saved.

  2. Actual behavior:
    Members aren't saved

  3. Applicable log files:
    Where I can see the log file for the pluing?
    I only get this line from "IBM Z Open Editor":

2023-10-06T12:03:03.552-06:00 DEBUG: Saving the current JCL document with a maximum line length value of 80 ("zopeneditor.jcl.maximumLineLength" setting).

Describe your environment

  • NodeJS: v18.13.0
  • NPM: 9.4.1
  • Operating system and version: Windows 10 22H2 10.0.19045.3448
  • Shell/terminal: "IBM Z Open Editor" / "Zowe Explorer"

Additional context

  • At start-up I get, since the beginning this message:

Error: Unable to initialize secure credentials plugin for Z Open Editor. Check that you configured the "Zowe Security: Credential Key" user preferences with the value "Zowe-Plugin". Error returned: "Failed to initialize secure credential manager"

  • When "Zowe Explorer" shows the data set list, I can see 2 tasks in SDSF:

OLS0009 STEP1 STC06059 OLS0009
OLS0009 DBPROCBG TCP00027 TSU06101 OLS0009
OLS0009 STEP1 STC06093 OLS0009

DBPROCBG is my TN3270 session.

  • I'm the administrator of the mainframe and haven't changed any configuration.
  • Saved members (when works) does not have Size, Created, Changed or ID - should them?
  • Where and/or how I can see what's happening?
@ssamayoa ssamayoa added the bug Something isn't working label Oct 6, 2023
@github-actions
Copy link

github-actions bot commented Oct 6, 2023

Thank you for creating a bug report.
We will investigate the bug and evaluate its impact on the product.
If you haven't already, please ensure you have provided steps to reproduce the bug and as much context as possible.

@ssamayoa
Copy link
Author

ssamayoa commented Oct 6, 2023

FWIW I tried from command line and worked so is very likely that the problem is in "IBM Z Open Editor".

@std4lqi
Copy link

std4lqi commented Oct 9, 2023

@ssamayoa Will look into it soon. Thanks!

@std4lqi
Copy link

std4lqi commented Oct 10, 2023

Hi @ssamayoa , some questions we have to understand the problem better.

  • Did the problem happen when you saved PDS member with IBM Z Open Editor?
  • Did the problem happen when you saved PDS member with Zowe Explorer 2.11.0?
  • When you edit an existing member, can you save it successfully?
  • You can upload PDS member with Zowe CLI via FTP, right?
  • Did the problem happen only on your main z/OS system? It didn't happen on your another z/OS system, right?
  • If you got the different result on two z/OS systems, could you provide the PDS attributes like LREC shown in ISPF, on both two z/OS systems?

Thanks!

@std4lqi
Copy link

std4lqi commented Oct 10, 2023

Sometimes, the following dialog in Zowe Explorer asks for choice, but doesn't show on the front due to some reason, while you just see Saving data set ... on the status bar. You can click Saving data set ... to bring the dialog on the font.

image

@ssamayoa
Copy link
Author

Hi @ssamayoa , some questions we have to understand the problem better.

  • Did the problem happen when you saved PDS member with IBM Z Open Editor?
    YES
  • Did the problem happen when you saved PDS member with Zowe Explorer 2.11.0?
    YES
  • When you edit an existing member, can you save it successfully?
    NO
  • You can upload PDS member with Zowe CLI via FTP, right?
    YES
  • Did the problem happen only on your main z/OS system? It didn't happen on your another z/OS system, right?
    Yes, that's the weirdest thing: It fails on IBM's Dallas ISV Center but works fine in zPDT instance.
    I compared FTP configuration and are almost identical.
    Note that in IBM's Dallas ISV machine sometimes works but most not and haven't find the exact flow when it works.
  • If you got the different result on two z/OS systems, could you provide the PDS attributes like LREC shown in ISPF, on both two z/OS systems?

Is the same: 80 on both systems.
I'm editing COBOL & JCL datasets.

Dallas:
Data class . . . . . : None
Organization . . . : PO
Record format . . . : FB
Record length . . . : 80
Block size . . . . : 27920
1st extent megabytes: 2
Secondary megabytes : 2
Data set name type : LIBRARY
Data set encryption : NO
Data set version . : 1

zPDT:

General Data
Volume serial . . . : A4SYS1
Device type . . . . : 3390
Organization . . . : PO
Record format . . . : FB
Record length . . . : 80
Block size . . . . : 6160
1st extent tracks . : 1
Secondary tracks . : 1
Data set encryption : NO

(ignore that I created in SYS vol :p )
However I can note that in Dallas is LIBRARY and has bigger block size while in zPDT is "classic" PDS.
Might be the cause?
Some obscure information of FTP in z/OS I should know?

Thanks!

@ssamayoa
Copy link
Author

Sometimes, the following dialog in Zowe Explorer asks for choice, but doesn't show on the front due to some reason, while you just see Saving data set ... on the status bar. You can click Saving data set ... to bring the dialog on the font.

image

I noticed that in https://github.com/zowe/vscode-extension-for-zowe/blob/main/packages/zowe-explorer-ftp-extension/src/ZoweExplorerFtpMvsApi.ts but I haven't seen that message neither the one you said covers it when the save fails.

@std4lqi
Copy link

std4lqi commented Oct 12, 2023

Thanks, @ssamayoa ! PDS member (LIBRARY with block size of 27920 ) saving from Zowe Explorer worked well at our side.

You can save SEQ dataset from Zowe Explorer, right?

@ssamayoa
Copy link
Author

ssamayoa commented Oct 14, 2023

PDS member (LIBRARY with block size of 27920 ) saving from Zowe Explorer worked well at our side.

I noticed that zowe explorer was updated from 2.11 to 2.11.1 to I give a try.
Save feels slow but seems working now - haven't used extensively yet.
May be a larger timeout somewhere?
I will back to work with VS Code instead of TSO/ISPF and let you know if I have some problem then.

You can save SEQ dataset from Zowe Explorer, right?

I haven't tried, I started to use VS Code/zowe recently focused on coding - I will try next week and let you know the result.

@ssamayoa
Copy link
Author

ssamayoa commented Oct 15, 2023

UPATE
Still randomly failing.
I weird that most of the time with small and medium COBOL program does not fail but with short JCL does - but still don't found what exactly conditions make it fail.
Just in case I created a new PDSE with smaller block size and copied the JCLs there but save still fails.
This is driving me crazy!

@std4lqi
Copy link

std4lqi commented Oct 17, 2023

Do you have any problem in saving SEQ dataset? I suppose you mean "Saving data set ..." never ended by fail.

I suspect it might be relevant to the text longer than LREC. Could you remove the trailing space characters over the LREC, and then save it? Here are how I remove the trailing spaces over LREC.

  1. Set up ruler in VS Code. Go to Settings, and input ruler. Then click Edit in settings.json in the following screen.
image
  1. Add LREC like 80 into editor rulers. Then you will get the vertical line at column 80 in editor.
    "editor.rulers": [
        80
    ],
  1. Show whitespace characters by selecting Render Whitespace in the following screen. The whitespace will be rendered as ..
    image

  2. Ensure no character or whitespace over the ruler, before saving data set.

@ssamayoa
Copy link
Author

@std4lqi thank you for your effort but I'm pretty sure is not the record length.
FWIW I have a ruler line at column 80 and render white spaces enabled.

Additional note:
When the save get stuck, if I try to edit the member in ISPF it complains "member in use" - seems that one of the parties (FTP server or plugin) is missing some signal like "EOF", "I'm ready", etc.

Again, this is driving me crazy!

@adam-wolfe adam-wolfe transferred this issue from zowe/zowe-cli-ftp-plugin Oct 30, 2023
@JTonda JTonda added zFTP priority-medium Not functioning - next quarter if capacity permits severity-medium Bug where workaround exists or that doesn't prevent the usage of Zowe. Just makes it more complex. labels Nov 2, 2023
@traeok
Copy link
Member

traeok commented Nov 3, 2023

Hi @ssamayoa,

Does your LPAR allow multiple active FTP connections under a single user? I've adjusted our handling of FTP connections in Data Sets and USS operations (#2526), so if your LPAR only allows one active connection per user, this fix may address your issue. This particular fix will be released with Zowe Explorer v2.12.1.

@traeok
Copy link
Member

traeok commented Nov 29, 2023

Hi @ssamayoa,

I just wanted to follow up and verify whether Zowe Explorer v2.12.1 resolved your issues with FTP and saving data sets.
Feel free to reply in this thread if you are still encountering the issue.

(Also, adding #2499 in this comment to link the two related issues)

@ssamayoa
Copy link
Author

ssamayoa commented Dec 5, 2023

@traeok Thank you for following this issue.
I'm still experience save hangs :(
I haven't found what are the step to reproduce however I think is something in our mainframe because I recently downloaded several members (600+) from a dataset using Filezilla and after +/-200 failed but then restarting the queue remaining 400+ were downloaded without a problem.
As soon as I have time I will dig into policy agent configuration, maybe there is something there that is causing this odd behaviour.

@JillieBeanSim
Copy link
Contributor

JillieBeanSim commented Jan 29, 2024

I am able to recreate this issue with zftp profile on Windows 10 uploading a save changes to MVS data set member that is JCL

@ssamayoa
Copy link
Author

I am able to recreate this issue with zftp profile on Windows 10 uploading a save changes to MVS data set member that is JCL

So I'm not crazy and is not my mainframe fault! :p

@JillieBeanSim JillieBeanSim added 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 and removed priority-medium Not functioning - next quarter if capacity permits severity-medium Bug where workaround exists or that doesn't prevent the usage of Zowe. Just makes it more complex. labels Jan 30, 2024
@JillieBeanSim
Copy link
Contributor

Updated the priority & severity to HIGH since this recreation caused loss of data, the file on host was empty after the save attempt

@traeok
Copy link
Member

traeok commented Jan 30, 2024

I am able to recreate this issue with zftp profile on Windows 10 uploading a save changes to MVS data set member that is JCL

This might not help much, but I wanted to add some additional info:

I tested this again with my zftp profile, and it doesn't happen for me as long as the lines are within the 80-character line length for JCL files.

However, I did notice strange behavior with the "Saving data set" status message when I get a truncation dialog such as the scenario above. The status message persists and the file is emptied on the host as @JillieBeanSim mentioned.

@std4lqi
Copy link

std4lqi commented Jan 31, 2024

Hi @JillieBeanSim , did you reproduce it with the line less than 80-character?

@tiantn
Copy link
Contributor

tiantn commented Jan 31, 2024

Hi @JillieBeanSim , we can recreate the problem when edit a member start with // in the first line on windows. We are investigating it now. Thank you!

@std4lqi
Copy link

std4lqi commented Feb 1, 2024

Hi @JillieBeanSim , @traeok , we believe this issue happens when the file to upload contains // at the first line.

When uploading text to FTP server, FTP client checks whether the string to put is a local file path first, using fs.stat(). If yes, it puts the whole file to the server; otherwise, it puts the string as the contents to the server.

On windows, error is thrown when FTP client uses fs.stat() with the file path starting with "//". You can open "Help -> Toggle Developer Tools" from VS Code. When you upload the file containing like

// abc

you can find the error message like

UNC host '// ...'  access is not allowed

The fix PR is created at zowe/zowe-cli-ftp-plugin#152

Thanks to @tiantn and all people here for your testing so many times to catch it!

@JillieBeanSim
Copy link
Contributor

Thanks @std4lqi & @tiantn for working on this. Please let us know when we can update the ftp cli plugin dependency to pick up these changes.

@zFernand0
Copy link
Member

The CLI PR was merged and published.
Thanks @tiantn and @std4lqi for fixing the issue.
Now we just need a quick PR to update the plug-in in the FTP extension.
I don't mind opening one in a few minutes.

@zFernand0 zFernand0 reopened this Feb 12, 2024
zFernand0 added a commit that referenced this issue Feb 12, 2024
Resolves #2533

Signed-off-by: zFernand0 <37381190+zFernand0@users.noreply.github.com>
zFernand0 added a commit that referenced this issue Feb 12, 2024
port #2533

Signed-off-by: zFernand0 <37381190+zFernand0@users.noreply.github.com>
JillieBeanSim pushed a commit that referenced this issue Feb 14, 2024
Resolves #2533

Signed-off-by: zFernand0 <37381190+zFernand0@users.noreply.github.com>
Signed-off-by: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com>
@JillieBeanSim JillieBeanSim added this to the v2.14.1 milestone Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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 zFTP
Projects
Status: Closed
7 participants