Copy these 2 lines to the lpex editor:
dcl y fixed bin(31);
/* TEST TEST TEST TEST TEST TEST */
Place the cursor after ?;? in the first line.Press delete.
It preserves the 27 blanks giving us:
dcl y fixed bin(31); /* TEST TEST TEST TEST TEST TEST */
The last ?TEST */? is located after col 72. If you place the cursor after ?bin(31);? and deletes the blanks, you will leave the trailing ?TEST */? in col 73.
A more useful behavior is to trim the second line before appending it to the line above so the result would be:
dcl y fixed bin(31);/* TEST TEST TEST TEST TEST TEST */
Copy/Paste:
Example 1:
x = /* TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST */
y = 123456;
In this example ?*/? is located at col 72.
Now I want to copy ?123456;? and paste it after ?x = ? so the code looks like:
x = 123456; /* TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST */
y = 123456;
If you copy by using ctrl+c and try to paste after ?x =? using ctrl+v, nothing happens. This is because the editor tries to shift the comment to the right, but is prevented by the col 72 barrier.
You can use the block commands to achieve this, but you need to be aware of space requirements at the target position.
I will suggest this new feature:
Enable CTRL+SHIFT+V as an alternative paste or change ctrl+v to this behavior.
When in ?replace? mode, let CTRL+SHIFT+V paste what is copied by CTRL+C , as an overlay, the same way as alt+z does when using the block commands.
For example:
x= /* TEST */
y=123456;
copy ?123456;?
Place cursor after ?x=? and paste.
Expected result:
x=123456; TEST */
In ?insert? mode a more adaptive behavior is wanted, illustrated by these examples:
copy ?123456;?
In these examples, place the cursor after ?x=? and paste:
Ex 1:
There are 5 spaces between ?=? and ?/?.
x= /* TEST */
Expected result:
x=123456;/* TEST */
Ex 2:
There are no spaces between ?=? and ?/?.
x=/* TEST */
Expected result:
x=123456;/* TEST */
Ex 3:
There are 10 spaces between ?=? and ?/?.
x= /* TEST */
Expected result:
x=123456; /* TEST */
Ex 4:
The comment is ending in column 72 so there is no space to shift. Make a line break at the first blank that allows to paste the content. In this case between the last and the second last TEST.
x = /*TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST */
Expected result:
x =123456;/*TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST
TEST */
This will in most cases also work fine when breaking occurs in a code line and not in a comment as in my example.
In Cobol comments and code are not mixed on the same line, but still you may want to insert a text into a comment, and in this case breaking can occur as I describe, except that the new line must be made a comment as well. Also when breaking lines in cobol, the rules of ?A? and ?B? area must be obeyed.
Due to processing by IBM, this request was reassigned to have the following updated attributes:
Brand - Servers and Systems Software
Product family - Programming Languages
Product - Developer for System z
For recording keeping, the previous attributes were:
Brand - Rational
Product family - Design & development
Product - Developer for System z
Delivered for RDz V9