Showing posts with label Xedit. Show all posts
Showing posts with label Xedit. Show all posts

Thursday, July 12, 2007

Xedit or ISPF : Xedit !?

I still had to come up with the second part of my little comparison between the ISPF editor and Xedit. Last time I focused on the strong points of ISPF, making Xedit looking a bit of a poor editor. I must immediately say, this is certainly not the case. There’s lots of things I really like about Xedit.

First and foremost there’s ‘profile xedit’. This is a macro which is executed each time you open a file in xedit. You might compare it to an initial macro in ISPF though that is on PDF level, whereas ‘profile xedit’ can treat files with a certain filetype but it can just as easily treat one single file. What’s the purpose : you can put up some settings and vary them according to the file you’re editing. (By the way, there’s e.g. also the lesser known ‘profrlst xedit’ that can influence the way you open a file in your reader, but I divert). I’ve seen ‘profile xedit’ files with a couple of lines, but I’ve also seen them with hundreds of line. And this doesn’t seem to have much influence on the speed of opening the file. It allows you e.g. to put your settings in upper case when you’re editing a JCL or a COBOL file and to set your case mixed, when you’re opening a text file.

First thing I do when ‘tuning’ this macro is – I must admit – put some settings (scale, command line) so that I have more or less the same look and feel as in ISPF. But there’s more than this. Here’s some of the settings I use – and you don’t find them in ISPF :
- ‘span’ : this allows you to look for a string across line boundaries
- ‘wrap’ : the file wraps around when you do a find or e.g. use PF8. Open a file, tap twice on the PF7 and you’re at the bottom of the file.
- varchar’ : no matter how many blanks are between two words, when you try to find e.g. ‘second life’, you’ll find ‘second life’ but also ‘second life’, and in combination with ‘span on’ even if they’re on two different lines.

Another nice command is ‘ALL’. It gives you all the lines containing a certain string and exludes all other lines. In ISPF you’ll need a macro. You can choose whether you still see an indication of the excluded lines or not. Deleting all the displayed lines, does not affect the excluded lines. I just love this – and ISPF reacts otherwise . . . In ISPF you’ll need a little macro for this command.

Split-Join (SPLTJOIN) assigned to a PF-key lets you split a line from the cursor position onwards if there are characters following. It joins lines when nothing follows : easy as pie. In ISPF you’ll need TS ànd TF.

There’s also an alternative use of the split screen I like. You can split your screen (horizontally or vertically) and open the same file at two different places in order to e.g. compare certain parts.

Another strong point, just to finish it off, is that you can combine search arguments with operators like AND, OR and NOT. So you can look for all lines with ‘second’ AND ‘life’.
Only one of the arguments can cross the line border. Otherwise, this wouldn’t have much sense when e.g. combined with the span setting.

So what’s my favourite editor : I must say I just don’t know. I think over the years you start writing little macros in the one that compensate for functions only found in the other, so you cover all functions you use in both editors. If I was forced to make a choice I think I’d go for Xedit, because I personally find it somewhat more flexible, but hey, that's just a personal choice !?

Wednesday, May 16, 2007

ISPF or Xedit : ISPF !?

The first editor I got to work with on the mainframe (or on any platform for that matter) was ISPF. After half a year I switched from MVS to VM and from ISPF to Xedit. I was - to say the least - overwhelmed by the many commands and settings in Xedit. Afterwards, when I got to work with ISPF again, I realized that lots of it can also be done in ISPF. And if it can't, you can always try and write a macro for it. If I had to make a choice . . . let's skip that one for the time being. To be honest, the ideal editor would be a mixture of both. In each editor, there are some features that are missing or that are for better covered in the other.

In this topic I'd like to focus on the ISPF aspects which are not that good or not at all covered in Xedit. I must say, however, this is entirely my personal opinion as this seems to be a sensitive topic : there have been more than one discussion on this topic in the IBM-Main discussion list

First of all I find the 'find-replace' commands to be far more intuitive in ISPF. Locating a target in Xedit only gives one occurence per line. That's not what I want : I just want to find every occurence in my file. So I have to use clocate. And you always have to be very aware of your position in the file in Xedit, more than in ISPF. Furthermore there's no RFIND. You have to re-issue the command. Some other things missing : FIND FIRST, FIND LAST, FIND PREV, FIND NEXT, FIND PREFIX, SUFFIX, WORD and FIND ALL. The last one can more or less be replaced by COUNT. No FIND P' ' (picture string) either. I use that a lot in ISPF.
The same goes for changing data : only one occurence per line, unless you indicate otherwise. And I find it so annoying, that afterwards, you're positioned at the bottom of the file as first line on your screen. There's no RCHANGE either.

What I'm really missing in Xedit is the UNDO command. It's just not there. The only thing you can do is recover deleted lines. If anyone has a solution for this, comments are welcome !

Line commands 'UC' and 'LC' do not exist in Xedit. There's only UPPER and LOWER issued from the command line. But then you really have to pay attention if you only want to transform a couple of lines. Just as with PUT-GET, the equivalent of CUT-PASTE you have to indicate the number of lines from the command line instead of indicating the range in the prefix area. Another line command that's replaced in that way by a primary command is the copy-overlay function (COVERLAY command in Xedit).

The tabbing is more elaborate in ISPF. There's only an equivalent of software tabbing in Xedit.

And it's sometimes very little things which you happen to use that you're missing : the FLIP command e.g. OK, you can also write a macro for it of course. As I also did for scrolling up or down the screen so that the cursor position becomes the first or last line of the screen (Scroll Amount=Cursor). PF7 and PF8 always scroll entire pages in Xedit.

Don't worry if I make Xedit look like a poor editor. It surely is NOT.
I'll come back on this topic with a sequel : 'Xedit or ISPF : Xedit !?'.