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

upload file-to-uss-file tries to create a dataset #144

Closed
eakst7 opened this issue Oct 27, 2023 · 5 comments · Fixed by #145
Closed

upload file-to-uss-file tries to create a dataset #144

eakst7 opened this issue Oct 27, 2023 · 5 comments · Fixed by #145
Assignees
Labels

Comments

@eakst7
Copy link

eakst7 commented Oct 27, 2023

Describe the bug

zowe zftp ul file-to-uss-file tries to create an MVS dataset (and might succeed) instead of a USS file when the target file does not start with a slash. Since the command is explicit about uploading to a USS file, it should not attempt to create an MVS dataset.

Expected and actual results

Details about the behavior:

  1. Issue: zowe zftp ul file-to-uss-file hello.txt hello.txt
  2. Expected behavior: The file hello.txt is created relative to the user's USS home directory or an error message indicating that the destination file must be fully qualified.
  3. Actual behavior:
Command Error:
SVC99 RETURN CODE=4 S99INFO=0 S99ERROR=38668 HEX=970C S99ERSN code X'000042CE'.
Unable to create data set HELLO.TXT for STOR command.

If the user has authority to create the dataset named HELLO.TXT, the dataset is created.

Describe your environment

  • Node.js and NPM versions installed (run node --version, npm --version):
$ node --version
v18.17.1
$ npm --version
  • Operating system and version:
    Fedora 38
Linux redacted 6.5.7-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 11 04:07:58 UTC 2023 x86_64 GNU/Linux

Additional context

I think the code eventually ends up in the zos-node-accessor module, zosAccessor.js, which calls ensureFullQualifiedDSN(destDataset), which puts single quotes around any name that does not begin with a forward slash. FTP then interprets that as a dataset name instead of a USS file name.

@eakst7 eakst7 added the bug Something isn't working label Oct 27, 2023
@github-actions
Copy link

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.

@std4lqi std4lqi self-assigned this Oct 30, 2023
@std4lqi
Copy link
Collaborator

std4lqi commented Oct 30, 2023

Hi, @eakst7 , could you try the following?

zowe zftp ul file-to-uss-file hello.txt /u/my-user-id/hello.txt

zftp doesn't support the remote file name with the relative directory, as it doesn't provide the command to change current directory. So the absolute file path on remote z/OS USS is required.

@std4lqi
Copy link
Collaborator

std4lqi commented Nov 7, 2023

Hi @eakst7 , are you OK to close this issue?

@eakst7
Copy link
Author

eakst7 commented Nov 7, 2023

Hi @std4lqi , I'm ok to close if it's unlikely to be addressed.

It would preferable, though, to issue an error message if the remote path is not fully qualified, rather than trying to create a dataset.

@std4lqi
Copy link
Collaborator

std4lqi commented Nov 8, 2023

Hi @eakst7, I see your point now. Let's re-evaluate it and come back to you later. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants