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

use case results using vim dataset io #4

Closed
gngrossi opened this issue Sep 12, 2024 · 17 comments
Closed

use case results using vim dataset io #4

gngrossi opened this issue Sep 12, 2024 · 17 comments
Assignees

Comments

@gngrossi
Copy link

[SYSA] bash-5.2$ vim //@02858.t.genjcl
SVC99 failure: IKJ56228I DATA SET @[email protected] NOT IN CATALOG OR CATALOG CAN NOT BE ACCESSED .
Press ENTER or type command to continue

For a SVC99 dynamic allocation error, I suggest not to enter vim unless you can be able to run edit commands:
:e "//'@02858.t.genjcl'"

E32: No file name

[SYSA] bash-5.2$ vim "//'@02858.T.ITSV.TBASVC.G0001V00'"
SVC99 failure: IKJ56225I DATA SET @02858.T.ITSV.TBASVC.G0001V00 ALREADY IN USE, TRY LATER+ .
Press ENTER or type command to continue

For the error message, suggest not displaying “SVC99 failure::, just begin with the message id IKJ56225I…

Tried to edit a PDS by mistake…
[SYSA] bash-5.2$ vim "//'@02858.t.cntl'"
1 ^@<98>ÂÓäÅ×Áââ^@^@^L^O^A^C^@^H^A ^E<8f>^A ^E<9f>^T9^@^A^@^A^@^@|ðòøõø@@@@ÃÖÄÅâ@@@

Suggestion: if a PDS/PDSE is entered without a member, maybe run mls @02858.t.cntl instead (if it exists) for a member list?

Being in ISPF BROWSE for a PDSE member
@02858.T.CNTL.PDSE(BLUEPASS) and then trying…to edit

[SYSA] bash-5.2$ vim "//'@02858.T.CNTL.PDSE(BLUEPASS)'"
EDC5028I A previous I/O error has marked the stream invalid for further I/O processing. (errno2=0xC0370005)
Press ENTER or type command to continue

Edit a new PDS member, adding a line, writing it, and exiting (note using _ENCODE_FILE_NEW=IBM-1047)
Going back into edit after…
vim "//'@02858.t.cntl(ggg)'"

1 hello@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@^U

ISPF
BROWSE @02858.T.CNTL(GGG)
Command ===>


ÇÁ%%?

Tried to write an update to the PDS member "//'@02858.t.cntl(ggg)'" after removing the line of data (for an empty member)

"/tmp/v787420/[email protected]" 0L, 0B written
"
/tmp/v787420/[email protected]" Error: Failed to allocate memory for buffer

Press ENTER or type command to continue

@IgorTodorovskiIBM
Copy link
Contributor

Great feedback, thanks @gngrossi .

@IgorTodorovskiIBM IgorTodorovskiIBM self-assigned this Sep 12, 2024
@IgorTodorovskiIBM
Copy link
Contributor

IgorTodorovskiIBM commented Sep 16, 2024

[SYSA] bash-5.2$ vim //@02858.t.genjcl SVC99 failure: IKJ56228I DATA SET @[email protected] NOT IN CATALOG OR CATALOG CAN NOT BE ACCESSED . Press ENTER or type command to continue

For a SVC99 dynamic allocation error, I suggest not to enter vim unless you can be able to run edit commands: :e "//'@02858.t.genjcl'"

E32: No file name

We should support :e, I'll look into this.

[SYSA] bash-5.2$ vim "//'@02858.T.ITSV.TBASVC.G0001V00'" SVC99 failure: IKJ56225I DATA SET @02858.T.ITSV.TBASVC.G0001V00 ALREADY IN USE, TRY LATER+ . Press ENTER or type command to continue

For the error message, suggest not displaying “SVC99 failure::, just begin with the message id IKJ56225I…

Seems reasonable to me.

Tried to edit a PDS by mistake… [SYSA] bash-5.2$ vim "//'@02858.t.cntl'" 1 ^@<98>ÂÓäÅ×Áââ^@^@^L^O^A^C^@^H^A ^E<8f>^A ^E<9f>^T9^@^A^@^A^@^@|ðòøõø@@@@ÃÖÄÅâ@@@

Suggestion: if a PDS/PDSE is entered without a member, maybe run mls @02858.t.cntl instead (if it exists) for a member list?

Yep, we were thinking of extending the behaviour of editing a directory in vim. E.g vim /. This one will require more effort, so I'll create a different issue for it - zopencommunity/vimport#67

Being in ISPF BROWSE for a PDSE member @02858.T.CNTL.PDSE(BLUEPASS) and then trying…to edit

[SYSA] bash-5.2$ vim "//'@02858.T.CNTL.PDSE(BLUEPASS)'" EDC5028I A previous I/O error has marked the stream invalid for further I/O processing. (errno2=0xC0370005) Press ENTER or type command to continue

Are you expecting it to be editable? This may be related to the ISPF enqueue support. @MikeFultonDev

Edit a new PDS member, adding a line, writing it, and exiting (note using _ENCODE_FILE_NEW=IBM-1047) Going back into edit after… vim "//'@02858.t.cntl(ggg)'"

1 hello@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@^U

ISPF BROWSE @02858.T.CNTL(GGG) Command ===>

ÇÁ%%?

I can reproduce, ~it seems to be related to the [noeol] attribute that's added for new files. ~

Tried to write an update to the PDS member "//'@02858.t.cntl(ggg)'" after removing the line of data (for an empty member)

"/tmp/v787420/[email protected]" 0L, 0B written "/tmp/v787420/[email protected]" Error: Failed to allocate memory for buffer Press ENTER or type command to continue

@gngrossi
Copy link
Author

@MikeFultonDev
Being in ISPF BROWSE for a PDSE member @02858.T.CNTL.PDSE(BLUEPASS) and then trying…to edit

[SYSA] bash-5.2$ vim "//'@02858.T.CNTL.PDSE(BLUEPASS)'" EDC5028I A previous I/O error has marked the stream invalid for further I/O processing. (errno2=0xC0370005) Press ENTER or type command to continue

Are you expecting it to be editable?

I did some testing with ISPF and it looks like it is allowed for two different users. But in this use case, I am the same user (@02858), with a session in TSO/ISPF and the other session in SSH.

Is the reason for the EDC5028I message?

@IgorTodorovskiIBM
Copy link
Contributor

I've addressed a couple of the issues in the latest update: https://github.com/ZOSOpenTools/vimport/releases/tag/datasetio

  • Contains additional fixes such as :e and :vsplit support.
    • Make sure to use it as such: :e //'ITODORO.A.C(BLA)' - do not include double quotes
  • Fixes an issue when some datasets were read in as garbled text
  • Remove SVC99 prefix on some error messages

@gngrossi
Copy link
Author

Upgraded and re-tested...
1)
Good
[SYSA] bash-5.2$ vim //@02858.t.genjcl
Error: IKJ56228I DATA SET @[email protected] NOT IN CATALOG OR CATALOG CAN NOT BE ACCESSED .
Press ENTER or type command to continue

Works
:e //'@02858.t.genjcl'

Tried this
:e "//'@02858.t.genjcl'"
E32: No file name
Is this temporary not to use the same syntax (double quotes) as when using vim "//'@02858.t.genjcl'"

Good
[SYSA] bash-5.2$ vim "//'@02858.T.ITSV.TBASVC.G0001V00'"
Error: IKJ56225I DATA SET @02858.T.ITSV.TBASVC.G0001V00 ALREADY IN USE, TRY LATER+ .
Press ENTER or type command to continue

Edit a PDS by mistake
vim "//'@02858.t.cntl'"

image

No change

Being in ISPF BROWSE for a PDSE member
@02858.T.CNTL.PDSE(BLUEPASS) and then trying…to edit

[SYSA] bash-5.2$ vim "//'@02858.T.CNTL.PDSE(BLUEPASS)'"
EDC5028I A previous I/O error has marked the stream invalid for further I/O processing. (errno2=0xC0370005)
Press ENTER or type command to continue

Good
Edit a new PDS member, adding a line, writing it, and exiting (note using _ENCODE_FILE_NEW=IBM-1047)
Going back into edit after…
vim "//'@02858.t.cntl(gggg)'"

Error
Remove a line for an empty member and writing it...
~
"/tmp/v856377/[email protected]" 0L, 0B written
"
/tmp/v856377/[email protected]" Error: Failed to allocate memory for buffer
Press ENTER or type command to continue

Question:
Curious, is this intended for the temporary file...editing @02858.T.CNTL(GGGG)

image

thanks

@gngrossi
Copy link
Author

I was able to edit the same PDS member using vim and ISPF.
Is this expected?

Here are the ENQs:
vim "//'@02858.T.CNTL(gggg)'"
image

ISPF
EDIT @02858.T.CNTL(GGGG)
image

@gngrossi
Copy link
Author

The behavior of TSO/ISPF in our sysplex:
allows an edit of a PDS/PDSE member and a browse of the same member, by the same user or different user, on the same LPAR
or on a different LPAR.

So, in ISPF BROWSE for a PDSE member and using vim to edit that same member should work the same way...
Thoughts?

@IgorTodorovskiIBM
Copy link
Contributor

Yes, the temporary file is create just before the I/O processing begins. We intercept Vim at that point and dump the dataset contents into the temporary file.

The behavior of TSO/ISPF in our sysplex: allows an edit of a PDS/PDSE member and a browse of the same member, by the same user or different user, on the same LPAR or on a different LPAR.

So, in ISPF BROWSE for a PDSE member and using vim to edit that same member should work the same way... Thoughts?

Interesting, thanks. This is reference to the error "EDC5028I A previous I/O error has marked the stream invalid for further I/O processing. (errno2=0xC0370005)" correct? I believe that is coming from fopen, so we'll need to explore further.

bpxmtext C0370005

JrEdcOsrdEpreverr01: A read of the next block is being attempted, but there is
an outstanding read error. This failure occurred while reading the next block.

Action: A direct reposition or rewind must be done to clear the previous read
error.

Source: edcbosrd.c

@gngrossi
Copy link
Author

Regarding the temp file used for editing...
Editing this @02858.T.CNTL(GGGG) dataset member...uses "~/tmp/v288321/[email protected]" 1L, 81B
Looks confusing seeing @02858.T.GGGG.cntl where the member name is placed as the third node...not an issue

for Mike's question...
Are you expecting it to be editable? This may be related to the ISPF enqueue support.

Yes, expecting to be able to vim edit a member when in ISPF BROWSE for that member.
thanks

@IgorTodorovskiIBM
Copy link
Contributor

Regarding the temp file used for editing... Editing this @02858.T.CNTL(GGGG) dataset member...uses "~/tmp/v288321/[email protected]" 1L, 81B Looks confusing seeing @02858.T.GGGG.cntl where the member name is placed as the third node...not an issue

Ah, that was a design decision, so that we can map the LLQ to a suffix, enabling syntax highlighting to work without any changes to your vimrc. The ~/.dioconfig.json file can provide further customization if needed. You can run man libdio to learn about that.

@gngrossi
Copy link
Author

Maybe a point of reference using ISPF and dsfs...

ISPF edit on a dataset @02858.T.GENJCL

vim edit on /dsfs/txt/@02858/t.genjcl
image

image

@gngrossi
Copy link
Author

I'm going to open a DSFS case for this...either it's a feature or an issue.

Trying to use vim to "browse" or "view" a PDS member when in ISPF edit for that member.
I was expecting to "browse" like when trying ISPF browse.

ISPF edit on @02858.T.CNTL(GGGG)

vim -R /dsfs/txt/@02858/t.cntl/gggg
and
view /dsfs/txt/@02858/t.cntl/gggg

Results:
"/dsfs/txt/@02858/t.cntl/gggg" [Permission Denied]

-- INSERT -- W10: Warning: Changing a readonly file

Same result for a dataset.

@gngrossi
Copy link
Author

Case TS017264205 - DSFS Permission Denied when using vim to view a dataset

@IgorTodorovskiIBM
Copy link
Contributor

@gngrossi for the remaining issues, would it be possible to open separate issues under https://github.com/ZOSOpenTools/vimport/issues ?

@MikeFultonDev
Copy link

MikeFultonDev commented Sep 19, 2024

@MikeFultonDev Being in ISPF BROWSE for a PDSE member @02858.T.CNTL.PDSE(BLUEPASS) and then trying…to edit

[SYSA] bash-5.2$ vim "//'@02858.T.CNTL.PDSE(BLUEPASS)'" EDC5028I A previous I/O error has marked the stream invalid for further I/O processing. (errno2=0xC0370005) Press ENTER or type command to continue

Are you expecting it to be editable?

I did some testing with ISPF and it looks like it is allowed for two different users. But in this use case, I am the same user (@02858), with a session in TSO/ISPF and the other session in SSH.

Is the reason for the EDC5028I message?

I have to dig into this. I would have expected this to work because we don't honour any ISPF ENQ's yet and I am opening the PDSE as SHR which should work. #6 opened

@MikeFultonDev
Copy link

The behavior of TSO/ISPF in our sysplex: allows an edit of a PDS/PDSE member and a browse of the same member, by the same user or different user, on the same LPAR or on a different LPAR.

So, in ISPF BROWSE for a PDSE member and using vim to edit that same member should work the same way... Thoughts?

This is a side effect of us not honouring the ISPF ENQ's on the dataset. This is covered under #2

@gngrossi
Copy link
Author

Opened zopencommunity/vimport#68

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

No branches or pull requests

3 participants