Replies: 1 comment 1 reply
-
Hi @JWaters02, Thanks for pointing out that the recommended function The steps outlined in "Fetching a resource on demand" should work for looking up resources with the FileSystemProvider. If you want to open the resource in the editor after its been fetched using the let pdsMemberUri = vscode.Uri.parse("zowe-ds:/zosmf/<censored PDS>/TEST1?fetch=true");
try {
const fsEntry = await vscode.workspace.fs.stat(pdsMemberUri);
pdsMemberUri = pdsMemberUri.with({ query: "" });
} catch (err) {
console.log(err);
return;
}
await vscode.commands.executeCommand("vscode.open", pdsMemberUri); |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In my (company internal only) vscode extension that supports various TSO utilities to vscode frontend panels, I have an option to open a JCL dataset instead of submitting it directly. I want to call the
zowe.ds.editDataSet
command, but I have two problems:IZoweDatasetTreeNode
reference for the JCL member knowing only its PDS/PDS member nameFor reference, this is what I am trying to do:
The submit JCL command and message works just fine, so the idea of calling the command is not invalid.
I looked at the FileSystemProvider docs but firstly, I could not figure out how to make a valid
pdsMemberUri
link that actually worked, it just always threw a dataset not found error. And secondly, even if I could, there is no FileSystemProvider API for actually opening that dataset in the editor. Perhapsvscode.window.showTextDocument(pdsMemberUri)
could work, but would that allow edits to the file to actually be saved through to the mainframe? I was trying to do this:But it can't find the file. Note that I am using
vscode.Uri.parse
instead of the documentedvscode.Uri.from
, because the example provided has incorrect syntax and seems to be doing what parse does rather than what from does. Either way, if I ctrl+click on the link with an example PDS and PDS member, it says cannot find file. I am also not using<lpar>.zosmf
, only thezosmf
bit, because I am using just thezosmf
profile, not one split up between different LPARs. Unless this still needs to be specified? But tried anyway with the LPAR name.zosmf and still doesn't work.Thanks!
Beta Was this translation helpful? Give feedback.
All reactions