I'm getting back into COBOL which is one of the reasons I'm once again looking at UltraEdit. Most PC editors tend to stink at this. I've included a screenshot of the Sublime Text plugin. Yes, they get some/many of the keywords correct for syntax highlighting. Yes, you can set a right margin indicator at 72. Where the wheels fall off the cart is the first 6 columns. (I've also included a picture of some COBOL coding sheets I have so the younger generations can understand. We used to have to write it by hand first.)
For an editor to honestly support COBOL, it has to support the FIXED (not shouting, it's just always typed upper case) source format. Editors on the big machines which do support this format auto-generate those zero filled line numbers (usually spaced by 10 but it tends to be configurable) as you are typing in code. Some will auto-generate a new line number when you attempt to insert a line and others will require you place a * or a + on top of the last digit of a line number to force new line generation. Most have a Re-number/Re-sequence option which will do either the entire file or just a range of lines. (Has to happen when you run out of line numbers in a particular spot.)
This is not a dead format. There are tens of millions of lines of code like this in production around the world. Believe it or not software vendors who sell the source to their customers also ship patches/updates in source with line numbers. Clients have to manually verify the new lines don't walk on any customizations they might have made, then they are appended to the .COB file before it is sorted and recompiled. The really good COBOL editors will let you do the sort in the editor.
I'm curious about this. Any information would be helpful in decision making.
For an editor to honestly support COBOL, it has to support the FIXED (not shouting, it's just always typed upper case) source format. Editors on the big machines which do support this format auto-generate those zero filled line numbers (usually spaced by 10 but it tends to be configurable) as you are typing in code. Some will auto-generate a new line number when you attempt to insert a line and others will require you place a * or a + on top of the last digit of a line number to force new line generation. Most have a Re-number/Re-sequence option which will do either the entire file or just a range of lines. (Has to happen when you run out of line numbers in a particular spot.)
This is not a dead format. There are tens of millions of lines of code like this in production around the world. Believe it or not software vendors who sell the source to their customers also ship patches/updates in source with line numbers. Clients have to manually verify the new lines don't walk on any customizations they might have made, then they are appended to the .COB file before it is sorted and recompiled. The really good COBOL editors will let you do the sort in the editor.
I'm curious about this. Any information would be helpful in decision making.
tripcat1021 likes this post