MainframeSupports
tip week 10/2018:

A crazy idea stroke me regarding the SORT command in ISPF EDIT/VIEW. I often use it in combination with a label I have set and label .ZL to avoid sorting a possible header line. My sort command then looks like SORT 1 10 A .A .ZL and then I place .A in front of the first line to include in my sort result. Then I hit Enter and done!

The idea that occured to me was to use the command SORT 1 10 A .ZCSR .ZL, place the cursor on the line where I would set the .A label and hit Enter. And it works!!! I am still a litte shocked I have not thought of this solution the last 20 to 30 years, because it is extremely clever. The most elegant thing about the idea is that I do not need to set a new label or delete the old one if I want to make a new sort or another command using labels.

Of course it is a little more troublesome to type .ZCSR than .A, but if you think it is too troublesome you can define a F-key to contain the text SORT .CSR .ZL and then type for instance 1 10 A in the command field, place the cursor on the desired line and press the F-key. This works fine as well. And the trick can be used for other ISPF EDIT/VIEW commands using labels so it is only your imagination that sets the limit.

Previous tip in english        Forrige danske tip        Tip list