zopencommunity / vimport

3 stars 4 forks source link

use case results using vim dataset io #68

Open gngrossi opened 1 month ago

gngrossi commented 1 month ago

Original issue https://github.com/ZOSOpenTools/libdio/issues/4

1) 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'"

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

4) 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

5) Error Remove a line for an empty member and writing it... ~ "/tmp/v856377/0-@02858.T.GGGG.cntl" 0L, 0B written "/tmp/v856377/0-@02858.T.GGGG.cntl" Error: Failed to allocate memory for buffer Press ENTER or type command to continue

MikeFultonDev commented 4 hours ago

@gngrossi can you retry scenario 4 ? I did the following and it worked ok:

MikeFultonDev commented 4 hours ago

@gngrossi for scenario 1, this is 'working as designed', but perhaps it is designed poorly...

For a 'file' to be 'escaped' and be treated as a dataset, it has to start with //. In your 2nd case, the file actually starts with " (which is a valid, albeit likely dangerous character to have as the first character in your file name). The reason this works differently on the command line is because the shell interprets the parameters first and strips off the " at the start and end of the string, which is required so that the ' and ( characters are properly interpreted.

MikeFultonDev commented 4 hours ago

I opened #74 and #75 for problems 3 and 5. @gngrossi if you are ok with it, I'd like to close this particular issue so we can track the bugs on an individual basis through #74 and #75. I will wait for your feedback on scenario 1 and 4 before this though....