|
Post by Robert on Nov 19, 2023 10:06:30 GMT -5
Hi George,
As you know, I have been exploring the possibility of defining a new Picture code of * and tested this concept in the current version 23.313.
When a file is first opened, if you were to attempt a command like,
FIND *
it means to find the same string you found 'the last time'. But, for a newly opened file, there is no last time, and so you get the error,
No previous Find string available
Problem is, I am getting this same error when I try,
FIND P'*'
Because * is currently not a reserved Picture code, it should be treated as ordinary data, but that won't work unless I code it like this,
FIND P'\*'
Now, the plot thickens ...
If I use " double quotes or ` accent quotes, it correctly finds * characters without the \ used in the Picture.
Also, if I were to say FIND '*A' it works correctly, and will find a string of "*A" if one exists in the data.
Conclusion: The Picture Code logic is correctly realizing that * is not a special code. So, the problem must be somewhere in the command line parser. I would guess it is failing to handle the combination of P and the ' apostrophe, and somehow the * is getting yanked out as a token. You then see FIND * rather than FIND P'*' thus leading to the incorrect error message.
R
|
|
|
Post by George on Nov 19, 2023 10:27:48 GMT -5
Make sure you close the tab and reopen it, or you'll get those funny results.
I'll have to check out the parse.
George [UPDATE] Corrected. I wish we'd never incorporated the * as previous find/change operands. With RFIND/RCHANGE and RETRIEVE support it is just not needed. A useless carry-over from ISPF. I know I never use it, I seriously doubt anyone does.
[/UPDATE]
|
|
|
Post by Robert on Nov 19, 2023 11:32:01 GMT -5
Well, we (I?) always wanted to maintain ISPF compatibility when it was feasible and made sense. SPF goes back to around 1975, and some of IBM's ideas have held up well over the years and some haven't. I would be reluctant to yank this feature without discussing it among the user base.
When I was using real ISPF, I did use the * on occasion when I wanted to change one long string for another long string, and the whole command wouldn't fit on the primary command line. Now, we have other means to get around this, like a scrollable command line, SET symbols with essentially unlimited length we can substitute in, macros, and real good RETRIEVE system. Also, we have RLOCFIND which really comes in handy.
I would regret seeing working, ISPF-compatible code being yanked, but if you were adamant, I could live with it. I would still advise against it.
Of course, if I just opened a file and then immediately said FIND * then I would expect that it would properly report an error, because the command is being used out of context; it's a correct error.
R
|
|
|
Post by George on Nov 19, 2023 13:48:42 GMT -5
I wasn't considering yanking it, but it gets really frustrating at times looking at code cluttered up with all this compatibility stuff that 99.9% of users probably don't even remember, let alone use.
George
|
|
|
Post by Robert on Nov 19, 2023 18:16:02 GMT -5
I couldn't recommend it enough for everyone to actually read the real ISPF manual Edit and Edit Macros, and make an attempt to read through our own manual at least once. But then, I haven't done that one myself in a while because it's so long, and since I wrote so much of it, it's been a while since I followed my own advice.
|
|