|
Post by meshuggenah on Jun 13, 2023 14:11:52 GMT -5
Consider the following file: 11 22 33 44 55 66 77 88 99 When I issue X all and &L 3 (the cursor in SPFLite jumps to line 3 and the command remains while on the mainframe it stays on the command), then &L 6 and finally &L 9.
When I then says HIDE X, all the messages lines disappear and only the three lines I located remain. When I try to cut (ctrl+C) and paste (ctrl+V) these 3 lines, all 9 lines are pasted in SPFLite. On the mainframe only the three lines still visible that I cut are pasted.
Time for my Boost.
|
|
|
Post by George on Jun 13, 2023 14:55:09 GMT -5
meshuggenah:
OK, lets go through these.
An (L) Locate command has always positioned the cursor to the located line, that's what it's supposed to do. The retention request (&) on the command line is immaterial. If I say L .label, it's because I want to find and do something with that line, and the cursor better be positioned to let me do that.
The ISPF definition of line selection criteria has always been that the line range specified (whether through Cnnn or CC/CC blocks) is always measured in SCREEN LINES. And if X'd blocks are in that range, they are included.
Whether Hidden or not makes no difference, neither does the Exclude status.
This has been so since the very earliest days of SPFLite. I can remember in those early days cursing IBM's choice since it made some routines quite difficult.
But it certainly won't change. A) it would be quite involved as the code in a large # of commands would need tweaking, and B) it would disrupt users who are now fully comfortable with this handling.
If IBM has modified their definition of 'line selection' since SPFLite came along, I'm afraid we'll probably stick with the original definition.
Hope this explains what you're seeing.
George
|
|
|
Post by Robert on Jun 13, 2023 16:08:48 GMT -5
Meshuggenah: We tried hard to make HIDE work like ISPF, but it's a very weird thing, to collapse an excluded block into an underscoring of the prior line. There are some issues to consider, like using a font where the underscore is rendered so as to allow this to happen, and defining the percentage height of a cursor, which gets its graphic from the underscore glyph, and so on.
Bear in mind that IBM introduced HIDE mainly as a concession to ISPF users with small screens (25 x 80) who needed to squeeze out every last line. We don't face that these days. Personally, I never use HIDE, I just don't need it. Some people like it I guess, but it's not for me.
If you can come up with specific symptoms, or screen shots, it can help us understand better what the issues are.
By all means try / and \ instead of the 99999 trick. SPFLite's method is MUCH better. Once you try it, you'll never go back to 99999.
|
|
|
Post by meshuggenah on Jun 14, 2023 4:42:59 GMT -5
Good morning Gentlemen,
Thank you for your responses. Everything you both said makes sense. The only issue I can't work around in SPFLite is the cutting and pasting of lines that are not hidden. My intent was only to make you aware of the differences. I would have included screenshots, but I don't know how to get them in these replies.
|
|
|
Post by George on Jun 14, 2023 8:14:45 GMT -5
meshuggenah: Can you explain the problem with cut/paste when lines are excluded? If there's a bug we'll certainly try and correct it.
A sample list of steps with exactly what commands are entered is always best.
George
|
|
|
Post by Stefan on Jun 15, 2023 2:41:03 GMT -5
George and meshugenah,
I believe SPFLIte is "working as designed" and there is no bug here. SPFLite also "grabs" invisible lines in the Ctrl-C (Copy) because it is a handy way to MARK+(Copy) data on a range of lines which exceeds the number of lines on one screen (just exclude a bunch of lines between the first & last line to be 'grabbed').
I reckon what the meshugenah is trying to achieve is to cut three non-consecutive lines from the 9 data lines and paste just them elsewhere in the file using Ctrl-C and Ctrl-V. What we need to also know is what KEYMAP is applied to those two keys. I assume the keys are mapped to keyboard primitives (Copy) and (Paste) respectively. Note that (Copy) and (Paste) are KEYBOARD primitives. They operate on 'marked text' not 'whole lines' unless you include a line break in the 'marked' section. Primary commands CUT& PASTE operate on whole lines.The (Paste) primitive does NOT equate to the PASTE primary command.
I reckon the way to the correct result is to use the CUT NX command instead of Ctrl-C/V keys.
To prepare: 1) Enter 9 lines with data 11 to 99 respectively 2) Exclude lines 3, 6 and 9 3) Enter primary command CUT NX 4) Enter primary command CLIP to see what's been placed on the clipboard ready for pasting It will be just lines 3, 6 and 9. Note when the clipboard is pasted with Ctrl-V, it will overlay 3 lines at the cursor position, if it is pasted with the PASTE primary command, it will insert 3 new lines as specified by 'A'/'B'/etc line command)
Note also that the HIDE command is irrelevant when using CUT NX
If you follow the meshugenah's proposed steps... 1) Enter 9 lines with data 11 to 99 respectively 2) ENter primary command X ALL 3) Enter primary command &L 3 Note the '&' prefix serves to keep the cursor on the command line - same can be achived with PFK-12 (!RETRIEVE) command
4) Enter primary command &L 6 5) Enter primary command &L 9
6) Enter primary command HIDE X Note: You now have only 3 visible lines on screen
7) MARK/highlight the three lines with a SHIFT-Mouse or SHIFT-Cursor-keys movement 8) Press CTRL-C (Copy) primitive
9) Enter primary command CLIP to see what's on the clipboard.
It will be lines 3 to 9 inclusive, ie. the MARK + Ctrl-C will "grab" the invisible excluded lines between lines 3 and 9 as well as the three visiable lines.
You can use this approach but crucially need to enter CUT NX in step (8). If so, step (7) is not needed.
PS meshugenah,
I sincerely apologise if this has turned into a bit of a lecture. I mean you no disrepect.
It took me a while to separate primitives (Cut), (Copy) and (Paste) from primary commands CUT and PASTE, especially as 3270s didn't have keyboard primitives as such - they didn't have a lot of features that SPFLite provides by virtue of running in a Windows environment.
|
|
|
Post by George on Jun 15, 2023 9:06:29 GMT -5
Stefan: Thanks for the full blown explanation. George
|
|
|
Post by meshuggenah on Jun 16, 2023 6:24:22 GMT -5
Good morning Everyone,
The lecture was great, and no offense was taken. Maybe I should try a more straightforward example. Consider:
00 ab 00 11 cd 11 22 ef 22
ISPF on the mainframe allows me to highlight and cut (ctrl+C) just columns 5/6 in all three lines. When I paste (ctrl+V) the results into a new file, I get:
ab cd ef
In SPFLite, I cannot highlight just columns 5/6 in all three rows at once. Therefore I am unable to cut just the columns in each row that I am interested in. Maybe this is just the way highlighting works in a Windows environment. I just want to know for sure. I can manipulate the original file to get the desired results if it is.
Your continued patience and support are greatly appreciated.
|
|
|
Post by Stefan on Jun 16, 2023 6:59:19 GMT -5
OK, this example is simpler because there are no excluded lines betwen the three data lines of interest. You should highlite the vertical block of data "ab" to "ef" and press Ctrl-C which (should) execute the (Copy) keyboard primitive. To do this, hold down the SHIFT key while dragging the mouse over the 'ab' text and then down to the 'ef' string. That should highlite/mark the "column" of data you desire and Ctrl-C will place it in the clipboard. Why SHIFT key? By default you can only select/mark/highlite text on one line - with SHIFT you can select a 2-dimensional block of text across several lines See OPTIONS - GENERAL - left column... Allow 2-D mouse selection without Shift/Ctrl/Alt
To check what you captured, enter the primary command CLIP You see your result is as expected ab, cd, ef, on one line each. OK - end the CLIP session
Now you can paste this two ways - depends on what you need to achieve.
(1) If you want to paste this column elsewhere and have the data inserted or overlay whatever is already on each of the 3 lines at the target location - Position the cursor where you want the 'ab' to appear and press Ctrl-V which should execute the (Paste) keyboard primitive. Ctrl-V honours the Overtype or Insert modes, so select the relevant INSERT/OVERTYPE/DATAINSERT mode before Ctrl-V
(2) If you want the three captured lines to be inserted as new lines within your file - Type line command ' A' on the line after which you wish to insert the captured data and enter the PASTE primary command on the command line. That's it. (Unless I've misunderstood you)
|
|
|
Post by George on Jun 16, 2023 9:20:08 GMT -5
Yes, sounds like he wasn't aware of 2D highlighting.
George
|
|
|
Post by Robert on Jun 16, 2023 11:04:26 GMT -5
George, you know, "in the beginning" there was only 1-D highlighting. When 2-D was added, there was a concern that people might mark off 2-D by mistake, and the checkbox and the ctrl/alt/shift thing was supposed to be a protection.
However, in hindsight, I believe the 'protection' concern was overblown. After (probably) 13 years of experience using it, I don't recall either experiencing or hearing about 2-D highlighting happening by mistake. Besides, if you used the mouse and highlighted too much, you just keep moving the mouse until you have the correct region.
I do believe it's past time to remove this feature. We should allow 2-D selection all the time, and requiring shift or anything should be removed.
|
|
|
Post by meshuggenah on Jun 16, 2023 11:09:51 GMT -5
Nope, you understood me correctly. Yes, I was unaware of 2D highlighting. Thanks for all the explanations. It really helps.
|
|
|
Post by George on Jun 16, 2023 11:42:30 GMT -5
Robert: I agree, all 'normal' editors allow multi-line marking (although not always column style).
Yanking things is easy.
George
|
|